Wednesday, May 18, 2005

VNCserver setup

[root@myth ~]# cat ~/.vnc/xstartup
#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

[ -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" &
# Use kde.
startkde &
# twm &

Reset access passwd:
[root@myth ~]# ls ~/.vnc/passwd
/root/.vnc/passwd

[root@be ~]# cd .vnc
[root@be .vnc]# ls
be.donnlee.com:1.log be.donnlee.com:2.log passwd xstartup~
be.donnlee.com:1.pid be.donnlee.com:2.pid xstartup
[root@be .vnc]# which vncpasswd
/usr/bin/vncpasswd
[root@be .vnc]# vncpasswd
Password:
Verify:

Start server:
[root@myth ~]# vncserver

(enter access pw)

Restart server:

[root@be .vnc]# service vncserver stop
Shutting down VNC server: [ OK ]

[root@be .vnc]# vncserver
New 'be.donnlee.com:2 (root)' desktop is be.donnlee.com:2
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/be.donnlee.com:2.log

Windows vnc client doesn't connect. So found in 'man Xvnc':

-rfbport port
Specifies the TCP port on which Xvnc listens for connections
from viewers (the protocol used in VNC is called RFB - "remote
framebuffer"). The default is 5900 plus the display number.

Windows vnc client uses 5900.

# vncserver -rfbport 5900

0 Comments:

Post a Comment

<< Home