Knowledge Base
Searching in : Document
ID: DT07M00093
Version: NoMachine 5
Added on: 2015-07-14
Last Update: 2017-11-15
Print this article

NoMachine entries for virtual desktops in the server session list explained (v.5)

This article applies only to those NoMachine server products for Linux supporting virtual desktop sessions.
When the user creates a new virtual desktop, closes (i.e. disconnects) or reconnects a virtual desktop, the NoMachine server updates its session list accordingly.

Premise
It's necessary to distinguish among the following cases:
1. X11 Vector Graphics Mode Enabled (default)
1.1. Creating a New Virtual Desktop
1.2. Disconnecting a Virtual Desktop
1.3. Reconnecting a Virtual Desktop
2. X11 Vector Graphics Mode Disabled
2.1. Creating a New Virtual Desktop
2.2. Disconnecting a Virtual Desktop
2.3. Reconnecting a Virtual Desktop

 

 

1. X11 Vector Graphics Mode Enabled

This is the default. You can verify your settings from the NoMachine server status -> Performance GUI and the 'Use X11 vector graphics mode in virtual sessions' option.

As an alternative, verify if the AgentX11VectorGraphics key is enabled in the node configuration file (/usr/NX/etc/node.cfg).

Notes

i) In a multi-node environment, you should verify settings for each node.

ii) The X11 Vecotr Graphics mode was previously called 'Lightweight mode'. Option in the GUI was: 'Use lightweight mode in virtual sessions' and node configuration key was AgentLightweightMode.

 

1.1. Creating a new virtual desktop

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:

# /usr/NX/bin/nxserver --list

Display Username Remote IP Session ID Node
-------- ------------ --------------- -------------- -------------
1002 nomachine 192.168.2.22 5B0FD02... localhost:22

# /usr/NX/bin/nxserver --history

Display Username Remote IP Session ID Date Status Node Type
-------- ------------ --------------- ------------ ------------- ------------ -------------- ------------------------
1002 nomachine 192.168.2.22 5B0FD02... 2014-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 the 'ps -ef | grep nxnode' command.

In the same context of the example above, the output of 'ps -ef | grep nxnode' can be similar to:

# 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.

 

1.2. Disconnecting a Virtual Desktop

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:

# /usr/NX/bin/nxserver --list

Display Username Remote IP Session ID Node
-------- ------------ --------------- -------------- -------------
1002 nomachine - 5B0FD02... localhost:22

# /usr/NX/bin/nxserver --history

Display Username Remote IP Session ID Date Status Node Type
-------- ------------ --------------- ------------ ------------- ------------ ------------- ------------------------
1002 nomachine - 5B0FD02... 2014-11-... Disconnected localhost:22 unix-xsession-default

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'.

For further information on how to disconnect or terminate a virtual desktop session and the differences between them, please consult the following:

https://www.nomachine.com/AR0100585

 

1.3. Reconnecting a Virtual Desktop

When the user reconnects the virtual desktop, 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), and one for the reconnection (it's the shadow session type). Both sessions will be in status 'Connected'.

For example:

# /usr/NX/bin/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

# /usr/NX/bin/nxserver --history

Display Username Remote IP Session ID Date Status Node Type
-------- ------------ --------------- ------------ ------------- ------------ ------------- ------------------------
1003 nomachine 192.168.2.22 A288122... 2014-11-... Connected localhost:22 shadow
1002 nomachine 192.168.2.22 5B0FD02... 2014-11-... Connected 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.

 

2. X11 Vector Graphics Mode Disabled

The X11 vector graphics mode can be disabled from the NoMachine server status -> Performance GUI by unselecting the 'Use X11 vector graphic mode in virtual sessions' option.

As an alternative, disable the AgentX11VectorGraphics key in the node configuration file (/usr/NX/etc/node.cfg).

Notes

i) In a multi-node environment, you should verify settings for each node.

ii) The X11 Vecotr Graphics mode was previously called 'Lightweight mode'. Option in the GUI was: 'Use lightweight mode in virtual sessions' and node configuration key was AgentLightweightMode.

 

2.1. Creating a New Virtual Desktop

When the user chooses 'Create a new virtual desktop', the NoMachine server executes two operations:

a) 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'.

b) 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:

# /usr/NX/bin/nxserver --list

Display Username Remote IP Session ID Node
-------- ------------ --------------- -------------- -------------
1003 nomachine 192.168.2.87 9278316AD... localhost:22
1002 nomachine - 9749CA76F... localhost:22

# /usr/NX/bin/nxserver --history

Display Username Remote IP Session ID Date Status Node Type
-------- ------------ --------------- ------------ ------------- ------------ -------------- ------------------------
1003 nomachine 192.168.2.87 9278316AD... 2014-11-... Connected localhost:22 shadow
1002 nomachine 192.168.2.87 9749CA76F... 2014-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 the 'ps -ef | grep nxnode' command. In the same context of the example above, the output of 'ps -ef | grep nxnode' can be similar to:

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.

 

2.2. Disconnecting a Virtual Desktop

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:

# /usr/NX/bin/nxserver --list

Display Username Remote IP Session ID Node
-------- ------------ --------------- -------------- -------------
1002 nomachine - 9749CA76F... localhost:22

# /usr/NX/bin/nxserver --history

Display Username Remote IP Session ID Date Status Node Type
-------- ------------ --------------- ------------ ------------- ------------ -------------- ------------------------
1003 nomachine 192.168.2.87 9278316AD... 2014-11-... Finished localhost:22 shadow
1002 nomachine 192.168.2.87 9749CA76F... 2014-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'.

For further information on how to disconnect or terminate a virtual desktop session and the differences between them, please consult the following:

https://www.nomachine.com/AR0100585

 

2.3. Reconnecting a Virtual Desktop

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:

# /usr/NX/bin/nxserver --list

Display Username Remote IP Session ID Node
-------- ------------ --------------- -------------- -------------
1003 nomachine 192.168.2.87 25398F2D5... localhost:22
1002 nomachine - 9749CA76F... localhost:22

# /usr/NX/bin/nxserver --history

Display Username Remote IP Session ID Date Status Node Type
-------- ------------ --------------- ------------ ------------- ------------ -------------- ------------------------
1003 nomachine 192.168.2.87 25398F2D5... 2014-11-... Connected localhost:22 shadow
1002 nomachine 192.168.2.87 9749CA76F... 2014-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.