

*Remember, if you are behind a firewall, you have to allow access through port 5900 if you want to Remote Desktop into your default display (:0). Now, when you SSH into your box (or open a command line), you can just type $ startvnc to enable Remote Desktop, or $ stopvnc to disable Remote Desktop. Open ~/.bashrc in a text editor, scroll to the bottom, and type in these two lines:

Gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled falseĪfter creating those scripts, I make them executable with this command:

Gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled true # This script starts enables System -> Preferences -> Remote Desktop I have taken this a step further on my machine and simplified this process by creating two bash shell scripts: I then disable Remote Desktop via SSH with the disable command so that the server is no longer available to myself or anyone else that might try to access it. Once I do that, I can then open up VNC Viewer from the remote machine, and do what I need to do. So, after I set up SSH and secure it, I then log into my machine remotely via SSH and run the command to enable Remote Desktop. The reason I find these commands handy is that I like to only turn on Remote Desktop when I actually need to use it. $ gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled true You can turn it back on from the command line using this command: Go back to System -> Preferences -> Remote Desktop. $ gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled false Now, open a terminal and type this command: Remote Desktop is now running on your machine. First, enable Remote Desktop in Gnome by going to System -> Preferences -> Remote Desktop.Ĭheck ‘Allow other users to view your desktop’.Ĭheck ‘Allow other users to control your desktop’.
