I don't know if this is possible or not, as I am by no means an expert on X11 forwarding.

I do some of my work for my job at home. I set up X11 forwarding so that when I ssh to my workstation, I can open instances of programs I use (IDE, browser, etc) and use them on my computer at home. I usually remember to shut these programs down before leaving work for the day; sometimes I do not.

Typically what I've done in that case is just find the pid of the program I want to use and kill it. Then I run the program from the command line.

Again, my understanding of X-Windows is at best limited, but I from what I understand, I have to kill existing processes because their X-Windows server, from their perspective, is my workstation. When I ssh to my workstation and open one of these programs (after ensuring there are no other instances running), the server from the application's perspective is my terminal on my computer at home, which is why I see the graphical output there and not my workstation.

Is there a way to tell an existing process to change what X server it should be using? Or is this determined at runtime and unchangeable?

I am well aware of alternatives such as RDP, but this isn't remotely feasible.


Is there a way to tell an existing process to change what X server it should be using?

Not that I know of, in X. However, there two applications, Xpra and NX, which were designed to allow exactly that.

For instance, Xpra states:

Xpra is 'screen for X', and more: it allows you to run X programs, usually on a remote host and direct their display to your local machine. It also allows you to display existing desktop sessions remotely. Xpra is "rootless" or "seamless", and sessions can be accessed over SSH, or password protected and encrypted over plain TCP sockets. Xpra adapts to bandwidth constraints and is fully open-source.

Similarly, the guys at NoMachine, the creators of NX, claim:

It is the perfect answer to those looking for a solution able to create hundreds of hosted Linux desktops, easy to manage and secure. NoMachine Terminal Server doesn't suffer from all the limitations that affect the traditional X-Window based solutions. Your desktop continues to live while it is disconnected, devices shared on the server follow you wherever you go and speed is spectacular even over the most modest network link, so fast to be unbeaten by any similar product designed for any operating system, not only Linux.

Both products exist for all major OSes, Windows, MacOS, Linux.

  • 1
    I can't vote up or else I would, but this is exactly what I needed, thanks. I'll check those out. – xobicvap Jun 22 '15 at 7:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.