View Full Version : Calibre on linux: root password for unmounting?


mhomann
02-03-2011, 03:41 AM
Hi there,

how do i get calibre on linux to not ask me for the root password on unmounting the device? my linux user account is set up to use sudo with my own password instead.

theducks
02-03-2011, 09:50 AM
Hi there,

how do i get calibre on linux to not ask me for the root password on unmounting the device? my linux user account is set up to use sudo with my own password instead.

What flavor Linux (and version number).?

That is NOT normal on the 8., 9.,10. Ubuntu versions (32 bit Intel)

mhomann
02-03-2011, 09:57 AM
calibre 0.7.43 on opensuse 11.3...

kovidgoyal
02-03-2011, 10:00 AM
Make sure you are using the official calibre binary from calibre-ebook.com and not the distribution provided package.

theducks
02-03-2011, 10:24 AM
calibre 0.7.43 on opensuse 11.3...

Thank you (the Guru's of Suse Linux will be by :) )

and

Welcome to MR

mhomann
02-03-2011, 10:37 AM
kovidgoyal: make sure the official binary package comes with an uninstaller and conforms to LSB2 standards.... also, make sure that the sources build properly when not building as root user.

kovidgoyal
02-03-2011, 10:44 AM
mhonman: Good luck getting help.

mhomann
02-03-2011, 10:52 AM
kovidgoyal: I'm trying to build a properly working package of calibre for openSUSE here, you should be encouraging that (like you seemed to be in another thread where you were pointing people at "the packages that came with your linux distribution" when people asked about how to uninstall...)

kovidgoyal
02-03-2011, 10:57 AM
I dont encourage that. In my experience, distro packages of calibre never work correctly. calibre is simply too complex and has too many dependencies for traditional linux package management to keep up.

mhomann
02-03-2011, 11:00 AM
does that mean that calibre is more complex than the whole rest of a distribution?

kovidgoyal
02-03-2011, 11:09 AM
Sigh. The vast majority of software in a linux distribution is slow moving and has a relatively small number of slow moving dependencies.

The typical linux package management infrastructure is well suited to managing this kind of software.

calibre is both extremely fast moving and relies on cutting edge functionality from several dependencies. Package management simply cannot keep up. That is why I provide an "application bundle" version of calibre with all needed dependencies. The number of tickets that I have to waste my time with from linux users using distro provided packages is ridiculous given that only 5% of calibre users use linux. Hence my standard policy of closing all such tickets with the recommendation to install the official calibre binary.

Don't get me wrong, central package management is great, when it works, it just doesn't work for calibre. If you want to help with calibre packaging, I suggest you work on the official installer, add an uninstaller if you feel like that's what you want.

mhomann
02-03-2011, 11:41 AM
just for the sake of the experiment, I get prompted for the root password by the official binary as well.

"Action: unmount a disk mounted by a different user" is what details I get.

kovidgoyal
02-03-2011, 05:22 PM
Good, then I'm happy to help. Unmounting in calibre happens in two stages

1) calibre tries to use udisks

2) If udisks is not available a setuid root executable calibre_mount_helper is used which simply calls eject

Most likely automounting on your system happens in a way that causes udisks to prompt you for permission.

mhomann
02-05-2011, 04:35 AM
solved. had to set a Policykit rule that allows user.org.freedesktop.udisks.filesystem-unmount-others for the active user without password.

that being fixed, now I have a rpm package for openSUSE that works (for me) as good as the official binary ^^

kovidgoyal
02-05-2011, 11:26 AM
Cool, note that I don't claim its impossible to produce a distro package that works as well as the official binary, I do claim its very difficult to keep it working over time.