转-安装vncserver
2018-11-16 21:50 我的IT轨迹 阅读(198) 评论(0) 编辑 收藏 举报
怎样在 CentOS 7.0 上安装和配置 VNC 服务器
https://www.linuxidc.com/Linux/2015-04/116725.htm
--安装完图形界面和图形管理工具之后,下面可忽略
yum install gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts
### 设置默认启动图形界面
# unlink /etc/systemd/system/default.target
# ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
yum install tigervnc-server
cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
vim /etc/systemd/system/vncserver@:1.service
如果是 root 用户则
#ExecStart=/sbin/runuser -l root -c "/usr/bin/vncserver %i"
- ExecStart=/usr/sbin/runuser -l root -c "/usr/bin/vncserver %i"
PIDFile=/root/.vnc/%H%i.pid
[Service]
#Type=forking
Type=simple
systemctl daemon-reload
-- 先设置密码,然后再启动服务,否则报错
vncpasswd
vncxx#ZL
systemctl enable vncserver@:1.service
systemctl status vncserver@:1.service
systemctl start vncserver@:1.service
vncserver -list
[root@localhost ~]# lsof -i:5901
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Xvnc 3690 root 9u IPv4 113235 0t0 TCP *:5901 (LISTEN)
Xvnc 3690 root 10u IPv6 113236 0t0 TCP *:5901 (LISTEN)
--修改vncserver的默认端口
转:
linux vnc的默认端口修改
https://blog.csdn.net/wangxxhb/article/details/71637149