I want to use Linux at work on my workstation PC but currently I can't. The main reason is lack of useful Remote Desktop access to Linux from outside. By useful Remote Desktop access I mean how it's implemented in Windows. In Windows you can connect to a locally started session and continue it remotely. When you do this the local computer will be locked. You can go back to the local computer, unlock it and take over the local session by entering your password. Also you can connect to a Windows computer without any existing session and this will start a new one remotely. After that you can go to that computer, unlock it and continue that session locally. I need this functionality to continue my work outside the office or from other location in the office (a meeting room or a workplace of a colleague).

Today's Remote Desktop server solutions in Linux can't provide the above functionality. I've tried xrdp, several implementations of VNC and X2Go. None of them function as needed. They do one of the following:

  1. Always start a new session
  2. Continue a locally started session in a sharing mode when the local computer is not locked and anyone near it can see what I do and even intervene to that session by local mouse and keyboard.

X2Go has even additional problem supporting different resolutions of remote and local computers.

I asked this question about a year ago in the wayland-devel mailing list:

  1. Remote Desktop with Wayland
  2. Re1: Remote Desktop with Wayland
  3. Re2: Remote Desktop with Wayland

Is something changed in the support of the Remote Desktop Linux access since than? Wayland or Xorg - doesn't matter.

Please don't offer any VNC based solution since VNC can't do it architecturally. It's just a frame-buffer viewer, like TeamViewer.

  • Check out this q/a - one of the 3 solutions should let you SSH in, export your display, and recover an application running on the "local" X server .. unix.stackexchange.com/questions/152291/…
    – ivanivan
    Commented Nov 17, 2018 at 13:40
  • Of course, you'd need an X server locally, but cygwin-x can do that for you on a Windows system, Linux and Mac have it natively...
    – ivanivan
    Commented Nov 17, 2018 at 13:41
  • @ivanivan this is a solution of different issue. It's not related to the Remote Desktop issue I've asked about. Commented Nov 17, 2018 at 13:45
  • From what I've read in your question... you want to have a local X session running on hostA, lock your screen go home/to a meeting/etc. SSH into hostA , and re-connect to either an app or an entire desktop session running on hostA without unlocking hostA's local X display. From summaries given in my link, seems like one of the first two options in the accepted answer would be worth looking at
    – ivanivan
    Commented Nov 17, 2018 at 14:20
  • @ivanivan The first one is an antique and unsupported software with latest version of 1997. The second one is a tool that allows starting a particular application or a new session of a whole desktop environment in the Xvfb display server and then connecting to it remotely. This is not a Remote Desktop solution. It doesn't provide connection to already started local desktop session. It doesn't support Wayland. It also doesn't provide any mechanism of locking/unlocking the local session and taking it over when unlocked. It's just a yet another VNC-like mock. Commented Nov 29, 2018 at 14:35

3 Answers 3


Either you can use GNU screen (if you are a command line user), or you can use commercial tools like TeamViewer (if you prefere GUI).

Using GUI is traightforward, so I describe usage of GNU screen. First, you should invoke command:

$ screen

Then you can create new termials with ctrl+a+c, switch between them with ctrl+a+space or ctrl+a+a, detach from it by pressing ctrl+a+a, and then reattach it again by:

$ screen -r

More can be found here.

I should mention that you should have access to your server with ssh or something like that.

  • This answer is not useful. My question was about GUI and not CLI. TeamViwer is also not useful since it's just a display sharing and not Remote Desktop solution. Commented Oct 28, 2020 at 22:56

Please don't offer any VNC based solution since VNC can't do it architecturally. It's just a frame-buffer viewer, like TeamViewer.

But that doesn't mean you need to rule VNC out completely:

  1. Start a headless Xvnc server
  2. Connect to it remotely with a VNC client and transport link of your choice (e.g. SSH tunnel)
  3. move applications between your running desktop session (headed X server) and the Xvnc server as needed - see Can I move a running application to a different X server?

For Wayland, I think there is some work in progress, but I'm not sure about the current status.

And of course for text based applications use a terminal multiplexer like tmux or screen.


I was looking for something very similar, The closest I got was freerdp-shadow-cli.

Those are Debian man pages but they are available for multiple distros.

Their GitHub seems very active, so you might want to raise a question there for support.

I’m not sure if xrdp has a similar implementation. It might be worth taking a look:

  • This is also just a display sharing solution, like VNC. This is not a Remote Desktop one. Commented Oct 28, 2020 at 22:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .