Xwayland applications cannot be launched from thunar because of improper $DISPLAY
- OS: Arch Linux with sway and Fedora Workstation 35
- Thunar version: 4.16.10
Under Wayland, when applications are launched from thunar (by right click->launch or through a custom action), $DISPLAY is incorrectly set to the $WAYLAND_DISPLAY value instead of preserving the old value. This prevents Xwayland from working.
Step to reproduce
- Open a terminal and run:
$ env | grep DISPLAY
DISPLAY=:0
WAYLAND_DISPLAY=wayland-1
- Launch thunar.
- Right click->Open Terminal Here.
- Run the previous command in the new terminal:
$ env | grep DISPLAY
DISPLAY=wayland-1
WAYLAND_DISPLAY=wayland-1
- Launch an X11 only program from here:
$ xeyes
Error: Can't open display: wayland-1