配置使用vnc服务

配置使用vnc服务

需要的软件包

tigervnc-server

安装步骤

安装
yum install tigervnc-server
为当前用户设置密码
vncpasswd
[root@tm ~]# vncserver &
[1] 10615
[root@tm ~]# xauth: (stdin):1: bad display name “tm.myserver:1” in “add” command

New ‘tm.myserver:1 (root)’ desktop is tm.myserver:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/tm.myserver:1.log

“tm.myserver:1” 表示桌面,类似于screen,在一个终端上可以有多个屏幕;一个VNC client只能连接一个桌面

添加开机自启动
[root@tm ~]#chkconfig vncserver on

杀进程命令,杀掉第一个桌面进程
[root@tm ~]# vncserver -kill :1

VNC启动后会在用户的家目录下生成一个.vnc目录,里面的文件如下

[root@localhost ~]# ls .vnc/
localhost.localdomain:1.log  localhost.localdomain:1.pid  passwd  xstartup

这些文件的作用
xstartup1
passwd 2
localhost.localdomain:1.pid3
localhost.localdomain:1.pid4


  1. A shell script specifying X applications to be run when a VNC
    desktop is started. If it doesn’t exist, vncserver will create
    a new one which runs a couple of basic applications. ↩︎

  2. VNC PASSWD file ↩︎

  3. The log file for Xvnc and applications started in xstartup. ↩︎

  4. Identifies the Xvnc process ID ↩︎

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

你抱着的是只熊

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值