■作業 まず、インストール。 $ sudo apt-get install vnc4server vnc4serverがデフォルトで使用するディレクトリを作る。 $ cd $ mkdir .vnc 設定ファイルを作る。 ~/.vnc/xstartup #!/bin/sh # Uncomment the following two lines for normal desktop: unset SESSION_MANAGER #exec /etc/X11/xinit/xinitrc #gnome-session --session=gnome-classic & gnome-session --session=ubuntu-2d & [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & #x-terminal-emulator -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” & #x-window-manager & vncで接続するときのパスワードを設定する。 $ vncpasswd .vnc/passwd Password: Verify: 接続用にvnc4serverを起動する。 $ vncserver :1 -geometry 1024x768 -depth 24 このパラメータで起動した場合、5901ポートが使用されるので、ufwで5901をあける。