Gedit - disabling "untitled document 1"

Karl Auer kauer at biplane.com.au
Thu Jan 29 06:33:59 UTC 2015


On Wed, 2015-01-28 at 21:50 -0800, rikona wrote:
> I've gotten quite irritated with Gedit - every edit generates a tab with "untitled
> document 1" that has to be dealt with on closing. How can I keep gedit
> from ever coming up with "untitled document 1" unless I tell it to.
> Net searching did not offer clues, but maybe I asked the wrong thing...

Please describe in excruciating detail exactly how you are starting
gedit.

If I left-click on a .txt file (or any other file type with a default
application of gedit), I get an open gedit window containing one tab,
with the file open in it, and with the tab named after the file. The
same happens if I right-click on a file in Nautilus and select "Open
with gedit".

I can only get an empty tab (one with "Untitled Document 1" or similar
as its name) in many different ways:

- if gedit is in my task bar (the Unity column of icons at far left of
the screen), by choosing any of "Open a New Window", Open a New
Document" or "Text Document".

- if gedit is in my task bar, by middle clicking it (or left clicking
it, if no gedit instance is currently running).

- starting gedit from the application finder

- clicking the "new file" icon in an existing gedit window

- selecting "File -> New" from the menus in an existing gedit window

- running gedit from the command line with no file argument

- running gedit from the command line with the --new-window argument. In
this case, the untitled tab appears in a new gedit window.

- running gedit from the command line with the --new-document argument.
In this case, the untitled tab appears in an existing gedit window if
one exists, or in a new gedit window if gedit is not already running.

I wonder if your gedit invocation has "--new-document" in it? You can
find out starting gedit however you are starting it, then running this
command in a terminal window:

   ps ax | grep gedit

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: 3C41 82BE A9E7 99A1 B931 5AE7 7638 0147 2C3C 2AC4
Old fingerprint: EC67 61E2 C2F6 EB55 884B E129 072B 0AF0 72AA 9882






More information about the ubuntu-users mailing list