xfce4-mime-helper sets wrong value to DISPLAY env variable
I am using sway (wayland) and also use Thunar. It turns out that Thunar uses xfce4-mime-helper
for opening files with apps. For instance, there is an action on directory, "open in terminal", which can be triggered manually by
xfce4-mime-helper --launch TerminalEmulator
Problem is, some (especially Qt) apps crash with SIGSEGV when launched from Thunar. I determined the cause, which is that xfce4-mime-helper sets DISPLAY
env variable to wayland-1
, instead of leaving it to be :1
. This happens between these lines:
https://gitlab.xfce.org/xfce/xfce4-settings/-/blob/master/dialogs/mime-settings/xfce-mime-helper.c#L426 https://gitlab.xfce.org/xfce/xfce4-settings/-/blob/master/dialogs/mime-settings/xfce-mime-helper.c#L437
I would be happy to fix the issue, however I'm not sure what is the correct solution. Why is there display setting in the first place?
System configuration:
~ $ cat /etc/os-release | head -n 4
NAME="Fedora Linux"
VERSION="35 (Thirty Five)"
ID=fedora
VERSION_ID=35
~ $ xfce4-mime-helper --version
xfce4-settings 4.16.2 (Xfce 4.16)