Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I run an NX server on my ubuntu work computer and use an NX client on my ubuntu home computer to work from home.

The problem with this set up is that I have to create a new X session whenever I do this-- I can't log into my existing locked session I have running at work.

This requires me to either log off at work before going home if I know I'm going to want to work from home, or, once I've created a new X session at home, going through in process explorer and killing trouble processes from the other X session.

So, is there a way using the NX Client to connect to an existing X session on a computer running NX server?

share|improve this question
    
Attaching to a running native X session is only possible via Xvnc by means of 'screenscraping' the pixels from the framebuffer. –  Kurt Pfeifle Aug 6 '10 at 22:45
    
@pipitas: The official NX server does support this now. @SCdF: What NX version are you using? Official NoMachine NX, FreeNX, NeatX? –  David Gardner Aug 9 '10 at 12:21

6 Answers 6

up vote 6 down vote accepted

Short answer : Yes.

Longer answer : This update added support for "shadowing", which allows exactly what you are asking for.

I'm not sure if this also exists in the FreeNX server, or the NeatX version.

[Edit: Updated from answer being "no", as there is "shadowing" support in NX now. So this "yes" depends on which version of NX is being used...]

share|improve this answer
    
-1. No, NX doesn't use a virtual frame buffer. –  Kurt Pfeifle Aug 6 '10 at 22:42
    
NX ships its own copy of an X server. It works independently from the system's X server, and it is installed at a different location. –  Kurt Pfeifle Aug 6 '10 at 22:43
    
'Short answer' is correct, though. –  Kurt Pfeifle Aug 6 '10 at 22:45
    
@pipitas: The short answer isn't correct anymore, as it allows "shadowing" (as answered by @Timmmm). I don't use NX anymore and so hadn't seen this option. –  David Gardner Aug 9 '10 at 12:14
    
I've updated my post to say "yes" instead of "no" since NoMachine have added this feature to the official NX. –  David Gardner Aug 9 '10 at 12:20

I just always use an NX client to connect, whether at the office or home. Then one does not have this issue.

share|improve this answer
  • No one else mentioned x0vncserver which can be used to shadow any X11 session
  • NX (mentioned above) is another popular choice

Beware that shadowing an existing X11 display does little more than screenscraping and compressing the screen updates before sending them, so the performance of both NX and VNC shadowing will not be as good as native NX/VNC sessions... (which use much more advanced performance optimizations)

There is also the option of loading the vnc.so module into the X server, documentation is a bit scarce though and AFAIK you can't unload the module (whereas you can just kill nxagent/x0vncserver when not in use)

Xpra is good for moving individual apps around but cannot shadow an existing display.

share|improve this answer

if its individual apps, xpra might do the trick.

share|improve this answer
    
Also, newer versions support "shadow" mode. –  totaam Jan 21 at 10:28
    
As I discovered - nx4 is substancially different from nx3. –  Journeyman Geek Jan 21 at 10:53

You can now, simply select 'Shadow' in the Desktop dropdown in the client configuration.

Note that it doesn't play well with compositing. If you have to connect to a composited window do this:

Click System, Resize the NX window to get the screen to update, Preferences, Resize Appearance Resize Visual Effects Resize None.

Then it should work. Actually I also just discovered if you go to 'Settings' in the connection config window there is a 'Disable Composite extension' option. That might have the same effect.

It also seems to behave weirdly with dual screen (TwinView).

share|improve this answer
    
+1: I can't delete my answer (since it's the accepted answer), but NoMachine have indeed added support for attaching to local displays. –  David Gardner Aug 9 '10 at 12:15

It isn't NX, but x11vnc can do what you're trying to do:

http://liquidat.wordpress.com/2008/11/13/short-tip-access-a-running-x-session-via-x11vnc/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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