Virtual desktops are available only on Linux and are supported by all the NoMachine server products except the free version. Virtual desktops can be Linux desktop environments (e.g. GNOME, KDE, Xfce etc ...), but also RDP or VNC desktops. Custom sessions are just a particular case, since they are single applications instead of the full desktop. Regarding of their entries in the server's session list, they follow the same rules of a virtual desktop.
Depending if the virtual desktop (or custom session) is in X11 Vector Graphics Mode (default) or not, session entries are different. There are also different entries when a new session is created, disconnected or reconnected.
How to verify the X11 Vector Graphics Mode There are two ways to verify if the X11 Vector Graphics Mode is enabled or disabled and manage it:
I |
via Server UI
Right mouse click on the !M icon in the system tray and choose 'Show server status' to open the server UI. Access the 'Performance' panel and look at the 'Use X11 vector graphics mode in virtual sessions' option.
|
II |
via node configuration file
Open the /usr/NX/etc/node.cfg file and look for the AgentX11VectorGraphics key.
|
Commands to retrieve the list of running sessions or the whole list of sessions (included those that are already terminated) are:
sudo /etc/NX/nxserver --list |
sudo /etc/NX/nxserver --history |
TIP |
 |
|
|
In a multi-node environment (i.e. when a NoMachine Enterprise Terminal Server + multiple Terminal Server Nodes are set), you should verify settings for each machine where sessions are run. |
When the user chooses 'Create a new virtual desktop', the server creates a new desktop, i.e. it starts the X server on the first available display. This desktop is listed in the session list and corresponds to the entry with the actual DISPLAY.
Status of the virtual desktop session is 'Connected', the session type is 'unix-xsession-default'
For example:
$ sudo /etc/NX/nxserver --list |
Display |
Username |
Remote IP |
Session ID |
Node |
1002 |
nomachine |
192.168.2.22 |
5B0FD02... |
localhost:22 |
|
$ sudo /etc/NX/nxserver --history |
Display |
Username |
Remote IP |
Session ID |
Date |
Status |
Node |
Type |
1002 |
nomachine |
192.168.2.22 |
5B0FD02... |
2017-11-... |
Connected |
localhost:22 |
unix-xsession-default |
|
This virtual desktop entry in the session list corresponds to one nxnode process. You can see that by running this command:
$ ps -ef | grep nxnode |
For example, in the same context of the example above, the output is: |
$ ps -ef | grep nxnode gdm 19238 19213 0 13:38 pts/2 00:00:00 /usr/NX/bin/nxnode.bin 1000 19371 19337 4 13:39 ? 00:00:01 /usr/NX/bin/nxnode.bin -H 8 --shell |
Note that the nxnode process related to the user's connection is the process running with the -H option.
The nxnode process owned (in this example) by gdm is the node in charge of mirroring the physical display. This nxnode process is necessary to let users connect to the physical desktop of the host machine and it's not started when the machine is headless or the X server is not up and running.
TIP |
 |
|
|
If the user has created a new custom application 'console', session type in the server list is 'unix-console', if he/she has specified the application, it's 'unix-application'. |
When the user disconnects from the virtual desktop, such desktop remains running. The NoMachine server updates its entry in the session list and changes status to 'Disconnected'.
For example:
$ sudo /etc/NX/nxserver --list |
Display |
Username |
Remote IP |
Session ID |
Node |
1002 |
nomachine |
- |
5B0FD02... |
localhost:22 |
|
$ sudo /etc/NX/nxserver --history |
Display |
Username |
Remote IP |
Session ID |
Date |
Status |
Node |
Type |
1002 |
nomachine |
- |
5B0FD02... |
2017-11-... |
Disconnected |
localhost:22 |
unix-xsession-default |
|
TIPS |
 |
|
|
I |
If the user logs out (i.e. terminates the session), the virtual desktop is terminated. Its entry will be removed from the session list and disappear from the 'nxserver --list' output. The session history will report such session as 'Finished'. |
II |
The same applies to custom sessions. |
|
When the user reconnects the virtual desktop or the custom session, NoMachine server updates entries in the session list.
In this case, the session list will show two entries: one for the X server started when the virtual desktop has been created (it's the unix-xsession-default session type in case of virtual desktops, or for example unix-application for custom sessions), and one for the reconnection (it's the shadow session type). Both sessions will be in status 'Connected'.
For example:
$ sudo /etc/NX/nxserver --list |
Display |
Username |
Remote IP |
Session ID |
Node |
1003 |
nomachine |
192.168.2.22 |
A288122... |
localhost:22 |
1002 |
nomachine |
192.168.2.22 |
5B0FD02... |
localhost:22 |
|
$ sudo /etc/NX/nxserver --history |
Display |
Username |
Remote IP |
Session ID |
Date |
Status |
Node |
Type |
1003 |
nomachine |
192.168.2.22 |
A288122... |
2017-11-... |
Connected |
localhost:22 |
shadow |
1002 |
nomachine |
192.168.2.22 |
5B0FD02... |
2017-11-... |
Connected |
localhost:22 |
unix-xsession-default |
|
TIP |
 |
|
|
The reconnected session will have a different Session ID from the session originally connected when the virtual desktop was created. Additionally, it could also be reconnected on a different Display. |
When the user chooses 'Create a new virtual desktop', the NoMachine server executes two operations:
I |
It creates a new desktop, i.e. it starts the X server on the first available display. This desktop is listed in the session list and corresponds to the entry with the actual DISPLAY. Let's call this entry 'display session', it's the 'unix-xsession-default' session type and it has status 'Disconnected'. |
II |
It adds the user's connection to the session list: this is the entry in the server session list showing the IP of the connected client. It's a 'shadow' session type and has status 'Connected'. |
For example:
$ sudo /etc/NX/nxserver --list |
Display |
Username |
Remote IP |
Session ID |
Node |
1003 |
nomachine |
192.168.2.87 |
9278316AD... |
localhost:22 |
1002 |
nomachine |
- |
9749CA76F... |
localhost:22 |
|
$ sudo /etc/NX/nxserver --history |
Display |
Username |
Remote IP |
Session ID |
Date |
Status |
Node |
Type |
1003 |
nomachine |
192.168.2.87 |
9278316AD... |
2017-11-... |
Connected |
localhost:22 |
shadow |
1002 |
nomachine |
192.168.2.87 |
9749CA76F... |
2017-11-... |
Disconnected |
localhost:22 |
unix-xsession-default |
|
These entries correspond to two nxnode processes: one is the display session itself, the other is the user's session connected to that display.
You can see the nxnode processes by running:
$ ps -ef | grep nxnode |
For example, in the same context of the example above, the output is: |
$ ps -ef | grep nxnode lightdm 13412 13188 0 10:46 pts/0 00:00:00 /usr/NX/bin/nxnode.bin nomachine 13508 13495 0 10:47 pts/0 00:00:07 /usr/NX/bin/nxnode.bin nomachine 13528 13495 0 10:47 pts/0 00:00:00 /usr/NX/bin/nxnode.bin -H 6 |
You can recognize the nxnode process of the user's connection because it is running with the -H option. The other nxnode process owned by 'nomachine' is the display session.
The nxnode process owned (in this example) by lightdm is the node in charge of mirroring the physical display. This nxnode process is necessary to let users connect to the physical desktop of the host machine and it's not started when the machine is headless or the X server is not up and running.
When the user disconnects from the virtual desktop, the NoMachine server updates its entries in the session list. The display session remains running and maintains status 'Disconnected'. The session entry related to the user's connection disappears from the output of 'nxserver --list' and it's status is changed to 'Finished' in the session history.
For example:
$ sudo /etc/NX/nxserver --list |
Display |
Username |
Remote IP |
Session ID |
Node |
1002 |
nomachine |
- |
9749CA76F... |
localhost:22 |
|
$ sudo /etc/NX/nxserver --history |
Display |
Username |
Remote IP |
Session ID |
Date |
Status |
Node |
Type |
1003 |
nomachine |
192.168.2.87 |
9278316AD... |
2017-11-... |
Finished |
localhost:22 |
shadow |
1002 |
nomachine |
192.168.2.87 |
9749CA76F... |
2017-11-... |
Disconnected |
localhost:22 |
unix-xsession-default |
|
If the user logs out (i.e. terminates the session), both desktop and connection entries are removed from the session list and disappear from the 'nxserver --list' output. The session history will report such session as 'Finished'.
When the user reconnects the virtual desktop, NoMachine server updates its entries in the session list. Also in this case, the session list will show two entries: one for the display session (it's the unix-xsession-default session type, with status 'Disconnected'), and one for the reconnection (it's the shadow session type with status Connected).
For example:
$ sudo /etc/NX/nxserver --list |
Display |
Username |
Remote IP |
Session ID |
Node |
1003 |
nomachine |
192.168.2.87 |
25398F2D5... |
localhost:22 |
1002 |
nomachine |
- |
9749CA76F... |
localhost:22 |
|
$ sudo /etc/NX/nxserver --history |
Display |
Username |
Remote IP |
Session ID |
Date |
Status |
Node |
Type |
1003 |
nomachine |
192.168.2.87 |
25398F2D5... |
2017-11-... |
Connected |
localhost:22 |
shadow |
1002 |
nomachine |
192.168.2.87 |
9749CA76F... |
2017-11-... |
Disconnected |
localhost:22 |
unix-xsession-default |
|
Note that the reconnected session will have a different Session ID from the session originally connected when the virtual desktop was created. Additionally, it could also be reconnected on a different Display.
|
|