The same user cannot create more than one GNOME 3 virtual desktop on SLES 12
When the same user tries to create an additional GNOME 3 virtual desktop on SLES 12 , he/she gets the following message:
"Error is 54: The connection with the server was lost."
This happens because the system starts the new GNOME 3 desktop without re-initializing some environment variables which were already set for the previous desktop session created for the same user.
A possible solution is to wrap the gnome-session startup script in order to re-define such problematic variables.
This article applies to NoMachine 4 or later.
The following instructions have to be executed from a console.
1. Rename the original gnome-session startup script
sudo mv /usr/bin/gnome-session /usr/bin/gnome-session-wrapped
2. Create a new gnome-session file
sudo touch /usr/bin/gnome-session
3. Set proper permissions
sudo chmod 755 /usr/bin/gnome-session
4. Edit the /usr/bin/gnome-session file to have:
#!/bin/bash
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
export SESSION_MANAGER
export DBUS_SESSION_BUS_ADDRESS
exec "/usr/bin/gnome-session-wrapped" "$@"
