centos7安装VNC
yum install tigervnc-server tigervnc vnc vnc-servercp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.servicevim /etc/systemd/system/vncserver@:1.service    找到这一行    ExecStart=/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i"    PIDFile=/home/<USER>/.vnc/%H%i.pid    这里直接用root 用户登录,所以我替换成    ExecStart=/sbin/runuser -l root -c "/usr/bin/vncserver %i"    PIDFile=/root/.vnc/%H%i.pidsystemctl daemon-reloadvncpasswd    Would you like to enter a view-only password (y/n)? n             #注意表示"是否输入一个只能查看的密码,选择否",否则连接vnc会出现黑屏systemctl daemon-reloadsystemctl enable vncserver@:1.servicesystemctl start vncserver@:1.servicesystemctl stop vncserver@:1.servicesystemctl status vncserver@:1.servicelocale -a|grep zh_CN #查看语言支持vim /etc/locale.conf  #修改为zh-CN.utf-8reboot
11:15:49点击查看
首页 所有 登录