Ubuntu 11.04
Sponsored Link

VNCサーバーの導入2011/04/30

[1] VNCサーバーを導入してクライアントのWindowsマシンからグラフィカルにリモート接続します。
root@dlp:~#
aptitude -y install vnc4server


root@dlp:~#
su - narwhal
   
# VNCを設定するユーザーに遷移

narwhal@dlp:~$    
# VNC用パスワード設定

Password:    
# 入力

Verify:
narwhal@dlp:~$
vncserver :1
   
# 起動

xauth: file /home/narwhal/.Xauthority does not exist

New 'dlp:1 (narwhal)' desktop is dlp:1

Creating default startup script /home/narwhal/.vnc/xstartup
Starting applications specified in /home/narwhal/.vnc/xstartup
Log file is /home/narwhal/.vnc/dlp:1.log

narwhal@dlp:~$
vncserver -kill :1
   
# 一旦停止

Killing Xvnc4 process ID 10540
narwhal@dlp:~$
vi .vnc/xstartup


# 以下追記

exec gnome-session &


# ディスプレイ番号「1」、解像度「800x600 」、色深度「24」で起動

narwhal@dlp:~$
vncserver :1 -geometry 800x600 -depth 24


New 'dlp:1 (narwhal)' desktop is dlp:1

Starting applications specified in /home/narwhal/.vnc/xstartup
Log file is /home/narwhal/.vnc/dlp:1.log
[2] クライアント側の設定です。Windows XP を例にします。
下記サイトより、名前等を入力してRealVNCダウンロードします。

http://www.realvnc.com/products/free/4.1/download.html

ダウンロードしたらインストールして、「Run VNC Viewer」をクリックして起動します。 以下の画面になりますので、「Server」の欄に「サーバーのホスト名またはIPアドレス:ディスプレイ番号」と指定しOKをクリックします。 ディスプレイ番号は vncserver を起動したときに出たメッセージ [New 'dlp:1 (narwhal)' desktop is dlp:1]の最後の数字の部分です。
 
[3] 以下の画面になるので[1]で設定したパスワードを入力します。
 
[4] 接続できました。
 
関連コンテンツ