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

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

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值