您的位置:首页 > 其它

使用VNC进行远程连接桌面管理

2013-05-09 23:13 615 查看
vncserver命令帮助
[root@localhost /]# vncserver --help

usage: vncserver [:<number>] [-name <desktop-name>] [-depth <depth>]
[-geometry <width>x<height>]
[-pixelformat rgbNNN|bgrNNN]
[-fp <font-path>]
[-fg]
<Xvnc-options>...

vncserver -kill <X-display>

vncserver
–list

VNC服务器配置
[root@localhost /]# vncserver

You will require a password to access your desktops.

Password:
Verify:

New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1

Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log

开启VNC
[root@localhost /]# vncserver :1

New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log

关闭VNC
[root@localhost /]# vncserver -kill :1
Killing Xvnc process ID 20838

安装vnc客户端:vnc-installer-x86_win32.exe

客户端连接,比如服务器IP 192.168.13.221
192.168.13.221:1

当登录后,发现界面比较丑陋,可以查看/root/.vnc/xstartup:

其中有注释行

#Uncomment the following two lines for normal desktop:

#unset SESSION_MANAGER

#exec /etc/X11/xinit/xinitrc


修改成:

unset SESSION_MANAGER

exec /etc/X11/xinit/xinitrc


重启vncserver就OK
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: