Guest Additions Installed, but not working

Discussions about using Linux guests in VirtualBox.
puterboy
Posts: 17
Joined: 29. Sep 2019, 02:46

Re: Guest Additions Installed, but not working

Post by puterboy »

fth0 wrote:Well, I gave some hints in two different possible directions (Synergy, Wayland), but got no reaction from puterboy regarding investigating them so far.
- I don't have synergy running on the client... either my standard Ubuntu 18.04 VM that doesn't work or the Virgin one that does
- Wayland is running on both my standard Ubuntu 18.04 VM and on the virgin 18.04 VM -- yet one works and one doesnt.

So, I don't think that is the direct problem
puterboy
Posts: 17
Joined: 29. Sep 2019, 02:46

Conlict with Nomachines nxclient and nxnode user processes?

Post by puterboy »

I think I found the source of the problem.

On my traditional Ubuntu 18.04 VM, I have NoMachines NX server and client installed.
On boot, it starts up several server root process (nxserver, nxd, nexec) as well as 2 user processes (nxclient and nxnode).
Killing those processes or terminating the session with '/etc/NX/server --terminate <session>' before logging in to the graphical console allows Guest Additions to work.

These client processes start along with the nxserver at boot because I have configured the following parameters in /usr/NX/etc/server.cfg

Code: Select all

CreateDisplay 1
DisplayOwner <username>
Alternatively, I can prevent these processes from starting up by setting :

Code: Select all

CreateDisplay 0
DisplayOwner ""
In which case, GA works fine.

Note that the reason setting .Xauthority to root ownership (with perm 600) works is because it prevents the nxclient processes from starting -- i.e. it has nothing to do directly with VBox.

I imagine that VBox GA may be getting confused over which is the physical console and which is the Nomachine console perhaps causing the problem.
Not sure if this is a bug or a feature... but it does explain what is going on...
Last edited by puterboy on 24. Dec 2021, 21:21, edited 1 time in total.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Guest Additions Installed, but not working

Post by fth0 »

Kudos for the good detective work! :)

I have a few questions regarding what's needed to reproduce the issue:

1. Which NoMachine software variant (e.g. Enterprise, Workstation, free) are you using? Does the free version suffice?

2. What are the minimal steps to reproduce the issue?

3. Do I understand correctly that NoMachine created an additional X11 display (:1 or :0.1), but no NoMachine connection was established?
puterboy
Posts: 17
Joined: 29. Sep 2019, 02:46

Re: Guest Additions Installed, but not working

Post by puterboy »

fth0 wrote:Kudos for the good detective work! :)
Thanks!
I have a few questions regarding what's needed to reproduce the issue:

1. Which NoMachine software variant (e.g. Enterprise, Workstation, free) are you using? Does the free version suffice?
Free version: NoMachine 7.7.4 (Linux)
2. What are the minimal steps to reproduce the issue?
Install minimal Ubuntu 18.04
Download and install deb version of latest NoMachine from: https://www.nomachine.com/download/download&id=5
Edit /usr/NX/etc/server.cfg, changing:

Code: Select all

CreateDisplay 0
DisplayOwner ""
To:

Code: Select all

CreateDisplay 1
DisplayOwner <username>
Reboot
3. Do I understand correctly that NoMachine created an additional X11 display (:1 or :0.1), but no NoMachine connection was established?
You don't need to initiate or receive any NoMachine connections.
However, a new display is created as indicated by running:

Code: Select all

#/etc/NX/nxserver --list
Display Username Remote IP Session ID Node
------- -------- --------- ---------- ----
1002   <username> 127.0.0.1 12D343A223F4243234ABEE9ECDE13523 localhost:4000
And

Code: Select all

#ls -ald /tmp/.X*
-r--r--r-- 1 <username> <unseername> 11 Dec 24 00:33 /tmp/.X1002-lock
-r--r--r-- 1 gdm  gdm  11 Dec 24 00:33 /tmp/.X1024-lock
drwxrwxrwt 1 root root 14 Dec 24 00:32 /tmp/.X11-unix/
drwxrwxrwt 1 root root  0 Dec 24 00:32 /tmp/.XIM-unix/
So really easy to reproduce on a virgin, minimal install - just install nomachine, edit two lines in the server.cfg and reboot...
puterboy
Posts: 17
Joined: 29. Sep 2019, 02:46

Re: Guest Additions Installed, but not working

Post by puterboy »

Note that interestingly and coincidentally I hadn't noticed this problem/bug before since for some reason my ~/.Xauthority file was set to root ownership which blocked nxclient launching since presumably it couldn't read/write to .Xauthority.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Guest Additions Installed, but not working

Post by fth0 »

puterboy wrote:So really easy to reproduce on a virgin, minimal install - just install nomachine, edit two lines in the server.cfg and reboot...
I couldn't reproduce the issue so far:

I've created a new VM, installed Ubuntu Desktop 18.04.6 selecting minimal install and rebooted, switched the test user's login to Wayland, downloaded and installed NoMachine 7.7.4_1, edited the server.cfg file and rebooted. The clipboard still works (tested with plain text content from host to guest), and the NX server's display 1002 is running as expected.

I've noticed a difference, though: In /tmp, there are .X0-lock and .X1002-lock, ps -elfH shows /usr/bin/Xwayland as descendent of gdm-wayland-session, and .Xauthority is owned by the test user. Why do you have a .X1024-lock file (0 < 1002 < 1024)? Do you have Xwayland running?
puterboy
Posts: 17
Joined: 29. Sep 2019, 02:46

Re: Guest Additions Installed, but not working

Post by puterboy »

Not running Wayland. No changes to the 18.04 minimal install other than installing Vbox GA and NoMachines and the change to server.cfg
puterboy
Posts: 17
Joined: 29. Sep 2019, 02:46

Re: Guest Additions Installed, but not working

Post by puterboy »

Just to be sure that it is not also a host problem, I exported the virtual machine from Vbox running under a Win10 host to Vbox running under a Linux (Ubuntu 18.04) host.
In both cases my Virgin Ubuntu 18.04 guest with NoMachine didn't work with GA.
puterboy
Posts: 17
Joined: 29. Sep 2019, 02:46

Re: Guest Additions Installed, but not working

Post by puterboy »

fth0 wrote:
puterboy wrote:So really easy to reproduce on a virgin, minimal install - just install nomachine, edit two lines in the server.cfg and reboot...
I couldn't reproduce the issue so far:

I've created a new VM, installed Ubuntu Desktop 18.04.6 selecting minimal install and rebooted, switched the test user's login to Wayland, downloaded and installed NoMachine 7.7.4_1, edited the server.cfg file and rebooted. The clipboard still works (tested with plain text content from host to guest), and the NX server's display 1002 is running as expected.

I've noticed a difference, though: In /tmp, there are .X0-lock and .X1002-lock, ps -elfH shows /usr/bin/Xwayland as descendent of gdm-wayland-session, and .Xauthority is owned by the test user. Why do you have a .X1024-lock file (0 < 1002 < 1024)? Do you have Xwayland running?
As previously noted, I don't use Wayland. Just the naked Ubuntu install plus NoMachine and the change to server.cfg
Nothing else.

If you have an ftp site or something similar, I could export the VM, compress it, and share it with you...
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Guest Additions Installed, but not working

Post by fth0 »

puterboy wrote:Note that both my old, full install VM and the new install use gdm3 + Wayland.
puterboy wrote:Not running Wayland.
puterboy wrote:As previously noted, I don't use Wayland.
Ok, 2:1. ;)

But that doesn't explain the .X1024-lock file.
puterboy wrote:If you have an ftp site or something similar, I could export the VM, compress it, and share it with you...
No, I haven't. But if you have a Google Drive or similar ... ;) ... but rather zip the VM folder than export the VM.
puterboy
Posts: 17
Joined: 29. Sep 2019, 02:46

Re: Guest Additions Installed, but not working

Post by puterboy »

fth0 wrote:
puterboy wrote:Note that both my old, full install VM and the new install use gdm3 + Wayland.
puterboy wrote:If you have an ftp site or something similar, I could export the VM, compress it, and share it with you...
No, I haven't. But if you have a Google Drive or similar ... ;) ... but rather zip the VM folder than export the VM.
I have Google Drive and can zip the VM folder...
Just let me know what you want me to do to share...
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Guest Additions Installed, but not working

Post by fth0 »

Just provide a zip file containing the contents of the VM folder of a VM exhibiting the problem. If you don't want to share the VM with the world, you can send me the necessary access information via forum PM (the link is right next to my forum posts).
Post Reply