Accessing Linux Console display through VNC - Quick How-To

Usually, when you are running vnc to access the GUI in a Linux server, it gives you a fresh GUI session to connect. for example, you need to use <server_name>:2. But this is NOT the display which you can see when you are directly attaching a monitor to your Linux server. right?


But when you are supporting to your end users, you may want to see their monitor console display, to see what they are doing and interact with them. Sometimes, you might want to access the console of your server for some other reasons. what you do?


In this scenario, the real X or console display of a Linux server, can be accessed remotely by running x11vnc on the remote Linux server. x11vnc allows one to view remotely and interact with real X displays (i.e. a display corresponding to a physical monitor, keyboard, and mouse) with any VNC viewer. 


Here, I am going to explain in step by step, how to connect the Real X or console display of a Linux server or workstation using VNC.


Install the required packages:
#rpm –ivh x11vnc-*

#rpm –ivh  vncserver*


Steps to access the Console display using VNC:
  • Login into the server which you want to access the console display, using telnet/rsh/ssh
  • Run the command “vncserver” on the server
  • If already someone logged in the console X session, Run the following command 
#x11vnc -auth <homedir of the user who logged to console X session>/.Xauthority -display:0
Note: You must have read permission for the .Xauthority file of the user who logged into the X session
  • If nobody logged into the console X session, Run the following command  
#x11vnc -auth /var/gdm/:0.Xauth -display :0
  • Run the vnc viewer and use <server_name>:0 to connect 


You can try the same method in any other UNIX flavors like HP-UX, Solaris, AIX to access the console. please note, the package names may vary depends on your OS. you might need to install them correctly.


Access to real console X display can help system admins on remote support calls. This is an easy way to interact with the users session in Linux. you can use the same method to share your vnc session to others as well.


Found any issues in accessing the real x display? visit the x11vnc website 


Any other better ideas? you are welcome to share your ways..!

Share this

Related Posts

Previous
Next Post »

1 comments:

Write comments
November 15, 2017 at 10:09 PM delete

Thanks - this got me going quickly & relatively* painlessly!

*- gotta have something to complain about!-)

Reply
avatar

What do you think about this Article? Add your Opinion..! EmoticonEmoticon