I don't remember this being difficult last time I used vnc. This is what I've tried (I'm running fedora 21)...
First off, install a vnc server.
sudo yum install tigervnc-server
... y
Now to unblock the port. Not sure if vnc-server
is correct here, but this page says it is. BTW, I initially tried firewall-config
, but for the life of me couldn't get it to work via SSH with X forwarding.
> sudo firewall-cmd --permanent --zone=public --add-service vnc-server
> sudo firewall-cmd --list-all
# vnc-server not listed. damn. maybe if I try again, but pressing the keys harder
> sudo firewall-cmd --permanent --zone=public --add-service vnc-server
Warning: ALREADY_ENABLED: vnc-server
# ...? whatever...
> sudo firewall-cmd --zone=public --add-port=5900/tcp
# the port's there, that should do
I can understand why many give up and sudo service firewalld stop
as a last resort.
Now to run the vnc server,
> vncpasswd
Password: *
Verify: *
> vncserver
# seems to have started
Connecting remotely doesn't work. Even connecting locally doesn't work (unable connect to socket: Connection refused (111)
, although despite refused it's the same message when no server is running, so it probably meant something a little less like it found something to talk to in the first place).
For the moment I don't care about setting up a service to have the server start automatically. How do I do the basics?
[EDIT]
To connect I was simply typing the hostname into RealVNC Viewer on windows or running vncviewer localhost
to test connecting locally.