NoMachine FreeNX – accessing active session isn’t possible


** – Update – The below is left for reference but it IS apparently now possible to do this using NoMachine V3.0 – see this post
Look, it’s just not possible in FreeNX to grab a local console session or ‘mirror’ an existing session using native NX protocol. Part of the problem is how is the architecture of spawning a new X session.

Anyway, the ‘answer’ to this problem by most people is to tunnely VNC through NX.. Look, go try it if it suits you but it’s, well if I wanted VNC, I would have just used VNC. NX is just another level all together.

This is a real downer, as I use RDP everyday at work and remote control sessions, login via the console etc – a bit of a downer for NX.

Anyway, while it’s not the best solution this is what I do, which suits my situation. Generally, it’s just me connecting from a remote location. Sometimes from work or from a friend’s house.

  1. Connect as myself, even though the console is logged in. This creates 2 users logged in under the same name.
  2. I run gnome saved sessions which kick off Evolution, Opera and Skype

I then have this in my .profile for my login (don’t run it in your .bashrc or else it will kill evolution each time you open a new shell):

for i in `pgrep evolution`;do kill -9 $i; done;
for i in `pgrep opera`;do kill -9 $i; done;
for i in `pgrep skype`;do kill -9 $i; done;

This kills the three applications, so I can then open them in my NX session. Yes, there’s some bloody repetition there but it’s a one liner I knew, it took 5 minutes and doesn’t make a difference to the time or speed of the login.

Some applications will function running under two simultaneous logins but most won’t. Anyway, pgrep is a nice little Linux utility that’s not available on HP-UX or Solaris –

The ‘almost’ equivalent for that is: ps -ef | grep ‘process_name’

Just don’t go doing any funny shit as root like:

for i in `pgrep ini`;do kill -9 $i; done;
for i in `pgrep at`;do kill -9 $i; done;

;)

Powered by ScribeFire.

Published by salubrium

I am a Systems Administrator based in Sydney, Australia with some hugely varied interests: Topics covered are Virtualization, Web Hosting, Remote Desktop, Security and Backups, PHP, Python, MVC Frameworks, SEO

Leave a comment

Your email address will not be published. Required fields are marked *