X2GO not running with my config

I hope that someone can assist me with my remote desktop problem. As I can’t find similar entries here on discourse (or elsewhere) I don’t believe it’s a general one.

I’ve followed: Remote Desktop - NixOS Wiki

So the remote server has:

services.x2goserver.enable = true;

additionally (it might be influencing):

  # Enable the OpenSSH daemon.
  services.openssh.enable = true;
  services.openssh.forwardX11 = true;
  services.openssh.permitRootLogin = "no";
  services.sshguard.enable = true;
  # Enable the TOXVPN
  services.toxvpn.enable = true;
  # Enable the X11 windowing system.
  services.xserver.enable = true;
  services.xserver.layout = "de";
  # Enable touchpad support.
  services.xserver.libinput.enable = true;
  # Enable the KDE Desktop Environment.
  services.xserver.displayManager.sddm.enable = true;
  services.xserver.desktopManager.plasma5.enable = true;
  services.xserver.desktopManager.mate.enable = true;

ssh connectivy is working fine and stable ( also with X11).

I tried to debug with:

x2goclient --debug 1> /tmp/x2goclient.stdout.log 2>  /tmp/x2goclient.stderr.log

Only the error channel gets output. ssh seems to be ok from the log:

x2go-DEBUG-../src/sshmasterconnection.cpp:702> Login Check - OK
x2go-DEBUG-../src/onmainwindow.cpp:2947> SSH connection established.
x2go-DEBUG-../src/onmainwindow.cpp:3374> Continue normal X2Go session
x2go-DEBUG-../src/sshprocess.cpp:199> Executing remote command via SshProcess object 0: "x2golistsessions"
x2go-DEBUG-../src/sshprocess.cpp:213> this=SshProcess(0x1ed90e0) Running masterCon->addChannelConnection(this, '"5555093b-d7d5-47a7-9abb-36cc1dfd3580"', '"bash -l -c 'echo \"X2GODATABEGIN:5555093b-d7d5-47a7-9abb-36cc1dfd3580\"; export PATH=\"/usr/local/bin:/usr/bin:/bin\";export TERM=\"dumb\"; x2golistsessions; echo \"X2GODATAEND:5555093b-d7d5-47a7-9abb-36cc1d"');

It looks like PATH isn’t including:

$ which x2golistsessions

I’m using Mate on the remote Nixos box because I had seen problems with KDE in other environments.

The client on my Nixos laptop should be fine because the software can connect flawlessly to an old Ubuntu box (with Mate as WM).

Many thanks in advance!

There’s a boolean which triggers x2goclient to set the path as shown in your debugging output: code.x2go.org Git - x2goclient.git/blob - src/sshprocess.cpp

The boolean is named overridePath. I looked throughout the source code and could not find how to set it via configuration.

I suggest contacting the package maintainer (mkg20001) about applying a patch to sshprocess.cpp. Since it’s not possible to know what will be executed, adding the path you suggested, /run/current-system/sw/bin may be the best way to go.

THX for the hint. Never contacted a maintainer; got to sort that out

The maintainer didn’t respond. Is this orphaned?

I’ve tried to workaround by using symbolic links in /bin (like it’s done for bash)

[root@nixosh1:/bin]# ln -s /run/current-system/sw/bin/setsid .

[root@nixosh1:/bin]# ll
insgesamt 20
lrwxrwxrwx 1 root root 33  8. Jun 00:08 setsid -> /run/current-system/sw/bin/setsid
lrwxrwxrwx 1 root root 75  7. Jun 21:16 sh -> /nix/store/kbcrs84s1x8yd5bp1nq6q6ihda8nd2lp-bash-interactive-5.2-p15/bin/sh
lrwxrwxrwx 1 root root 39  8. Jun 00:00 x2gobasepath -> /run/current-system/sw/bin/x2gobasepath
lrwxrwxrwx 1 root root 43  7. Jun 23:51 x2golistsessions -> /run/current-system/sw/bin/x2golistsessions
lrwxrwxrwx 1 root root 41  7. Jun 23:58 x2gostartagent -> /run/current-system/sw/bin/x2gostartagent


That didn’t help either. Any other suggestions?