Kodibuntu - external usb drives automount script location?
#1
Can someone please help me provide file location of script (config file) responsible for automounting external USB drives to /media in Kodibuntu? is it udev rule or something else?
Thanks
Reply
#2
It's no script. Kodi itself automounts them using udisks with standard ruleset. You could always use udisks-glue to define your own rules and let the the udisks-glue daemon mount them instead. And you can also do it with pure udev. (But use udev to call udisks instead of mounting directly or Kodi won't be able to eject) or you could use udevil. Lots of possibilities and google is your friend.
Reply
#3
Thanks, I've kinda figured out that code is in Kodi instead of any system script or rule.
Do you know if it's possible to show other mount points in kodi like standard mounts for USB external drives.

For example I use udev with fuse mount from virtual file: /dev/loop0 /media/FILE-MOUNT fuseblk rw,nosuid,nodev,allow_other,blksize=4096 0 0

When I connect standard USB drive Kodi automounts it to /media/LABEL and creates node with drives LABEL name in Kodi Libraries (accessible through File Manager , Video Library - Files etc) if you disconnect the drive the node also disappears (or you can remove it safely through context menu)
Is it possible to achieve the same with udev rules for other mounts in /media for example?
I am able to mount to /media but Kodi won't create a node with LABEL name in Library like with USB drives. I know I can create sources manually, but I really like the idea that you only see what's actually connected/mounted and there is no clutter in File lists.

Code:
20:44:10 T:139747557484608   DEBUG: UDisks: Is not able to mount DeviceUDI /org/freedesktop/UDisks/devices/loop0: IsFileSystem true HasFileSystem ntfs IsSystemInternal true IsMounted false IsRemovable false IsPartition false IsOptical false

vs

Code:
20:59:03 T:140362936174656   DEBUG: UDisks: Is not able to mount DeviceUDI /org/freedesktop/UDisks/devices/sdc: IsFileSystem false HasFileSystem  IsSystemInternal false IsMounted false IsRemovable false IsPartition false IsOptical false
20:59:04 T:140362936174656   DEBUG: UDisks: Mounting /org/freedesktop/UDisks/devices/sdc1
20:59:06 T:140362936174656   DEBUG: UDisks: Successfully mounted /org/freedesktop/UDisks/devices/sdc1 on /media/USB-DRIVE
20:59:06 T:140362936174656    INFO: UDisks: Added /media/USB-DRIVE
Reply
#4
figure it out,just added:
Code:
ENV{UDISKS_SYSTEM_INTERNAL}="0", ENV{ID_DRIVE_DETACHABLE}="1"
to udev rule for loop* devices and it works like usb drives Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Kodibuntu - external usb drives automount script location?0