2009年7月17日金曜日

ubuntuでvncserverを立てる

[したいこと・しりたいこと]
[目標]
ubuntuでvncserverを立てる
windowsからvnc経由でubuntuを操作する
vncでwindowsからubuntuを遠隔操作する
ubuntuをvnc越しにwindowsから利用する

改訂版
KRAKENBEAL RECORD: Ubuntu-VNCserver-VMwareWorkstation
http://krakenbeal.blogspot.com/2010/03/ubuntu-vncserver-vmwareworkstation.html


[環境]
Ubuntu Hardy Heron 8.04
Ubuntu Jaunty Jackalope 9.04 on VirtualBox 3.0.2
USB 104Key (US)




[したこと]

(1)必要なプログラムのインストール
$ sudo apt-get install xinetd
$ sudo apt-get install vnc4server



(2)VNC用のポートをListen
$ sudo vi /etc/services

vnc 5900/tcp # VNC Server //追記する



(3)VNCサーバパスワードの設定

$ sudo vncpasswd /etc/passwd_vnc
Password:
Verify:
$ sudo chown nobody.tty /etc/passwd_vnc



(4)xvncの設定ファイルを書く
$ sudo vi /etc/xinetd.d/vnc

---------------ここから

service vnc
{
disable = no
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc

server_args = -inetd -query localhost -geometry 1024x768 -depth 24 -once passwordFile=/etc/passwd_vnc -extension XFIXES
}

---------------ここまで

Ubuntuでは -extension XFIXESというパラメータが必要らしい。



(5)gdmの設定ファイルを書く

$ sudo vi /etc/gdm/gdm.conf-custom

[daemon]
RemoteGreeter=/usr/lib/gdm/gdmgreeter

[xdmcp]
Enable=true


(6)再起動

$ sudo reboot

または

$ sudo /etc/init.d/gdm restart
$ sudo /etc/init.d/xinetd restart


[参考]

passwordFile=/etc/.xvnc_passwd
http://www.ahirunum.net/2009/05/ubuntuvnc.html

UbuntuとVNC - Linuxで自宅サーバ構築(新森からの雑記)
http://www.uetyi.mydns.jp/wordpress/colinux-setting/entry-279.html

やすですが、何か? ubuntuでvncserver
http://yasu1973fc2.blog99.fc2.com/blog-entry-30.html

0 コメント: