A very common question I have encountered recently is how to run some GUI application on your command line based Linux server remotely. So the answer is simple i.e. use “vncserver” which I had also studied in my redhat training. But I have seen most of my friends are not aware of this simple process of using vncserver. To use this we simply need “vncserver” rpm on our linux server and vnc client software(can be downloaded free from internet) on our system(it could be either windows, mac or linux).
Now login to your linux server and run command “vncserver”. This will setup required files for your X session.
$vncserver
You will require a password to access your desktops.
Password:Verify:
xauth: creating new authority file /home/testuser/.Xauthority
New ' labmachine.na.corp.net:3(testuser)'desktop is labmachine.na.corp.net:3
Creating default startup script /home/testuser/.vnc/xstartup
Starting applications specified in /home/testuser/.vnc/xstartup
Log file is /home/testuser/.vnc/labmachine.na.corp.net:3.log
Now this command vncserver has created required files for you to take the remote x session. Now download vnc client exe file to your system and run vnc client.
It will ask you for the server name and enter your server name.
Server Name: labmachine.na.corp.net:3
Now it will prompt for password. Enter same password which you have provided while creating the vncserver.
Now it will bring the desktop session of your remote server. You can try to type “firefox &” to run firefox on this remote gui session or any other application.
I hope now you can easily take the GUI of your console based server. But always remember that you should have x server and vnc server installed on your server.