How to VNC into an existing X session?

Solution 1:

Use x11vnc, It will attach to a running session and let you share the desktop. If you run it as root to connect to an xdm session, you will need to do some research into Xauth as it can be a bit fiddly to set up.

Edit to add: Karl Runge no longer appears to be maintaining the original x11vnc however development is continuing on github. Or you could do as suggested below by @ivan-talalaev and use x0vncserver.

Another advantage of this server is that it supports alot of the advanced VNC features used by UltraVNC including large bitmap caching and file-transfer.

Solution 2:

According documentation Tigervnc has support for this.

x0vncserver is a TigerVNC Server which makes any X display remotely accessible via VNC, TigerVNC or compatible viewers. Unlike Xvnc(1), it does not create a virtual display. Instead, it just shares an existing X server (typically, that one connected to the physical screen).

x0vncserver -display :0

Solution 3:

If you're using KDE at work, KDE already has a VNC server built in.

Presumably, GNOME does too.

Tags:

Linux

Vnc

Fedora