2

I am ssh-ing (with ForwardX11 on) from an Ubuntu laptop to a remote OpenSUSE desktop. Both are running X11.

Some applications like xterm, xclock etc. open on the calling computer's display (Ubuntu), which is the behaviour I want. But others, like eog, nautilus, etc. open on the OpenSUSE desktop's X11 display - even though the DISPLAY variable is set to the local (Ubuntu) X11 display. How can I change this behaviour?

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
  • Related: [Windows in X session opening on wrong display](https://unix.stackexchange.com/questions/580177/windows-in-x-session-opening-on-wrong-display) – Gilles 'SO- stop being evil' Mar 09 '21 at 23:09
  • At least in the case of nautilus, it's likely because it connects to an already-running instance of the application. See for example [ssh -X to open a file manager](https://askubuntu.com/questions/1109531/ssh-x-to-open-a-file-manager) . – steeldriver Mar 09 '21 at 23:11

1 Answers1

3

Just found the solution. Unset XDG_RUNTIME_DIR then it works.

  • Thanks, this is also relevant for using several tty with different X sessions on the same machine. My problem was that calling say gnome-terminal in a tty, just opened a new terminal in my older Xsession (living in another tty). – Gauthier Jul 04 '22 at 15:51