Gedit - disabling "untitled document 1"

rikona rikona at sonic.net
Fri Jan 30 03:49:59 UTC 2015


On Fri, 30 Jan 2015 09:38:33 +1100
Karl Auer <kauer at biplane.com.au> wrote:

> On Thu, 2015-01-29 at 13:09 -0800, rikona wrote:
> > > grep -i exec /usr/share/applications/gedit.desktop
> > 
> > Exec=gedit %U
> > Exec=gedit --new-window
> > Exec=gedit --new-window
> 
> That's what I have, and gedit does not open new windows...

Hmmmmm....

> > Is there a way to set up/edit gedit.desktop so it would not open
> > "untitled document 1"? If I hand edit it, will it get overwritten?
> 
> Take a backup copy of /usr/share/applications/gedit.desktop. Then edit
> the original and replace the second and third "Exec" lines with copies
> of the first (so they all say "Exec=gedit %U"). I'm not sure how
> konqueror works - it might be an idea to restart KDE after making the
> change.

I was hesitant - those lines are in different 'sections' - see below.
Not sure what it would do.

Also, I'm running Unity. How can I restart KDE, being *absolutely sure*
it will not trash 40-50 working documents in any way?

> That might be all you need as a workaround. If there is no change,
> then the likeliest cause, though not definitely the cause, is that
> konqueror is not using that .desktop file, and you will need to find
> out which desktop file it IS using. That's a different bridge, to be
> crossed if you get to it :-)
> 
> Please post the full contents of /usr/share/applications/gedit.desktop
> (it's only 20-odd lines).

see below - thanks for the help!

------

[Desktop Entry]
Name=gedit
GenericName=Text Editor
Comment=Edit text files
Keywords=Plaintext;Write;
Exec=gedit %U
Terminal=false
Type=Application
StartupNotify=true
MimeType=text/plain;
Icon=accessories-text-editor
Categories=GNOME;GTK;Utility;TextEditor;
X-GNOME-DocPath=gedit/gedit.xml
X-GNOME-FullName=Text Editor
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gedit
X-GNOME-Bugzilla-Component=general
X-GNOME-Bugzilla-Version=3.4.1
X-GNOME-Bugzilla-ExtraInfoScript=/usr/share/gedit/gedit-bugreport
Actions=Window;Document;
X-Ubuntu-Gettext-Domain=gedit

[Desktop Action Window]
Name=Open a New Window
Exec=gedit --new-window
OnlyShowIn=Unity;

[Desktop Action Document]
Name=Open a New Document
Exec=gedit --new-window
OnlyShowIn=Unity;
 





More information about the ubuntu-users mailing list