Debian EtchにVNCでリモートアクセス
LANを通じてXwindows
(LinuxのGUI)をリモートから使うにはXDMCPを使うのだが、
インターネットのを通じてだと圧縮のきくVNCのほうが良い。
ここではVNC経由で接続する方法を紹介する。
1.Linux
の設定1(XDMCPの許可)
ログイン画面の左下の Actions で Configure Login Manager...
を開く
Remote
タブをひらいて StyleのところでSame as Localを選ぶ
2.
Linuxの設定2(VNC4Serverの設定)
Root
Terminalでvnc4serverをインストールする
#apt-get update
#apt-get
install vnc4server
/etc/servicesに以下の行を追加
vnc-800x600x8 5950/tcp
vnc-800x600x16 5951/tcp
vnc-1024x768x8 5952/tcp
vnc-1024x768x16 5953/tcp
vnc-1152x864x8 5954/tcp
vnc-1152x864x16 5955/tcp
/etc/inetd.confに以下の行をついか
vnc-800x600x8
stream tcp nowait
nobody /usr/X11R6/bin/Xvnc4 Xvnc4
-inetd -query localhost -once -geometry 800x600 -depth 8 -cc 3
-securitytypes=none
vnc-800x600x16 stream tcp nowait nobody
/usr/X11R6/bin/Xvnc4 Xvnc4 -inetd -query localhost -once -geometry
800x600 -depth 16 -securitytypes=none
vnc-1024x768x8 stream
tcp nowait nobody /usr/X11R6/bin/Xvnc4 Xvnc4 -inetd -query localhost
-once -geometry 1024x768 -depth 8 -cc 3 -securitytypes=none
vnc-1024x768x16
stream tcp nowait nobody /usr/X11R6/bin/Xvnc4 Xvnc4 -inetd -query
localhost -once -geometry 1024x768 -depth 16 -securitytypes=none
vnc-1152x864x8
stream tcp nowait nobody /usr/X11R6/bin/Xvnc4 Xvnc4 -inetd -query
localhost -once -geometry 1152x864 -depth 8 -cc 3
-securitytypes=none
vnc-1152x864x16 stream tcp nowait nobody
/usr/X11R6/bin/Xvnc4 Xvnc4 -inetd -query localhost -once -geometry
1152x864 -depth 16 -securitytypes=none
inetdを再起動して設定を反映
#/etc/init.d/openbsd-inetd restart
3.ポートの開放
i以下のような .batファイルをつくり VirtualBox.exeのあるフォルダで実行しておく。
VBoxManage setextradata "Etch10G" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/vnc50/UDP" 0
VBoxManage setextradata "Etch10G" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/vnc50/GuestPort" 5950
VBoxManage setextradata "Etch10G" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/vnc50/HostPort" 5950
VBoxManage setextradata "Etch10G" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/vnc51/UDP" 0
VBoxManage setextradata "Etch10G" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/vnc51/GuestPort" 5951
VBoxManage setextradata "Etch10G" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/vnc51/HostPort" 5951
VBoxManage setextradata "Etch10G" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/vnc52/UDP" 0
VBoxManage setextradata "Etch10G" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/vnc52/GuestPort" 5952
VBoxManage setextradata "Etch10G" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/vnc52/HostPort" 5952
VBoxManage setextradata "Etch10G" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/vnc53/UDP" 0
VBoxManage setextradata "Etch10G" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/vnc53/GuestPort" 5953
VBoxManage setextradata "Etch10G" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/vnc53/HostPort" 5953
VBoxManage setextradata "Etch10G" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/vnc54/UDP" 0
VBoxManage setextradata "Etch10G" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/vnc54/GuestPort" 5954
VBoxManage setextradata "Etch10G" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/vnc54/HostPort" 5954
VBoxManage setextradata "Etch10G" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/vnc55/UDP" 0
VBoxManage setextradata "Etch10G" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/vnc55/GuestPort" 5955
VBoxManage setextradata "Etch10G" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/vnc55/HostPort" 5955
cmd
4.VNC viewerによる接続
VNCをダウンロードしてインストールする
vncviewer.exeを起動
localhost:55といれて1152x864x16で起動
( : のあとの55はポートNo. 5955から5900を引いた数字)
16bit色モードのVNCにはつなげたが8bit色モードのVNCにはつなげなかった。
<参
考HP>
colinux のインストール (その7)
このHPの内容に問題等ありましたら sけい
し(skeishi@yahoo.co.jp)まで連絡願います。
戻る
sけいし発HPに戻る