-
-
Notifications
You must be signed in to change notification settings - Fork 53
Description
Qubes OS release
R4.3
Brief summary
Whonix modifies the XDG_DATA_DIRS
environment variable via scripts in /etc/profile.d
(and /etc/zprofile.d
). These modifications allow Whonix to customize things such as default application associations. These changes are picked up by Qubes OS and do appear in login shells, but somehow XDG_DATA_DIRS
(and to my awareness, only XDG_DATA_DIRS
) is reset to a "minimal" set of directories in applications that are opened from the Qubes app menu. This results in all of Whonix's file association settings usually being ignored.
Steps to reproduce
- Install a Whonix-Workstation 18 template.
- Create an AppVM based off this template, and launch QTerminal in it.
- Run
echo $XDG_DATA_DIRS
. - Open Qube Manager, select the Whonix-Workstation 18 AppVM, and click "Open console in qube".
- Log in as "user" (no password required), then run
echo $XDG_DATA_DIRS
.
Expected behavior
In both instances, echo $XDG_DATA_DIRS
should output /usr/share/usability-misc/xdg-override/:/usr/share/anon-apps-config/share/:/usr/share/open-link-confirmation/xdg-override:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/
or similar.
Actual behavior
In the DispVM console, echo $XDG_DATA_DIRS
outputs the expected value, but in QTerminal, the returned string is /home/user/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/
.
Additional information
This is contributing to an issue, where clicking on the Qubes Domains widget in the system tray, hovering over a Whonix-Workstation 18 qube, and clicking "Open File Manager" opens Catfish File Search rather than PCManFM-Qt. Whonix ships a file at /usr/share/usability-misc/xdg-override/applications/defaults.list
that is supposed to set the default application for inode/directory
to pcmanfm-qt.desktop
. Right now that file is out-of-date and is pointing to thunar.desktop
instead, but even when it is changed to point to pcmanfm-qt.desktop
, Catfish still opens when clicking this button in the widget. Running xdg-open $HOME
in QTerminal also opens Catfish. However, running DISPLAY=:0 xdg-open $HOME
in the DispVM console opens PCManFM-Qt as expected. (Granted, it looks awful because QT_QPA_PLATFORMTHEME='lxqt'
is strangely not being set properly, but that's an unrelated issue.)
The only thing I see in Qubes' code that looks like it modifies XDG_DATA_DIRS
is https://github.com/QubesOS/qubes-core-agent-linux/blob/bffc6e0d0df3874781c0feda8297be5063fabba1/qubes-rpc/qubes.StartApp. Could this be part of the issue?