Comment 4 for bug 1827778

Revision history for this message
Gordon Lack (gordon-lack) wrote :

If you are interested in a workaround...

Put this into a *.desktop file in ~/.local/share/solid/actions/

========== NOT THIS LINE ==========
# Add an entry to the Devices menus in the Taskbar to just unmount a
# device (not power it down).
# Based on code in:
# https://bugs.kde.org/show_bug.cgi?id=270808#c64
#
# Needs to be in .local/share/solid/actions/
# so just symlink to it from there....
#
# NOTE: that to power off use:
# udisksctl power-off -b /dev/sd...
# Iff we could determine whether the *whole* device is unmounted we
# could add an option for that, but we can't...
#
[Desktop Action open]
Exec=udisksctl unmount -b %d
Icon=uninstall
Name=Just Unmount device [ADDDED]

[Desktop Entry]
Actions=open
Type=Service
X-KDE-Action-Custom=true
# This would be better, but doesn't work...
#X-KDE-Solid-Predicate=[[IS StorageVolume AND StorageVolume.ignored == false] AND StorageAccess.accessible == 'true']
X-KDE-Solid-Predicate=[IS StorageVolume AND StorageVolume.ignored == false]
========== NOT THIS LINE EITHER ==========

It will add a "just unmount" option on the Device Notifier section.