Announcement

Collapse
No announcement yet.

Custom Device Action to power of a removable device that is not mounted

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Custom Device Action to power of a removable device that is not mounted

    Currently there seems to be no option in the GUI to power off a removable device which is not mouted (safely remove).

    The command line option i found in a forum is:
    1. look up device name manually
      Code:
      udisksctl status
    2. power off device
      Code:
      udisksctl power-off -b /dev/sdX​
    I would like to simplify this process by adding a custom "Device Action" which does this for the selected device.
    I tried to do this but several problems appeared which I am unable to solve.

    First of all I was able to create a custom action.
    But I didn't know what the paramters (%f, %d, %i) stood for exactly so I tried to write a debug command:
    Code:
    echo "test %f %d %i" &> ~/debug_custom_action.log
    This left me with an empty file so I tried to simplify it:
    Code:
    echo "test" &> ~/debug_custom_action.log
    This command still leaves me with an empty file if I run it as a device action. If I run it from the Konsole instead it works as expected.

    Could anybody please help me figure this out?

    References:
Working...
X