How to use udisks2 with Kodi 18?
#1
Hello,

I want to use udisks2 with Kodi 18a2.

udisks1 worked well without additional configuration. With udisks2 the plugin of an USB device is detected but I'm not able to unmount. It also does not appear in the main menu.

What is wrong?
Reply
#2
Are you running without a desktop? -> missing polkit permissions?
Reply
#3
I didn't know that I need new permissions, now. I didn't need them with "udisks1".

Do you have more information about how to set up the permissions?

To get the permissions directly: Do I need a full desktop or is it enough to open a "kodi" session using "Light DM"?
Reply
#4
you always need permissions for udisks, but udisks2 changed those. On a normal desktop, but get those from the WM.
For kodi standalone see the polkit file in https://forum.kodi.tv/showthread.php?tid=231955
Reply
#5
I'll try that and report back.

For some reason mounting works but in file manager the context menu isn't shown, which makes it impossible to unmount. Maybe this is fixed with the permissions file.
Reply
#6
Still no success.

Does here actually someone have a context menu for the USB storage device in file manager?

Everything works but I'm not able to unmount the USB memory stick I'm using for testing.

Would have been nice to use "up-to-date" technology but currently I tend to installing udisks1 again.

This is all that I have about udisks in kodi.log.

[root@manuelsvdr temp]# grep -i udisks kodi.log
11:44:00.753 T:140411214345216   DEBUG: UDisks2: Mounting /dev/sdc1
11:44:02.870 T:140411214345216    INFO: UDisks2: Added /run/media/kodi/4E0C-F857

Is unmounting actually part of the implementation?
Reply
#7
https://trac.kodi.tv/ticket/17978#ticket

There should be at least an error message "somewhere".
Reply
#8
Just add it. You use, you build it, you are asked to contribute. Thx in advance.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#9
I have no idea about what the requirements are that the context menu gets visible and I have no background knowledge about udisks2 at all.

Can someone at least give some basic information about the requirements for getting the context menu, so I can throw in some printf debug messages?
Reply
#10
First check your permission. After you plugged it in, try with udisksctl to umount it from command line with the very same user. Start with udisksctl status and udisksctl dump
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#11
Even recompiled my kernel with usb-storage support for you. Works as it should: https://www.dropbox.com/s/sdksqj3xvpfz2q...0.png?dl=0 udisks2 on ubuntu with persmission wsnipex told you at the beginning.

Quote:[Actions for user running kodi]
Identity=unix-user:kodiuser
Action=org.freedesktop.login1.*;org.freedesktop.UDisks2.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#12
I run my own builds straight from Kodi git on rpi3 and rock64.
On both udisks2 mounting and unmounting works as expected without need for weird hacks or patches ,just the perms for polkit as mentioned already.
Reply
#13
You never know what Arch makes on day + 1 or how day - 1 worked.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#14
If its archlinux we are talking about - they use newer polkit which uses javascript based syntax, the rule linked here won't work.
Something like this is needed https://www.dynacont.net/documentation/l..._mounting/
And similar for u(n)mount.
http://storaged.org/doc/udisks2-api/2.7....tions.html
Reply
#15
Yeah. I hope the archers can do that transformation ... as this is far beyond what kodi should do. Administrating own system should be a standard task. Alternatively run kodi on Android or LibreELEC or something ...
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply

Logout Mark Read Team Forum Stats Members Help
How to use udisks2 with Kodi 18?0