using vnc-server in RHEL7

installation

yum install tigervnc-server

configuration

following configuration solution may solve the situation that the display is black with only vnc config cursor.

(2)edit /etc/systemed/system/[email protected]
vi /etc/systemd/system/[email protected], substituting USER with real user to login, modified lines resemble

ExecStart=/usr/sbin/runuser -l USER -c "/usr/bin/vncserver %i"
PIDFile=/home/USER/.vnc/%H%i.pid

after change, save&exit
(3)make changes take effect immediately
systemctl daemon-reload

(4)as a real vnc user, setup password of it
vncpasswd

verification

  • start vnc server, here assumpting that display_number is :1
    systemctl start vncserver@:1.service
    systemctl enable vncserver@:1.service #automatically start when system boot
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章