Where can I find an actual command line text, which is executed during
this operation?
What you want should look like this:
udisksctl mount -b /dev/sdxy
Can I modify/adjust this line for my needs?
Yes, see man udisksctl
.
Notice on Ubuntu, this is handled by udisks
and usually tracked/managed by gvfsd
.
However modifying the default behavior of those daemons/services is not recommended and you should, instead, consider using udisksctl
as a command in your custom script/shortcut for mounting/unmounting filesystems actions or adding udev
rules for actions other than mounting/unmounting filesystems.
That said, ...
What do you want to achieve?
Is it, for example, to set read-only ro
mount option as the default for "all" automatically mounted media? ...
Refer to /etc/udisks2/mount_options.conf.example
and create/edit /etc/udisks2/mount_options.conf
to look like this:
[defaults]
# # common options, applied to any filesystem, always merged with specific filesystem type options
defaults=ro
allow=exec,noexec,nodev,nosuid,atime,noatime,nodiratime,ro,rw,sync,dirsync,noload
... or is it, for example, to set read-only ro
mount option as the default for "a specific" automatically mounted media/disk/partition? ...
Hove a look at /dev/disk/by-*
in order to identify your target media/disk/partition device and use that as follows ...
Refer to /etc/udisks2/mount_options.conf.example
and create/edit /etc/udisks2/mount_options.conf
to look like this:
[/dev/disk/by-partuuid/30ea9e87-01]
# # Options, applied to a specific partition by partition uuid
defaults=ro
allow=exec,noexec,nodev,nosuid,atime,noatime,nodiratime,ro,rw,sync,dirsync,noload
... or do you prefer "a more portable, independent and powerful" media/disk/partition mounting/unmounting way? ...
See Different behaviour of bash script in udev
ro
? – HEKTO Jan 12 '24 at 00:09udisksctl mount -o ro -b /dev/sdxy
– Raffa Jan 12 '24 at 11:18/etc/udisks2/mount_options.conf
. Is it the correct one? – HEKTO Jan 12 '24 at 22:50ro
option is not X for me, it's just an example... I asked about how the mounting works and how to configure it - in case I double-click an icon in GUI. I had no idea aboutudisks
... Anyway, your answer became very useful, and I'm accepting it – HEKTO Jan 13 '24 at 19:02