Skip to content

$DISPLAY environment variable is not set correctly

I am using a sway/wayland environment on arch linux. When starting foot (terminal emulator) using a sway shortcut my environment variables look like this:

$ printenv | grep DISPLAY
WAYLAND_DISPLAY=wayland-1
DISPLAY=:0

When I start foot using a thunar custom action they look like this:

$ printenv | grep DISPLAY
WAYLAND_DISPLAY=wayland-1
DISPLAY=wayland-1

Which sometimes makes applications complain about not finding a display. I found a workaround by setting the terminal custom actio to:

export DISPLAY=":0"; foot --working-directory %f

But I do wonder if this is a bug or do I miss something? Thanks

thunar --version
thunar 4.16.11 (Xfce 4.16)