Many times we take the linux session using famous tool Putty. What if you need to take linux remote desktop session (GUI) session? Answer is VNC server. This post will quickly guide you about how to take remote Linux remote desktop GUI session.
Setting up an VNC server for linux remote desktop session
1.Desktop packages installation:
Firstly you need to install the desktop packages on the server.
[root@rhel1 ~]# yum groupinstall "Desktop"
2. Tiger VNC server package installation.
Also you need to install tiger vnc package on the server which will enable us to take linux remote desktop.
[root@rhel1 ~]# yum install vnc-server
3. Setting up an VNC user for Linux remote desktop session.
If you want to create any special user for Linux remote desktop session then you can create using procedure below otherwise you can also use any existing users for the same. Here I am adding new user “vncuser”.
[root@rhel1 ~]# useradd user1 [root@rhel1 ~]# passwd user1 Changing password for user user1. New password: BAD PASSWORD: it is based on your username Retype new password: passwd: all authentication tokens updated successfully. [root@rhel1 ~]#
Once you are done with user creation you need set VNC password using vncpasswd command as below:
[root@rhel1 ~]# su - user1 [user1@rhel1 ~]$ vncpasswd user1 Password: Verify: [user1@rhel1 ~]$ exit logout [root@rhel1 ~]#
4. Setting up an screen resolution for the linux remote desktop session.
Now to setup the screen resolution you need to add below lines of code under the file “/etc/sysconfig/vncservers”
VNCSERVERS="1:user1" VNCSERVERARGS="-geometry 1024x768"
In the above lines code we have defined screen size of “1024×768” for our remote user “user1”.
Leave a Reply