For file systems on removable devices, without having to create a polkit rule you can simply add the user account to the disk group.
Code: Select all
su -l -c 'usermod -a -G disk '$USER
For file systems on removable devices, without having to create a polkit rule you can simply add the user account to the disk group.
Code: Select all
su -l -c 'usermod -a -G disk '$USER
Yo Sarge, another entry for group think! Thanks itmicp. There is a elegant simplicity in user group rights.
I may have been premature testing on this over a year back, I couldn't really find much elegance in the method.
Code: Select all
$ systemd-mount -t tmpfs -o size=100M tram ~/Public/test
Started unit home-user-Public-test.mount for mount point: /home/user/Public/test
$ df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 4088260 0 4088260 0% /dev
tmpfs 820328 1688 818640 1% /run
/dev/vda1 24663932 14376700 9180468 62% /
tmpfs 4101636 0 4101636 0% /dev/shm
tmpfs 5120 8 5112 1% /run/lock
tmpfs 820324 80 820244 1% /run/user/1001
dram 4194304 92440 4101864 3% /home/user/Downloads
tram 102400 0 102400 0% /home/user/Public/test
$ systemd-umount ~/Public/test
Stopped unit home-user-Public-test.mount for mount point: /home/user/Public/test
Confirmed, I tested without sudo/udisk/gvfs and it works the same for the user terminal while Thunar does not show 'Devices' in the left pane
You can list the paths of links using file system label names
Code: Select all
ls -l /dev/disk/by-label/
Code: Select all
username@myhostname:~$ udisksctl mount -b /dev/disk/by-label/BACKUP
Mounted /dev/sdd1 at /media/username/BACKUP
username@myhostname:~$
username@myhostname:~$ udisksctl mount -b /dev/disk/by-label/OS
Mounted /dev/sda1 at /media/username/OS
username@myhostname:~$
Code: Select all
username@myhostname:~$ udisksctl unmount -b /dev/disk/by-label/BACKUP
Unmounted /dev/sdd1.
username@myhostname:~$
username@myhostname:~$ udisksctl unmount -b /dev/disk/by-label/OS
Unmounted /dev/sda1.
username@myhostname:~$
Thanks for this. It's all very helpful. Good idea to look at the packages, lol! Actually I used to use aptitude, and it kept me more alert to dependencies. Now I use apt or apt-get and the details just kind of scroll past my eyeballs without me paying too much attention.None1975 wrote: ↑2023-09-21 11:41 .
.
In this case, I would use fstab method. Also, you can check automounting with systemd. More info here. But I've never tried this method, so I can't say anything more.
.
.
PCManFM uses same mechanism as Thunar FM. It using udisks2. Dolphin file manager uses kio (KDE Input/Output framework provides a single API for operating on files, whether local or on a remote server. Additionally, KIO Slaves provide support for individual protocols. Some particularly useful ones are http, ftp, sftp, smb, nfs, ssh (fish), man, tar and zip. ).
.
.
I think there is no need to dive into such a depth. Unless you're a programmer. It is enough to know how to use the Internet search, and reading manual pages is also very useful
.
.
I simply entered the phrasein an internet search and researched what is included in this package.Code: Select all
thunar debian package
For example this is thunar file manager with all dependencies.
Yep, thanks. Having looked at it, I think it would be overkill, even though it would probably accomplish wiw. don't think I need another daemon looking over my shoulder.
itmicp wrote: ↑2023-09-21 23:21Thanks for this. It looks like udisksctl uses polkit though. Is that by necessity?Code: Select all
user@myhostname:~$ udisksctl mount -b /dev/disk/by-label/BACKUP