Project

General

Profile

[SOLVED] Automount dont work scince i switched to openrc

Phosit - about 3 years ago -

I use sway and pcmanfm-qt. I added myself to the disc and storage group.

When i was using systemd, if I started pcmanfm-qt and pluged in the USB-flash-drive it is automatically mounted to /run/media/phosit/.


Replies (12)

Automount dont work scince i switched to openrc - bill-auger - about 3 years ago -

offhand, i think you will need to install udev-init-scripts and
some polkit, for that to work

RE: Automount dont work scince i switched to openrc - Phosit - about 3 years ago -

udev-init-script and polkit is instaled.

/etc/polkit-1/rules.d/50-automount.rules

polkit.addRule(function(action, subject) {
    if ((action.id == "org.freedesktop.udisks2.filesystem-mount-other-seat" ||
        action.id == "org.freedesktop.udisks2.filesystem-mount-system" ||
        action.id == "org.freedesktop.udisks2.filesystem-mount" ||
        action.id == "org.freedesktop.udisks2.power-off-drive") &&
        subject.isInGroup("storage")) {
        return polkit.Result.YES;
    }
});

RE: Automount dont work scince i switched to openrc - bill-auger - about 3 years ago -

your situation may be related to this bug report:

https://labs.parabola.nu/issues/1636

in that case, installing the 'gvfs' package allowed the
mouse-mount feature work

also check that the feature is enabled - open the pcmanfm file
manager and use the menu to find:

edit -> preferences -> volume management

then make sure the 'mount removable media automatically' is
checked

RE: Automount dont work scince i switched to openrc - Phosit - about 3 years ago -

The 'mount removable media automatically' is checked.

It isn't related to the bug. The device isn't shown in the sidebar and 'gvfs' is installed.

I have the same problem on my second machine. The error seams relatet to udev and btrfs.

dmesg:

[    3.530004] udevd[890]: failed to execute '/lib/udev/${exec_prefix}/bin/udevadm' '${exec_prefix}/bin/udevadm trigger -s block -p ID_BTRFS_READY=0': No such file or directory

RE: Automount dont work scince i switched to openrc - bill-auger - about 3 years ago -

installing 'udiskie' may help

also, the openrc guide suggests that the following group memberships are important for hardware support:

audio video optical storage disk sys

RE: Automount dont work scince i switched to openrc - Phosit - about 3 years ago -

It is not related to the udev dmesg error.

RE: Automount dont work scince i switched to openrc - bill-auger - about 3 years ago -

the first thing to look at is the dmesg log -
make sure the USB drive is unplugged then run:

$ dmesg --follow

then plug in the USB drive and notice the messages -
some important ones may resemble these:

* new high-speed USB device number 3 using ehci-pci
* New USB device found, idVendor=058f, idProduct=6387, bcdDevice= 1.00 
* USB Mass Storage device detected
* registered new interface driver usb-storage
* registered new interface driver uas
* [sdc] Attached SCSI removable disk

note the '[sdc]' - that may be 'sdb' or something else -
then look for its device file:

$ ls /dev/sdc*
/dev/sdc  /dev/sdc1  /dev/sdc2

if that looks good, try mounting it and inspecting the contents:

$ sudo mount /dev/sdc1 /mnt
$ ls /mnt/

RE: Automount dont work scince i switched to openrc - Phosit - about 3 years ago -

The output of dmesg is:

* usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
* usb 2-1: New USB device found, idVendor=1f75, idProduct=0917, bcdDevice= 0.01
* usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
* usb 2-1: Product: Intenso Speed Line
* usb 2-1: Manufacturer: Innostor
* usb 2-1: SerialNumber: 000000000000001965
* usb-storage 2-1:1.0: USB Mass Storage device detected
* scsi host2: usb-storage 2-1:1.0
* usbcore: registered new interface driver usb-storage
* usbcore: registered new interface driver uas
* scsi 2:0:0:0: Direct-Access     Intenso  Speed Line       1.00 PQ: 0 ANSI: 6
* sd 2:0:0:0: [sda] 30924800 512-byte logical blocks: (15.8 GB/14.7 GiB)
* sd 2:0:0:0: [sda] Write Protect is off
* sd 2:0:0:0: [sda] Mode Sense: 23 00 00 00
* sd 2:0:0:0: [sda] Write cache: disabled, read cache: disabled, doesn't support DPO or FUA
*  sda: sda1
* sd 2:0:0:0: [sda] Attached SCSI removable disk
* BTRFS: device fsid 838a0505-5115-4635-a775-d61fcade9e2f devid 1 transid 5 /dev/sda1 scanned by udevd (2786)

/dev/sda and /dev/sda1 are present.
Manual mount also works.

RE: Automount dont work scince i switched to openrc - bill-auger - about 3 years ago -

this feature works fine for me with both pcmanfm and pcmanfm-gtk3; but only when running in an LXDE lxsession - it does not work directly on openbox - so, my guess is that the problem is related to using a window manager that the LXQT tools were not specifically designed for - probably pcmanfm-qt would behave as expected under a LXQT lxsession, just as pcmanfm behaves as expected under a LXDE lxsession - thats not to say that it is impossible to get it working, with that specific combination (openrc + sway + LXQT), but that it would take some more investigation to find out

are you certain that this works with systemd + sway + pcmanfm-qt ?
have you tried pcmanfm or pcmanfm-gtk3 ?
have you tried any other file managers, such as nautilus, thunar, dolphin ?

RE: Automount dont work scince i switched to openrc - Phosit - about 3 years ago -

Yes, systemd + sway + pcmanfm-qt worked.
pcmanfm-qt, pcmanfm-gtk3, nautilus, thunar and dolphin work on openrc + LXQT but non of them on openrc + sway.

Thunar gave me on sway an error when I attach a device:

thunar-volman: Error spawning command line “dbus-launch --autolaunch=67ba3635e3f34d9199290f183e23a7ee --binary-syntax --close-stderr”: Child process exited with code 1.

RE: Automount dont work scince i switched to openrc - Phosit - about 3 years ago -

I had to launch sway through dbus:

exec dbus-launch --sh-syntax --exit-with-session sway

It alsow works for nautilus.

Found the solution on the sway wiki: https://github.com/swaywm/sway/wiki#im-not-using-logind-but-still-want-dbuspolkitpower-management-to-work

With logind it wont automount: https://github.com/swaywm/sway/wiki/Running-Sway-without-systemd#elogind

And with the AUR Package Sway wont even start: https://aur.archlinux.org/packages/wlroots-nosystemd-git

    (1-12/12)