ubuntuのvnc4serverの設定。
デフォルトのvncサーバーのピーノは
オンラインのログインできないので、オンラインログインできるvnc4serverを使う。
A)まず、インストール。
次のものをインストール
sudo apt-get install vnc4server sudo apt-get install xinetd sudo apt-get install twm
http://www.uetyi.mydns.jp/wordpress/colinux-setting/entry-279.html
B)次に設定。特に、パスワードファイルと設定ファイルの権限をログインするユーザーができるようにしておくのがポイント。
(1) /etc/services
の一行を加える。
(2) /etc/xinetd.d/xvnc
引用
service xvnc
{
disable = no
socket_type = stream
wait = no
user = nobody
group = tty
server = /usr/bin/Xvnc
server_args = -inetd -geometry 1280x1024 -depth 24 -query localhost -once PasswordFile=/etc/passwd_vnc -extension XFIXES
}
とする。
(3) パスワードファイル
vncpasswd /etc/passwd_vnc
で設定できる。
(4)よくわからないが設定
引用
あとは、次のコマンドでxinetdを再起起動します。
root@ubuntu:~# /etc/init.d/xinetd restartgdmの設定を行うために、「/etc/gdm/gdm.conf-custom」を編集します。[xdmcp]の下に「Enable=true」を設定しgdmを再起動します。
(5)設定したファイルのパーミッションをユーザーが読み取れるようにチェンジ
chmod u+r [filename]
みたいにする。
(6)再起動
/etc/init.d/xinetd restart /etc/init.d/gdm restart
C)次に、xauthでXサーバーの画面の許可。
xauth list
Display 1の許可。
xauth add :1 COOKIE
COOKIEは、
xauth list で表示される
MIT-MAGIC-COOKIE-1〜
の文字列。
http://www.atmarkit.co.jp/flinux/rensai/linuxtips/560usexnest.html
ここまで、終わって、
ubuntuを再起動した?あとに
vnc4server :1
とする。
これで、realvncなどで
接続できる。
D)最後に、
genmeを端末にする。
http://d.hatena.ne.jp/adsaria/20080521/1211352829
を引用させていただくと
~/.vnc/xstartup
を下のように書き換える。
#!/bin/sh # Uncomment the following two lines for normal desktop: unset SESSION_MANAGER /bin/sh /etc/X11/xinit/xinitrc exit $? [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & twm &
これで、大丈夫なはず。
(...できたら、これを見た方は、
「あ」とかでもよいので、
コメントを残していただけると
ありがたいです...。)