VNC server setup on Fedora 21 droplet

May 1, 2015 1.1k views
VPN Fedora Linux Commands CentOS

I am having issues setting up VNC server on Fedora 21 droplet. To be exact, I am having issues following Step 5 on

as there is no vncserver file under /etc/init.d

but i do see it under /usr/bin

However when i execute

#/usr/bin/vncserver start

xstartup script is not created in my user's home directory (/home/remote_user/.vnc)
Below is the command and the output

#/usr/bin/vncserver start

usage: vncserver [:] [-name ] [-depth ] 
[-geometry x] 
[-pixelformat rgbNNN|bgrNNN] 
[-fp ] 
[-cc ] 
vncserver -kill

vncserver -list

Please help debug this.

1 Answer

The tutorial linked above seem to be for an older version of Fedora. Newer versions, Fedora 21 included, use systemd instead of traditional init scripts. When you install the tigervnc-server package, you will find a systemd service file located at /lib/systemd/system/vncserver@.service It needs to be copied to a new location:

  • sudo cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@.service

Next, you need to edit the file and replace instances of <USER> with your actual username. Finally, you can start the service with:

  • sudo systemctl start vncserver@:0.service

For a full rundown, check out the Fedora System Administrator Guide's section on TigerVNC.

Have another answer? Share your knowledge.