Wednesday, October 23, 2013

Share a linux desktop with a remote Windows client

I just came accross a situation where I wanted to show my desktop to someone sitting on a remote Windows PC. Starting vncserver gave him access to my machine, but he couldn't actually see what I was seeing and typing. Eventually I came accross this great video on youtube, but since I am running Oracle Linux and Gnome, I had to do some steps differently. So here it goes:

To access the "Remote Desktop" application, go to "System" -> "Preferences" and open "Remote Desktop" ("Entfernter Bildschirm" on my German system). This gives you the configuration interface to Gnome's implementation of vnc (they call it vino-server).

From there on, I followed pretty much the above mentioned video:
As soon as you click "Allow other users to view your desktop", all the other options will be enabled:

If you want to protect your screen from unauthorized viewers, you should also check "Confirm each access to this machine" and then supply a password, that the remote user must enter to gain access. Hit close and you are done.

Unfortunatly this screen doesn't show you the port number, the gnome vnc implementation vino-server is listening on. But this port number is required on the remote vnc client. To find this out, login as root to your machine and enter "netstat -anp | grep vino-server". This will show you the port number of the vino-server:
[root ~]# netstat -anp | grep vino-server
tcp  0  0 :::5900  :::*  LISTEN  4848/vino-server   
So in my case, it listens on port 5900.

Now the remote user only has to start any vnc client and connect to my machine's ip address while using the above port number (5900 in my case). After entering the password I had supplied in the configuration dialog, he can now see my sceen and follow whatever I am doing.

No comments: