[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: gedit won't let go of my pendrive



> From: Nuno Magalhães [mailto:nunomagalhaes@eu.ipp.pt]
> Sent: Tuesday, September 08, 2009 9:26 AM
> 
> Greetings.
> 
> If i open a txt from my pendrive, then close it, then try to eject,
> i'll get the "an app is using it" message. None of gedit's open files
> are from the pendrive anymore, so why does it keep locking?
> 
> No, i haven't tried the -i or any other workaround, since i'd like it
> to Just Work... ;) Any suggestions?
> 
> TIA,
> Nuno Magalhães

Most likely, gedit's current working directory is still on the flash drive.  If you tell gedit to open a file from another directory, then it should change its working directory to that directory, allowing the flash drive to be unmounted.  Or just exit gedit.

To see if this is the case, use lsof (you may need to apt-get install it).  It tells you what programs have what files open, and also what their current working directory is.  To search for anything on your flash drive, if it's mounted at, say, /media/disk, then run:

# lsof +D /media/disk

In the "FD" column, it will show "cwd" if a program has its current directory set to that directory, otherwise it has a file open.

Hope this helps!
-- Kevin



Reply to: