on most file managers (thunar, caja, nautilus), usually on the left pane, there are 'devices' group and 'network' group.
double-clicking an entry in any group will make that entry to be mounted.
'devices' group contains usb drives or partitions that aren't automatically mounted on boot.
they are mounted to /run/media/..
'network' group contains samba shares.
they are mounted to /run/user/USERNAME/gvfs/..
here's the question : What is the full command used by file managers to mount those drives/shares? I want to mount them as they are mounted by those file managers.
I know how to mount them with `mount` command but it requires root privilege unless I add 'user' option to an entry in /etc/fstab. And I can't add 'user' to all thumbdrives and samba shares on network.
[SOLVED]How to mount using gvfs/udisks
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
[SOLVED]How to mount using gvfs/udisks
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: How do i mount as file manager does, in command-line?
I believe the automounting on the system is handled by udisks instead of the mount command so check out "man udisks" in a terminal for some help with that, alternatively for better automatic control you should be looking at "man fstab" which is the boot mounting configuration. There are plenty of guides online for that so do a quick google and see how you get on
Quick Tip: Add the "noauto" option to a fstab line so it can be mounted by root at any time
Quick Tip: Add the "noauto" option to a fstab line so it can be mounted by root at any time
Re: How do i mount as file manager does, in command-line?
To mount a samba share:
To stick with the gvfs method, to mount a partition:
But most folks mount partitions with udisks:
Code: Select all
gvfs-mount smb://server-name/share-name
Code: Select all
gvfs-mount -d /dev/sdxy
Code: Select all
udisks --mount /dev/sdxy
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: How do i mount as file manager does, in command-line?
I did some searching on this myself. Thanks anyway for your comprehensive answers.
to mount partitions into /media/USERNAME (not /media), use udisksctl.
udisksctl mount -b /dev/sda1
udisksctl unmount -b /dev/sda1
to mount partitions into /media/USERNAME (not /media), use udisksctl.
udisksctl mount -b /dev/sda1
udisksctl unmount -b /dev/sda1
Code: Select all
$ udisksctl mount -b /dev/sda1
Mounted /dev/sda1 at /media/thkang/xxx
$ udisksctl unmount -b /dev/sda1
Unmounted /dev/sda1.