I have not found this exact question but I could be using incorrect terms. In Ubuntu 16.04 I was able to start graphical applications over SSH by first running:

export DISPLAY=0.0

then any graphical program will open when launched in the same SSH session.

For example nohup sudo -u $LOCALUSER gedit & will open up gedit for the local user to use.

I am aware that the switch from the aging X11 to Wayland is the reason this no longer works.

What would be the current way to do this in 17.10/Wayland? Most of my workstations are managed remotely for local operators with limited access. A one liner solution for this would be desirable. We cannot do any complicated modifications from the initial install. The lack of information makes me think this is not possible in the default install, and requires system modification. Is a "one liner" on a default system possible to allow launching of GUI applications via SSH?

If not possible, we can wait until this update is made before upgrading.


X11 is way old tech at this point. To do this with wayland, check in a GNOME Terminal window:

:0 /run/user/1000/gdm/Xauthority

In the ssh session, define those two values:

XAUTHORITY=/run/user/1000/gdm/Xauthority DISPLAY=:0 gedit

Verified to work on Ubuntu 19.04.

  • Yes, X11 is old tech, but still more convenient for the end user compared to Wayland ;-) – sudodus Sep 22 at 6:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.