blog: gui through ssh
crispy-caesus crispy@crispy-caesus.eu
Sat, 21 Mar 2026 11:32:43 +0100
1 files changed,
19 insertions(+),
0 deletions(-)
A
blog/2026-03-21 Start graphical app through independent shell/post.txt
@@ -0,0 +1,19 @@
+Sometimes for obscure reasons I ssh into a device and want to start a graphical +app on the device. Maybe I wanna reload new groups on my user without +restarting my compositor or maybe I just wanna troll somebody. + +You essentially just need to set a few environment variables to access the +graphical session and be the same user. + +Wayland +XDG_RUNTIME_DIR=/run/user/1000 +WAYLAND_DISPLAY=wayland-1 + +X11 +DISPLAY=0 + +You might have to adjust the userid or display number based on your setup. + +This only deals with the most basic display things. If there are further +libraries and/or utilities like a polkit, you'll additionally have to link +that.