Inserting DVD asks for root password every time. Same thing when ejecting.
How can I remove this? (and is it safe to do so)
I added myself to the cdrom group but that didn’t help.
Inserting DVD asks for root password every time. Same thing when ejecting.
How can I remove this? (and is it safe to do so)
I added myself to the cdrom group but that didn’t help.
Are you fully up to date?
Sounds lie a problem in polkit that was supposed to be fixed
Yes.
Sounds lie a problem in polkit that was supposed to be fixed
I added
org.freedesktop.udisks2.filesystem-mount auth_admin:auth_admin:yes
org.freedesktop.udisks2.eject-media auth_admin:auth_admin:yes
to /etc/polkit-default-privs.local and now it seems to work as I want.
But is that the right thing to do or am I doing something unsecure?
But that should be the default.
Did you change the security level of your system to secure or paranoid?
Then it is to be expected that you need the root password for mounting/ejecting DVDs.
For being unsecure, those settings apply to all external medias (not only DVDs) and all users. So now every user of the system can mount/eject CDs, DVDs, USB sticks/drives, … like on a default installation.
You have to decide yourself if that is too unsecure for you or ok.
Yes, secure.
Then it is to be expected that you need the root password for mounting/ejecting DVDs.
For being unsecure, those settings apply to all external medias (not only DVDs) and all users. So now every user of the system can mount/eject CDs, DVDs, USB sticks/drives, … like on a default installation.
You have to decide yourself if that is too unsecure for you or ok.
Thanks wolfi!
BTW what do I have to do to make the command “eject cdrom” work too? Currently I am getting:
# eject cdrom
umount: /var/run/media/<username>/<dvd_label>: umount failed: Operation not permitted
eject: unmount of `/var/run/media/<username>/<dvd_label>' failed
but at the same time I can eject from Dolphin.
I doubt that eject uses polkit…
You could set it suid root (do that in /etc/permissions.local so it won’t get reverted when installing updates) so that it is actually run as root instead of the user. But that’s another security risk, and isn’t even necessary on a normal installation with the normal security level.
Maybe try to use /usr/lib64/kde4/libexec/kdeeject instead.
Thanks. That worked like this:
# /usr/lib64/kde4/libexec/kdeeject cdrom
Service 'org.kde.kdesktop' does not exist.
(and the device got ejected)
Is that message normal? I don’t know what it means.
Apparently yes. I get it here on 13.2 as well.
I don’t know what it means.
Looks like it tries to contact kdesktop.
Seems to be a “bug”, but should be harmless.
kdesktop is/was KDE3’s desktop “application”. It doesn’t even exist anymore in KDE4, as it (and kicker, the panel) was replaced by/incorporated into Plasma.
Hm. I just saw something more.
The first time I tried kdeeject was without DVD in the drive.
Now when I tried with a DVD inside it - it doesn’t eject but an error dialog box pops up and says it failed (and this time the console message is not there).
Should I report a bug?
“/usr/lib64/kde4/libexec/kdeeject” is a shell script which contains the following code snippet:
if test $? -eq 0; then
qdbus org.kde.kdesktop /Desktop refreshIcons
exit 0
elif test $quiet -eq 0; then
kdialog --title "KDE Eject" --error "Eject $1 failed!"
fi
Do not know if the person mentioned in the script is currently responsible for its maintenance.
Yeah, right.
I should have noticed this myself…
if test $? -eq 0; then
qdbus org.kde.kdesktop /Desktop refreshIcons
exit 0
elif test $quiet -eq 0; then
kdialog --title "KDE Eject" --error "Eject $1 failed!"
fi
So it just tries to refresh the icons on the desktop. Strange, because KDE3 never used DBUS (it had its own similar thing called DCOP), so maybe that’s a left-over or hasn’t been fully/correctly ported, or KDE4/Plasma actually did register a org.kde.kdesktop service in its early versions.
Anyway, not critical at all, or even problematic. If you want to you can remove that line from the script, but I would suggest to copy it to ~/bin/ or /usr/local/bin/ first to avoid your changes being overwritten by updates. This will also allow you to just call kdeeject instead of /usr/lib64/… .
OTOH, that script only calls eject anyway (on Linux that is), so I’m not sure why it would work and eject itself not.
Do not know if the person mentioned in the script is currently responsible for its maintenance.
Well, David Faure is still very active, he actually is the release manager of KDE Frameworks5.
But kdeeject has been dropped, so I’d consider the KDE4 version as unmaintained. But then, kdebase4-runtime (which contains it) is still officially supported and released as part of “KDE Applications”, so it might make sense to file a bug report.
I tried to send to the email given in the script and I got auto reply from mailer daemon:
"Delivery to the following recipient failed permanently:
(email address hidden)
Technical details of permanent failure:
DNS Error: Address resolution of mandrakesoft.com. failed: DNS server returned answer with no data"
…
Don’t. That’s not really good practice.
Better open a bug report at http://bugs.kde.org/.
Also I suppose that error message is expected. “Mandrakesoft” don’t exist since 2005 and Mandriva (the successor) also doesn’t exist any more since some months.
See Mandriva Linux - Wikipedia.
The last release of Mandriva Linux was in August 2011. Most developers who were laid off went toMageia.[5]](Mandriva Linux - Wikipedia)In May 2015, Mandriva went into administration;[6]](Mandriva Linux - Wikipedia) as of the 27th of May the organisation website was offline.
and
In April 2005, Mandrakesoft announced the corporate acquisition of Conectiva, a Brazilian-based company that produced a Linux distribution for Portuguese-speaking (Brazil) and Spanish-speaking Latin America. As a result of this acquisition and the legal dispute with Hearst Corporation, Mandrakesoft announced that the company was changing its name to Mandriva, and that their Linux distribution Mandrake Linux would henceforward be known as Mandriva Linux.[10]](Mandriva Linux - Wikipedia)
Thanks wolfi. I can send a bug report to kde team but which component is that? (i have to pick when submitting)
Good question.
I just noticed that kdeeject actually hasn’t been dropped in KF5, it is part of the package kde-cli-tools5 (and it still has the same bug, and the same wrong email address).
So the correct component would be kde-cli-tools.
Btw, the “KF5 version” is installed as:
/usr/lib64/libexec/kf5/kdeeject
I did look for it before suggesting the KDE4 version, but did not find it for some strange reason…:\
Thanks.
Actually this ejects the device both with and without DVD in it, so it is better than the kde4 version:
/usr/lib64/libexec/kf5/kdeeject cdrom
Service 'org.kde.kdesktop' does not exist.
but I will report the message as a bug.
I see I have to specify a version too. How do I find that? There is no Help/About and no --help in cli.
Hm?
They are exactly the same here, byte for byte…
amiga:/home/wolfi # diff -u /usr/lib64/libexec/kf5/kdeeject /usr/lib64/kde4/libexec/kdeeject
amiga:/home/wolfi #
I see I have to specify a version too. How do I find that? There is no Help/About and no --help in cli.
# rpm -q kde-cli-tools5
kde-cli-tools5-5.5.3-101.1.x86_64
So that’s 5.5.3 in my case.
Or look in YaST.
But it has the same version as Plasma5 anyway.
Thanks. Reported: