Forum / NoMachine for Linux / Connection fails on headless client
- This topic has 8 replies, 2 voices, and was last updated 5 years, 9 months ago by xedyron.
-
AuthorPosts
-
March 14, 2019 at 09:22 #21734xedyronParticipant
I can’t connect to my VM (Arch with KDE Plasma and SDDM, NoMachine 6.5.6) when the display server is disabled and X is not already running.
The connection is started after login, a black screen appears and the mouse cursor is visible for a few seconds but then the window just closes and goes back to Recent Connections.
Before I made changes to xinit there was a message dialog on the black screen: “Could not sync environment to dbus”. After the changes the message went away and the window closes without any feedback.
It works however if I start Xorg manually (startx or starting SDDM service) and on other headless VMs so I think there has to be something wrong in my system or nxnode/nxserver configuration.
Attachments:
March 14, 2019 at 10:28 #21746graywolfParticipantdbus-launch or startkde (look at the command defined by DefaultDesktopCommand key in /usr/NX/etc/node.cfg) failed to start (actually they terminated after just 2 seconds).
Browse for the application log in files /usr/NX/var/log/F-*/clients and in the systemd journal (try the command
journalctl -b -0 | grep -i "kde\|dbus"
).March 15, 2019 at 15:35 #21761xedyronParticipant/usr/NX/var/log/node/…/clients
startkde: Starting up... dbus-update-activation-environment: error: unable to connect to D-Bus: Failed to connect to socket /tmp/dbus-t7CoXdBU1J: Connection refused startkde: Could not sync environment to dbus.
journalctl
Mar 15 14:00:49 V5 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=dbus comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' Mar 15 14:00:49 V5 dbus-daemon[480]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.1' (uid=981 pid=378 comm="/usr/lib/systemd/systemd-networkd ") Mar 15 14:02:35 V5 systemd[1628]: dbus.socket: Succeeded.
March 18, 2019 at 09:18 #21773xedyronParticipantI think the issue is somehow related to Arch since it doesn’t work on Antergos and Manjaro (both based on Arch) with multi-user.target either.
It even won’t connect successfully after starting the display manager until nxserver is restarted manually.
After trying almost every change I could find that might be related to this problem I’m really out of ideas 🙁
March 18, 2019 at 20:11 #21783graywolfParticipantIt looks that dbus-daemon in Arch Linux exits immediately if not launched from a terminal. Rather that using dbus-launch, you could run a systemd user daemon using some tweaks.
1. Create a backup of nx PAM configuration (
sudo cp -a /etc/pam.d/nx /etc/pam.d/nx.original
). Then change /etc/pam.d/nx in this way:auth include system-login account include system-login password include system-login session include system-login
2. Change DefaultDesktopCommand in /usr/NX/etc/node.cfg in order to remove dbus-launch –exit-with-session:
DefaultDesktopCommand "startkde"
3. Stop display manager:
sudo systemctl stop display-manager
4. Restart NoMachine:
sudo /etc/NX/nxserver --restart
March 19, 2019 at 10:18 #21784xedyronParticipantIt finally connects! Changing su to system-(remote-)login and removing dbus-launch worked 😀 Thank you soooooooooo much graywolf!!!
March 20, 2019 at 09:15 #21789xedyronParticipantThere seems to be a issue with some tray icons, though. NoMachine icon appears as nxclient.bin and its context menu looks different from the usual login session. But the main problem is that some other icons are missing completely which makes my cloud storage app inaccessible. Do you have a clue what the reason could be?
March 20, 2019 at 18:52 #21798graywolfParticipantTry a little change to the command:
DefaultDesktopCommand "env DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus startkde"
March 21, 2019 at 08:59 #21800xedyronParticipantI bow to you mighty Linux-Wizard 🙂 I’m only guessing what your magic does but I’m thankful that it solved my problem!
-
AuthorPosts
This topic was marked as solved, you can't post.