It rarely happens that we need to see GUI for the Linux based remote servers. But what if you need to see that. The purpose of this post is to walk you through the software/steps required to fulfill this requirement. Here is how we can enable the GUI
First of all we have to install vncserver on remote machine
Then start a display and telling the display port along as a command line argument. This will be used by an application that require displays.
Above we are using display port as :3. If omitted, the next free display number is used
It will ask to type password for authentication. Type password. Re verify. Now display is on
For Ubuntu set password for authentication using vncpasswd command
You can see the list of existing displays using vncserver list option
For seeing what port is being used we will grep from ps command
ps -eaf| grep vnc
Note down the -rfbport number for the corresponding display
Export the display system variable that will be used by firefox or any other ui application to use
Next is how we can see application running.
For that we need to remote desktop into the remote machine.
Do ssh tunnel.
Try to do remote desktop
Type localhost as server address and when promted for password, type the password entered earlier while opening display
If everything went fine, shall able to see the remote desktop!!!
One simple use-case could be if you want to see the Geb/functional tests running on server.
And I am planning to write another blog for this.
Hope this helps!!!