Python GUI not forwarded through SSH anymore

Forum / NoMachine for Linux / Python GUI not forwarded through SSH anymore

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #52467
    changty6
    Participant

    Hi!

    I was running some python-based programs on a headless RHEL 9 computer, and using [removed] to SSH in and run the GUI remotely on a Windows computer.

    But after I installed NoMachine on that Linux, the GUI will not be forwarded through [removed] anymore onto the Windows machine. I connected the Linux with NoMachine and found the GUI was displayed locally. Does anyone know the reason?

    Thanks!

    #52474
    Britgirl
    Keymaster

    NoMachine does not interfere with other applications as far as our tests show in our labs.  You could try with a simple SSH -X started from a Linux terminal and see if you get the same behaviour. If the cause were NoMachine, there will be the same issue, but as I mentioned, our tests don’t show any similar behaviour. It seems more of a problem of the application or your other ssh server/client product. Another way to check is by stopping the nxserver completely (settings -> server -> status -> shutdown).

    #52475
    changty6
    Participant

    Thanks for the reply. We tested with a few computers, and found this behavior only happens with NoMachine on RHEL/Rocky 9. Other computers with RHEL 8.3/8.6 work fine with NoMachine.

    This behavior is highly related to NoMachine: The python applications forward their GUI through the ssh client without problem with NO NoMachine installed. But the GUI stops being forwarded right after NoMachine is installed and started. After I completely stopped nxserver, the GUI will be forwarded again. I’ll have to completely shutdown the nxserver then reboot the computer to resume the forwarding.

    The NoMachine we are using is Workstation version 8.13.1

    Edit: typo

    #52477
    changty6
    Participant

    An update: after I shutdown the nxserver, I can resume the forwarding by ‘sudo systemctl restart display-manager’

    #52479
    Britgirl
    Keymaster

    Can you tell us which “python-based programs” you are using, we are going to investigate further.

    #52483
    changty6
    Participant

    We have some data analysis program written by ourselves. They are using wxpython for the GUI. But even a very simple window example can’t be forwarded either (py file attached).

    We also noticed that some GNOME built-in applications, like gedit, also have this issue.

    Attachments:
    #52499
    Britgirl
    Keymaster

    Ssh-ing in with your same tool with NoMachine installed and running is without issues for us. The problem can occur with Gnome apps when you are already logged in to the desktop locally with or without NoMachine because other x11 apps are fine i.e we can reproduce it even without NoMachine. It seems to be caused by the Gnome apps use of dbus and local session. If you are not logged in to the local Gnome desktop already, you cannot reproduce it. Restarting the Display Manager as you tried will also mean you are no longer logged in since you are rebooting to the login window on the desktop, that is why for you that workaround works.

    Try this instead:

    sudo systemctl restart display-manager  (so that you are no longer logged in to the local desktop)
    
    sudo /etc/NX/nxserver --restart

    and then SSH in. Are you able to reproduce the problem?

    You could also try this if you have access to both machines at the same time: login physically to the desktop (sitting next to the RedHat machine without NoMachine). Then from your Windows device try and connect. What happens?

    The alternative is to use a different desktop environment.

    #52501
    changty6
    Participant

    I’ve tried the following:

    • With NoMachine disconnected: restarted Display-Manager then restarted nxserver, the gnome apps and python apps could be forwarded to Windows without issues;
    • Then connected to desktop through NoMachine: the apps will be opened locally instead of being forwarded;
    • With NoMachine connected: restarted Display-Manager, was kicked out to login screen, then forwarding started working again.
    • With logged in physically to the desktop: both gnome apps and python apps cannot be forwarded, only opened locally.

    This is a shared server so changing desktop environment may not be a good idea for me. I think I will just disable nxserver for the time being. Thank you very much for the help though.

    #52507
    Britgirl
    Keymaster

    Your test proves that the culprit is not NoMachine, so disabling “nxserver for the time being” is not necessary. I’m not quite sure why you want to use NoMachine and the xterm for x-forwarding at the same time but with our Terminal Server products, you could run a custom session to access your python app rather than a desktop session. In any case, this is not the fault of NoMachine, but Gnome. If you try with XFCE for example, you won’t have this problem.

    #52516
    Britgirl
    Keymaster

    I forgot to mention that version 8.16 was released last month (I noticed you are using 8.13), so if possible you should update your installation also because in 8.15 we included two important X.Org and OpenSSL patches for CVE-2024-9632 and CVE-2024-9143 respectively.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Please login .