Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Every time I try unmounting / ejecting / safely removing a drive in Xubuntu, I get the following dialog:

Writing data to device

However, most of the time it seems like there isn't any data that needs to be written or a reason the device shouldn't be disconnected. Is this dialog always displayed? How can I differentiate between when this dialog is appropriate and when it isn't?

share|improve this question
    
Are you unmounting from the GUI or from the command line? Do you have Disk Utility installed? –  kingmilo May 6 '13 at 17:59
    
The dialog is always displayed momentarily; it's nothing to be concerned about: see the xfce documentation. –  user76204 May 6 '13 at 18:28
    
@Mik Thanks! Can you add that as an answer so I can accept it? –  Eyal May 7 '13 at 8:44
    
@kingmilo I'm unmounting from the GUI. No Disk Utility installed, I think - does the package have another name? –  Eyal May 7 '13 at 8:44
    
Ok, I'll put an answer and try to explain how they work. –  user76204 May 7 '13 at 10:39
add comment

1 Answer

up vote 3 down vote accepted

It is normal to get this dialogue when using thunar, as noted here briefly at the Xfce wiki, although it will obviously only be displayed if you have a notification daemon installed. When a filesystem is unmounted any pending data is written and then the device itself can be removed. However, sometimes the filesystem cannot be unmounted if a process is still attached, and so tools like fuser can be used to check what is still accessing the drive.

The addon, thunar-volman is installed with thunar, and via thunar-volman-settings, you can configure how it operates. As it uses dbus to communicate with other applications, you can get a glimpse of what's happening behind the scenes, by running

dbus-monitor

and then connect your device, and then unmount it. A whole splurge of data will arrive, but you can see the process whereby thunar, thunar-volman, etc are communicating over dbus, resulting in what you see when you remove a device, which is communicated to you by your installed notification-daemon:

method call sender=:1.97 -> dest=:1.98 serial=8 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify
   string "Thunar"
   uint32 0
   string "drive-removable-media-usb"
   string "Writing data to device"
   string "There is data that needs to be written to the device "MCADisc" before it can be removed. Please do not remove the media or disconnect the drive"
   array [
   ]
   array [
      dict entry(
         string "urgency"
         variant             byte 2
      )
   ]
   int32 0
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.