麒麟v10上安装麒麟桌面和VNC

直接上命令

yum -y groupinstall "Server with UKUI GUI"
yum -y install tigervnc-server.x86_64

systemctl get-default
systemctl set-default graphical.target

vncpasswd

vim /root/.vnc/config
--------------
SecurityTypes=VncAuth
BlacklistTimeout=0
BlacklistThreshold=1000000
------------------
cp /lib/systemd/system/vncserver@.service  /etc/systemd/system/vncserver@:1.service
#修改/etc/systemd/system/vncserver@:1.service,换成root
------
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=forking
WorkingDirectory=/root
User=root
Group=root
PIDFile=/root/.vnc/%H%i.pid
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver -autokill %i -SecurityTypes=VncAuth BlacklistTimeout=0 BlacklistThreshold=1000000
ExecStop=/usr/bin/vncserver -kill %i
Restart=on-success
RestartSec=15
[Install]
WantedBy=multi-user.target
------
systemctl daemon-reload
systemctl  enable  vncserver@:1.service
systemctl  start  vncserver@:1.service

默认端口5901
可以reboot下服务器再测试下连接
posted @ 2024-11-26 17:52  海yo  阅读(757)  评论(0)    收藏  举报