[Xfce-bugs] [Bug 14812] Thunar shows all fstab entries in devices in the Shortcuts Side Pane

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Sat Feb 29 20:10:26 CET 2020


https://bugzilla.xfce.org/show_bug.cgi?id=14812

--- Comment #10 from Bakhelit at gmail.com ---
So, I finally assembled what I found when looking at how gvfs is used in Thunar
source code.

The previous attachment has notes that describe my search in 6 steps - just in
case someone more qualified wants to check more quickly whether I missed
something important.

Here is a summary:

>From the found information it seems that Thunar checks gvfs availability
(attachment step 4) in a way that is independent of user privilege checks
(attachment steps 1-3). Also all gvfs availability checks I found are basically
done just to decide which items or actions to show or use in context menus,
dialogs and some other places (most of the items and actions are related to
resolving the "Trash vs Delete" case or similar stuff). But I did not find any
gvfs availability checks that would influence how the devices are loaded into
the DEVICES section in the Shortcuts Side Pane.

After looking at how DEVICES shortcuts are handled in Thunar (attachment steps
5 and 6) it seems to me that gvfs is basically used indirectly by Thunar
probably via the gio volume monitor in "thunar_device_monitor_init" function in
"./thunar/thunar-device-monitor.c". Could it be that gio volume monitor (or
gvfs itself) is smart enough to disable gvfs in root Thunar or is gvfs just
broken so much that it appears disabled in this case (i.e. root application
using gvfs in a non-root XFCE session)?

The end result however is that without the complete gvfs functionality Thunar
does not properly filter the devices in the DEVICES section in the Shortcuts
Side Pane and it results in the problems I reported initially. Only filtering
of devices that is done by Thunar is based on the "hidden-devices" preference
and on "can_eject || can_unmount || is_removable || can_mount" values in
"thunar_device_monitor_volume_is_visible" function in
"./thunar/thunar-device-monitor.c". Note that gvfs functionality seems not to
be available under the root user and also may be unavailable under a non-root
user if gvfs is not installed. So in my opinion using Thunar without the gvfs
should be considered a plausible scenario that may not be the most common, but
is still valid and useful.

I already implemented my workaround script that injects the unwanted device IDs
into "hidden-devices" in my "thunar.xml". But it would be very nice if the info
in this bug report helps you with some future version of Thunar that is going
to improve the device filtering by excluding redundant devices such as "/",
"/boot/" etc. or improve the "hidden-devices" and "hidden-bookmarks" mechanism,
so that one can easily hide shortcuts using URI with wildcards (e.g.
file:///home/*). However, it is not really urgent since I am fine with using
the workaround for now and I am happy to at least know a bit about how nice
Thunar source code is:).

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Xfce-bugs mailing list