Posts: 56
Joined: Jun 2015
Reputation:
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?
Posts: 1,506
Joined: Nov 2013
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.
Posts: 56
Joined: Jun 2015
Reputation:
1
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?
Posts: 56
Joined: Jun 2015
Reputation:
1
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 >=...
Posts: 23,468
Joined: Aug 2011
Reputation:
1,100
fritsch
Team-Kodi Developer
Posts: 23,468
2015-11-17, 21:55
(This post was last modified: 2015-11-17, 21:56 by fritsch.)
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.
Posts: 56
Joined: Jun 2015
Reputation:
1
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?
Posts: 7,658
Joined: Jun 2011
Reputation:
288
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}