USB Automounting
#1
I'm using Kodi on CentOS 7 as a standalone xsession, I'd like to be able to automount usb drives when inserted and likewise for optical disks.

I'm aware that kodiubuntu uses the usbmount package, but that is ubuntu/debian only.

Has anyone had any success with automounting on other distros?
Reply
#2
Bump
Reply
#3
as long as something provides the necessary dbus interfaces (iirc UDisks is the latest incarnation), it should be completely distro-agnostic. you likely have to start the service providing it (udisksd) in your session.
Reply
#4
Yeah it doesn't appear to work by itself - I'm using the Kodi xsession provided. Shouldn't that provide the necessary dbus interface by default?
Reply
#5
1. verify that udisksd or udevil is running. kodi doesn't start it for you
2. in standalone mode, you probably don't have any polkit auth agent running, so you need to create polkit permission overrides.
see http://forum.kodi.tv/showthread.php?tid=231955
Reply
#6
Udisksd is running, I don't have udevil installed. Polkit rules are already in place and the kodi user can poweroff, shutdown etc...

Is the issue that I'm using udisks2 instead of udisks? udisks2 replaces udisks on Fedora 22 >=...
Reply
#7
did you check the kodi.log?

alternatively, I'm using udev only for automounting:
http://pastebin.ubuntu.com/13316383/
Reply
#8
Kodi's udisks won't work for udisk2.

Use udevil + devmon as described somewhere else.

Edit: Or of course what wsnipex suggested.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#9
Thanks both, I'd already experimented with both of those options. Pure udev rules don't work because they mount everything under root and due to the default umask those directories are then inaccessible to the Kodi user.

Devmon works but it has to be launched via a user session, which is fine but I can't get it to exit on logout. Meaning if I log out and log in as another user the script continues to run as the Kodi user and the mounts are owned by that user.

Are there any plans for udisks2 support?
Reply
#10
pure udev works fine. you just have to have appropriate permissions set on the mount dirs.
Or add user=[youruser] to ENV{mount_options}, or add another RUN+=chown youruser:yourgroup /media/%E{dir_name}
Reply

Logout Mark Read Team Forum Stats Members Help
USB Automounting0