In the last few days gedit has started behaving quite weird.

Every time I open it, it has an unsaved, empty document, even if I open some code file (so as a result, instead of opening my file file.txt I also have a tab with unsaved, empty file).

The error only occurs when I use the gedit from the KDE (I am usingKubuntu) by either double clicking the file or by "open with->gedit" command. Opening from the command line works just fine. Closing this extra tab obviously brings up the "unsaved changes" warning, and after closing - it appears again after opening file from the KDE.

Has anyone experienced this behaviour and if so, is there a fix?

gedit --version

gedit - Version 3.6.2

cat /etc/lsb-release


closed as off-topic by Takkat, belacqua, Alaa Ali, user117103, Eric Carvalho Sep 21 '13 at 6:17

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Bug reports and problems specific to development version of Ubuntu should be reported on Launchpad so that developers can see, track and fix these issues." – Takkat, belacqua, Alaa Ali, guntbert, Eric Carvalho
If this question can be reworded to fit the rules in the help center, please edit the question.


In this case Gedit seems to display data from stdin in a new "Unsaved document". To break the opened pipe:

right click the Kmenu button -> edit applications -> find gedit there (for me that is "utilities") -> put gedit $1 < /dev/null in gedit command field -> save

Source: Gedit opening an “Unsaved document” on opening files with mouse.

  • great! what about using "gedit $1 < /dev/null %U" ? – user115639 Apr 5 '14 at 2:00

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