Bug 348201

Summary: Error unmounting USB drive because of terminal panel (bash)
Product: [Applications] dolphin Reporter: Vladislav <contego>
Component: panels: terminalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: 16.12.2   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
URL: http://i.imgur.com/f5WHkm5.png
Latest Commit: Version Fixed In:

Description Vladislav 2015-05-25 11:59:48 UTC
When I try to unmont a USB drive (via Dolphin's menu or directly from terminal), while I am at USB drive folder, the error occurs: "Error unmounting block device ... target is busy". If terminal panel is closed, the error does not occur. `fuser -vm "usb_drive_path"` shows, that USB drive is busy by bash.

Reproducible: Always

Steps to Reproduce:
1. Turn the terminal panel on
2. Mount an USB drive
3. Go to USB drive folder
4. Try to unmount USB drive via Dolphin's menu (right click on the usb -> "Safely remove") at "Places panel"

Actual Results:  
An error occurs:

The device is currently busy: Error unmounting /dev/sdc1: Command-line `umount  "/media/vladislav/3DAD-DC36"' exited with non-zero exit status 32: umount: /media/vladislav/3DAD-DC36: target is busy
        (In some cases useful info about processes that
         use the device is found by lsof(8) or fuser(1).)

Expected Results:  
The USB drive should be unmonted. (if it is impossible not to block it by bash, dolphin's terminal should cd to /media/%%username%%/ and unmount the drive).

Kubuntu 15.04 and Dolphin 14.12.3
Comment 1 Frank Reininghaus 2015-05-26 16:58:15 UTC
Thanks for the bug report! This issue has been reported already.

*** This bug has been marked as a duplicate of bug 158264 ***
Comment 2 Frank Reininghaus 2015-05-26 17:00:51 UTC
(In reply to Vladislav from comment #0)
> (if it is impossible not to block it by
> bash, dolphin's terminal should cd to /media/%%username%%/ and unmount the
> drive).

This has been suggested before. The idea looks good at first sight, but it must be combined with some kind of inter-process communication in order to work, because you can unmount a device not only from the Dolphin window which shows the device, but also from Plasma's device notifier and from other Dolphin windows, for example.