Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm getting the "Cannot save _ Unexpected error: Error renaming temporary file: Text file busy" in Gedit 2 when I try to save in a shared folder with Virtualbox (Debian). I've searched and apparently it's a Gedit problem. None of the solutions seem ideal or work for me.

Would it be possible to create a shell script (external tools plugin) that saves the file somewhere else, then copies it back in shell? So I'll need to grab wherever Gedit's stored the temporary (live?) file.

Or if this is not possible/won't work/bad practice, does anyone know a good way to get around this? I really like Gedit and prefer to use it.


Currently, this is my script. I tell external tools not to save but pass the document as input (stdin)

bin=""
while read LINE; do
    echo ${LINE}    # do something with it here
    bin="${bin}${LINE}\n"
done

echo $bin > /home/me/data2/test.txt

It works fine except it doesn't preserve tabs. I'my only editing plain text files. Edit: this also seems to skip the last line

share|improve this question
You need more quotes. – jordanm Jan 28 at 4:18
How so? Where do I add them? – Raekye Jan 28 at 6:03

1 Answer

"Text file busy" means that the kernel refuses to move/rename/delete an executable file that is running as a program. What are you trying to save?

share|improve this answer
No... this is an issue with gedit and virtualbox. Google it - it's something to do with the way gedit saves temporary files and renames it when saving. – Raekye Jan 30 at 2:25

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.