LoginSignup
6
5

More than 3 years have passed since last update.

noVNC

Last updated at Posted at 2016-08-03

novncで上のコントロールバーを消す

echo "<style>#noVNC_control_bar { display: none; }</style>" \
 >> /usr/share/novnc/vnc.html

echo "<style>#noVNC_status_bar { display: none; }</style>" \
 >> /usr/share/novnc/vnc_lite.html

i3, firefox

  • firefox
    • Control + Num
  • Workspace
    • Alt + Num
  • Fullscreen
    • Alt + F

起動

docker run -p 6080:6080 -v /dev/shm:/dev/shm -it tukiyo3/novnc

もしくは VNCサーバーに直接接続

docker run -p 127.0.0.1:5900:5900 -v /dev/shm:/dev/shm -it tukiyo3/novnc

ローカルのファイルを起動時に表示する方法

docker run -it -d \
 --restart=always \
 -p 127.0.0.1:5900:5900 \
 -e URL=file:///home/docker/index.html \
 -v /dev/shm:/dev/shm \
 -v $(pwd)/index.html:/home/docker/index.html \
 tukiyo3/novnc
vncviewer localhost

docker-compose

docker-compose.yml
novnc:
  image: tukiyo3/novnc
  restart: always
  links:
    - nginx
  ports:
    - "127.0.0.1:5900:5900"
  volumes:
    - /dev/shm:/dev/shm
  environment:
    - URL=http://nginx/index.html

nginx:
  image: nginx
  restart: always
  volumes:
    - ./index.html:/usr/share/nginx/html/index.html
  • ./index.html を編集した後はnginxコンテナをリスタート
restart.sh
docker-compose stop nginx
docker-compose rm -f nginx
docker-compose up -d nginx
6
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
5