#VNC settings vnc-1024x768 5950/tcp vnc-1272x960 5951/tcp vnc-1280x1024 5952/tcp vnc-1592x1136 5953/tcp vnc-1600x1200 5954/tcp vnc-1800x1100 5955/tcp vnc-1912x1136 5956/tcp vnc-1920x1200 5957/tcp
# default: off # description: VNC server # securlevel: 30 service vnc-1024x768 { disable = no socket_type = stream # protocol = tcp wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 1024x768 -secu ritytypes none -fp tcp/localhost:7100 }
${HOME}/.vnc/xstartupを編集する:
#!/bin/sh xrdb $HOME/.Xresources xsetroot -solid grey #x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & #x-window-manager & # Fix to make GNOME work export XKL_XMODMAP_DISABLE=1 # /etc/X11/Xsession exec /usr/bin/jwm # 接続時に起動したいプログラムを指定する。ここでは jwm を指定している
$ vncserver Warning: martinu:1 is taken because of /tmp/.X1-lock Remove this file if there is no X server <ホスト名>:1 New 'X' desktop is martinu:2 Starting applications specified in /home/kazu/.vnc/xstartup Log file is /home/kazu/.vnc/martinu:2.log
$ vncserver -geometry <width>x<height>
$ vncserver -geometry 1272x960
$ vncserver -kill :<DISPLAY番号>
5900 + <vncserver を起動した時に決まる DISPLAY番号>よって、DISPLAY番号が 1 の場合 port は
5900 + 1 = 5901となる。