分类: LINUX
2015-07-03 16:07:54
1 # vncserver
You will require a password to access your desktops.
Password:
Verify:
Would you like to enter a view-only password (y/n)? n
New 'X' desktop is ora11g01:2
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/ora11g01:2.log
同时在/root目录下会生成.vnc目录。
2 # vi /root/.vnc/xstartup
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP
Desktop" &
#twm &
DISPLAY=:2 gnome-session &
3 若要查看端口是否已经被占用
# netstat –lntp
4 # vncserver -kill :2
Killing Xvnc process ID 6126
5 # vncserver :2
New 'X' desktop is ora11g01:2
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/ora11g01:2.log