NXLogin – NX as easy as SSH

Links: Installation · Manual · SourceForge Project Page

What it is

NXLogin aims to be an easy-to-use client program for nxagent. In contrast to other NX client software, no further NX tools are necessary on the server. Since nxagent is pretty easy to build from NoMachine's open source components, this should enable immediate NX access in a number of environments that can't use it at the moment.

NXLogin is a .NET 2.0 program written in C#. This is because I mean the tool to be mainly useful for all those poor souls accessing their UNIX servers (over under-developed links) from MS-Windows clients, that are the common workhorses of today's corporate environments.

The NXLogin code is covered by The Beerware License, Revision 42.

nxproxy and nxcomp are part of the NX open source components and are covered by the GPLv2.

NXLogin (at least by default) uses Cygwin utilities to handle connection setup. These are covered by a number of different licenses. The core Cygwin components use GPLv3. They are not distributed along with the NXLogin program, but need to be installed independently.

The program has been verified to run on Windows 2000/XP/7 (thin client side) and Solaris 10–11/RHEL 6 (server side).

What it does

NXLogin automates startup of nxproxy (on the thin client) and nxagent (on the remote host) and can optionally start an X11 server on the thin client, if none is already running.

When invoked, it opens an SSH connection to the remote host, by default assuming that public-key authentication is set up (although password authentication is also supported). It then transferres a temporary Bourne shell script to the remote host that executes nxagent and – in the default configuration – the user's ~/.xinitrc file. At the same time, nxproxy is started on the thin client and will open a connection to the nxagent instance that is tunneled through the SSH link. After a configurable period of time (default is 20 seconds), the temporary session script is disowned from the SSH process, and the SSH connection is kept up by the forwarded nxproxy connection.

The remote session will run for as long as the connection stays alive (in non-persistent mode), or as long as the user's X session runs, defined by the ~/.xinitrc script. In persistent mode, an interrupted session can later be reconnected to.


See the installation manual.

You can get the source code (which is a Visual C# 2005 Express project) and binaries from the SourceForge project page.


(Additional information is available in the user manual.)

For a description of supported options of the NXlogin.exe program, invoke it without parameters.


NoMachine's NX is a pretty amazing piece of software that puts X11 desktops on par with the fanciest remote computing solutions out there, offered by some other guys.

The downside of NX is that it's a little complicated on the server side. The primary options to use it at the moment (that I know of) are:

All of this is a shame, because basically all you need to get a working NX link is nxproxy and nxagent. This means you can get away with using only the NX open source components on the server and you can just use your normal login to the machine. You can build the components without much effort by following the instructions on this page. All you need to do to set up a session is:

  1. Start nxagent on the remote host
  2. Start nxproxy on the thin client

Hence the idea for little tool that automates these steps and provides an easy way to start nxagent and nxproxy with the right configuration.

Last change 2015-10-04