Gedit - disabling "untitled document 1"

rikona rikona at sonic.net
Fri Jan 30 02:40:02 UTC 2015


Hello Nils,

Thursday, January 29, 2015, 1:50:15 PM, Nils wrote:

> 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.

Aha. I do have that button, but have never used it. The mini popup
says 'edit file type' which I never wanted to do [I'm happy with what
it already is :-) ] If it said 'edit file association', I might have
tried it. Thanks for that info.

>> > 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".

Is this in some desktop file? Usually, I rt click on a file in konq,
'open with kate'. I almost never use the CLI to do it. It would be
very nice to get a new kate, in the same desktop, using 'open with
kate'. OR, perhaps even better, to have it open in a kate instance
**on the same desktop**. I open a lot of files, and this would
minimize the number of kate instances.

I work with many txt files that must work with Windows pgms. I keep
kate with the Win EOL and do those edits there. I keep gedit using the
linux EOL for things that need that. I frequently use gedit to just
take a quick look, with no edit or save, so it doesn't alter the EOL.
It's THIS use that is such a PITA, because of the need to go through
the close procedure - also risky, it can change EOL if I screw up a
bit.

Thanks for your help...

-- 

 rikona        





More information about the ubuntu-users mailing list