How do I setup VNC for a user on Centos 7?


To setup your server to run a full desktop VNC session first we need to install the required packages.

yum groupinstall "GNOME Desktop";yum install tigervnc-server xorg-x11-fonts-Type1

Once you have the software installed copy the default configuration to the new service (which will run on port 5900 (:0).

cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:0.service

Now edit the new file

vi /etc/systemd/system/vncserver@:0.service

And update the 2 occurances of <USER> with your username.

If you are still running the "firewall" service you can add allow inbound connections to the VNC service by using the following commands.

firewall-cmd --permanent --zone=public --add-port=5900/tcp
firewall-cmd --reload

Su to the user and set a VNC password

su - <USER>
vncpassword
exit # exit back to root user

Configure the service to start the VNC service on boot.

systemctl daemon-reload
systemctl start vncserver@:0.service
systemctl enable vncserver@:0.service

You should now be able to connect to your new VNC service running as your user by using just the IP address in your VNC client.

Last update:
2014-12-17 13:07
Author:
Chris Burton
Revision:
1.0
Average rating:0 (0 Votes)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.

Records in this category

Tags