Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Best-Of] Assorted Mount testing

Here you can discuss every aspect of Debian. Note: not for support requests!
Post Reply
Message
Author
CwF
Global Moderator
Global Moderator
Posts: 2719
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 201 times

[Best-Of] Assorted Mount testing

#1 Post by CwF »

I wanted to iron out my understanding of what is needed for a minimal install to mount a thumbdrive. My prior minimalist solution was pmount and the plugdev group. Using systemd-mount elsewhere for tmpfs mounts I finally eureka'ed the question of why I was using pmount.

Test case is a 1007 package bookworm XFCE. Note that fuse(3), udisk2, gvfs, sudo, and a few dozen of their dependencies are not installed. So I removed pmount and removed the user from plugdev.

Code: Select all

# gpasswd -d user plugdev
I use a vm, so I pass a usb drive to the vm using virt-viewer's interface. The VM is remote, the usb local.

Of course nothing shows up on the desktop without gvfs installed. The user lsusb see's it, and with a label it is enumerated in /dev/disk/by-label.

I now need to add a polkit rule, I do so in my chosen /etc/polkit-1/localauthority/30-site.d/42-users.pkla rule file using a root thunar to navigate and clicking opens the file in a root mouspad so I can add
org.freedesktop.systemd1.manage-units;

Code: Select all

[User Permissions]
Identity=unix-user:user;
Action=org.xfce.xfce4-terminal;com.ubuntu.pkexec.synaptic;org.xfce.mousepad;org.xfce.thunar;more_here;
ResultActive=yes
Result of root GUI easyButtons...

Code: Select all

$ systemd-mount /dev/disk/by-label/USB_POOL ~/Public
Started unit home-user-Public.mount for mount point: /home/user/Public
$ systemd-umount /dev/disk/by-label/USB_POOL
Stopped unit home-user-Public.mount for mount point: /home/user/Public
Go ahead, shoot me root GUI haters, I happen to know you'll miss....

lindi
Debian Developer
Debian Developer
Posts: 452
Joined: 2022-07-12 14:10
Has thanked: 1 time
Been thanked: 88 times

Re: [Best-Of] Assorted Mount testing

#2 Post by lindi »

What is root GUI easyButtons?

CwF
Global Moderator
Global Moderator
Posts: 2719
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 201 times

Re: [Best-Of] Assorted Mount testing

#3 Post by CwF »

lindi wrote: 2023-08-27 21:45 What is root GUI easyButtons?
a poor expression!
Some that know me ask where the easyButton is. Instead of convoluted terminal commands devolving into a 'how do I get root' question devolving into a don't use gui's as root....and so on.
I'll make a easyButton, or maybe a systemd automount unit in this case...

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1412
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 46 times
Been thanked: 70 times

Re: [Best-Of] Assorted Mount testing

#4 Post by None1975 »

CwF wrote: 2023-08-27 18:49 Of course nothing shows up on the desktop without gvfs installed.
Gvfs is not needed for mounting usb sticks. The Gnome virtual filesystem (gvfs) provides mounting and trash functionality. GVFS uses udisks2 for mounting functionality and is the recommended solution for most file managers. But in Debian, the udisks2 package is independent of gvfs, so it can be freely installed and used without gvfs junk.

For trash functionality i would recommend using package trash-cli.

Particularly where using - or intending to use - a lightweight environment, it should be noted that more file manager features and functions will usually mean the use of more memory.
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

CwF
Global Moderator
Global Moderator
Posts: 2719
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 201 times

Re: [Best-Of] Assorted Mount testing

#5 Post by CwF »

None1975 wrote: 2023-09-20 16:10 Gvfs is not needed for mounting usb sticks
Yes, I used pmount with a user in plugdev for a long time. Now, systemd which also does not require udisk2. Without gvfs it still doesn't show on the desktop, which I don't need it to.

Post Reply