3mpszw
Last Updated: February 25, 2016
·
3.228K
· bt3gl
1396323302436

Setting up a VNC Server in Fedora 20

Installing

Install tigerVNC:

$ sudo yum install tigervnc tigervnc-server

Configure the server using this and this.

You might have to manually add the vnc-server (port 5901) into your firewall:

$ sudo firewal-config

or

$ firewall-cmd --permanent --zone=public --add-service vnc-server

or

$ sudo iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 5901 -j ACCEPT

Configuration

$ vncpasswd
$ subl /etc/systemd/system/vncserver@\:1.service 
$ cp /etc/systemd/system/vncserver@\:1.service /etc/systemd/system/vncserver@:1.service 
$ sudo systemctl daemon-reload
$ sudo systemctl enable vncserver@:1.service
$ sudo systemctl start vncserver@:1.service
$ sudo systemctl status vncserver@:1.service 

To clean the iptables:

$ iptables -F 
$ ll ~/.vnc/
$ ps aux | grep port
$ pkill vnc

Connecting

From the client, connect by:

$ vncviewer SERVER-IP:5901

Note that this is far from being secure! The best solution is to SSH-tunnel to the server, forwarding VNC's ports:

$ ssh -l USERNAME -L 5902:localhost:5901 SERVER-IP
$ vncviewer localhost:2
Say Thanks
Respond