Gedit - disabling "untitled document 1"

Nils Kassube kassube at gmx.net
Thu Jan 29 21:50:15 UTC 2015


rikona wrote:
> Thursday, January 29, 2015, 1:53:01 AM, Nils wrote:
> > rikona wrote:
> >> Wednesday, January 28, 2015, 10:33:59 PM, Karl wrote:
> >> > Please describe in excruciating detail exactly how you are
> >> > starting
> >> > gedit.
> >> 
> >> Mostly, I right-click on a file in konq and select "Open with
> >> gedit".
> > 
> > I suppose with "konq" you probably mean "konqueror".
> 
> yes
> 
> > So which desktop are you running? KDE or Unity or even something
> > else?
> 
> Running Unity + some KDE pgms

OK, that's what I guessed. :)

> >> >    ps ax | grep gedit
> >> 
> >> tried an experiment--
> >> 
> >> if from konq, I get:
> >> .... /usr/bin/gedit   plus   what file name was opened-
> >> opens with "untitled document 1"
> >> 
> >> if from Nautilus, I get:
> >> ....   what file name was opened, not preceded by
> >> /usr/bin/gedit  - so there is a difference in how it's called-
> >> opens without "untitled document 1"
> > 
> > I'm not sure what you mean here - is it something like this?
> > 
> > ... /usr/bin/gedit somefile.txt "untitled document 1"
> 
> No - it is just  somefile.txt
> 
> "untitled document 1" never appears anywhere

OK, then I have no idea, where this "untitled document 1" comes from, 
probably not from the file type options.

> > If that's the case, there could be something wrong with the file
> > type
> > options for opening a file with gedit. I just tried the behaviour of
> > a freshly installed gedit run from konqueror, and there was no
> > extra file "untitled document 1".
> 
> Was this a rt click in konq, 'open with gedit', way it was started? If
> so, that's what gives me the "untitled document 1".

Yes, right click on the icon of a text file.

> > So please check the file type options:
> > 
> > From konqueror right click the icon of a text file and select
> > "Properties" and in the new window select "File Type Options".
> 
> I don't have this in the window. This is konq 4.8.5 in Ubuntu 12.04.

IIRC the button was changed some time after 12.04, but I don't have a 
12.04 system left to check it. Anyway, in the older version, there was a 
button with a spanner (i think it was in the line with the file type 
description). That button should get you the same options you get with 
the "File Type Options" button in 14.04.

> > In the
> > lower right selection area select gedit and on the right click the
> > "Edit…" button. Select the "Application" tab and make sure that the
> > entry in the line "Command" is "gedit %U". Click "OK" (several
> > times)
> > and check if it still opens the extra file "untitled document 1".
> 
> I can set gedit as the preferred pgm for .txt via "config konq". 

OK, that's another way to reach the file type options ...

> This
> gets konq to open the file with gedit, but it still gives me the
> "untitled document 1", for which I still have to go through the whole
> 'close' routine. And, it does not change the output of
> ps ax | grep gedit.
> 
> still        /usr/bin/gedit       somefile.txt
> 
> [side note - in konq, the preferred pgm for .txt is usually set to
> kate. This will then open the file in kate, BUT it will be in one of
> the several incidences of kate already running, not a new one. AND, it
> is not clear which incidence it will be in. Almost always in another
> desktop even though there's a running kate on that desktop. The KDE
> pgms seem to get 'lost' in the Unity desktop management...]

If you prefer kate, you could use the same procedure to change the 
command used to start kate. If you always want to open a new instance of 
kate, the command should be "kate -n %U".


Nils





More information about the ubuntu-users mailing list