To install GNOME desktop environment, login to your droplet using SSH or console and install GUI and GNOME desktop environment packages by following command:
yum -y groupinstall "GNOME Desktop"
That’s all! GUI and GNOME desktop environment is now installed.
After GNOME and GUI is installed, proceed to install VNC server:
yum -y install tigervnc-server
Now the TigerVNC server is installed. But to get it work, we need to configure it. TigerVNC configuration file has been replaced in new versions of Fedora so we need to copy it to desired location:
cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
Now edit the VNC server configuration file “/etc/systemd/system/vncserver@:1.service” by following command (using nano editor):
We will be replacing the following lines of the file
` ExecStart=/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i" ` ` PIDFile=/home/<USER>/.vnc/%H%i.pid `
` ExecStart=/sbin/runuser -l root -c "/usr/bin/vncserver %i" ` ` PIDFile=/root/.vnc/%H%i.pid `
After you have done the above modification, press
Ctrl+X to save the modified file in nano editor (type
Y for yes).
Use following command to create a file
/etc/sysconfig/desktop with some contents. If you won’t do this you will get grey screen upon connecting to VNC:
echo 'PREFERRED="$(type -p gnome-session)"' >> /etc/sysconfig/desktop
Set the password for VNC user:
The VNC server is now configured. To enable and start it use the following commands:
systemctl enable vncserver@:1.service && systemctl start vncserver@:1.service
To connect to the VNC server, download any VNC client on your PC or phone and enter your server droplet IP, server root username, and password. The default port for the VNC is 5901.
!(https://assets.digitalocean.com/articles/vnc_gnome_fedora/Screen Shot 2014-03-17 at 1.28.29 PM.png)
<div class=“author”>Submitted by: <a href="www.techmesto.com ">Ashutosh Srivastava</a></div>
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in our Questions & Answers section, find tutorials and tools that will help you grow as a developer and scale your project or business, and subscribe to topics of interest.Sign up