标签:
杂谈 |

1 preparation create xstartup file under your $HOME directory:
[chazhang@psrh4 ~/.vnc]$ ls
opmanager.asia.corp.platform.com:23.log
opmanager.asia.corp.platform.com:23.pid
[chazhang@psrh4 ~/.vnc]$ more xstartup
#!/bin/sh
# Uncomment the following two lines for normal
desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop"
&
#twm &
startkde &
2 startup vncserver on display 2:
[chazhang@psrh4 ~/.vnc]$ vncserver :2 -geometry 1280*
xauth:
xauth:
New 'psrh4:2 (chazhang)' desktop is psrh4:2
Starting applications specified in
/home/chazhang/.vnc/xstartup
Log file is /home/chazhang/.vnc/psrh4:2.log
[chazhang@psrh4 ~/.vnc]$ nmap -v
127.0.0.1|grep vnc
5802/tcp open
5902/tcp open
3 vnc will open will open http port(5800+2)
visit from http browser
access the following site http://psrh4:5802
4 stop vncserver