1

I have an icon for gedit in my launcher in Ubuntu 16.04. I had a problem with multiple icons in the launcher (see, e.g., Why are there two icons in the Unity launcher for Nautilus?), which I solved by some random unlock from launcher-lock to launcher actions. Now I have a single icon that starts gedit.

However, when I click on this icon, gedit is started in /. This is visible in the embedded terminal and in the save location for new documents (as well as the location for 'open other documents' when a new document is in focus).

How can I change this location? I tried to edit /usr/share/applications/org.gnome.gedit.desktop to read Exec=cd ~;gedit %U but that resulted in compiz being active for 10sec at 15% cpu and then terminating without starting gedit.

When I start gedit from the terminal in any directory the location is set to this directory.

I also have a /usr/share/applications/gedit.desktop file but it is not used. dconf-editor shows that the org.gnome file is used, and indeed making changes to this file (e.g., changing captions) is reflected in the launcher.

Marijn
  • 171

1 Answers1

0

https://bugs.launchpad.net/gedit/+bug/194904 and https://bugzilla.gnome.org/show_bug.cgi?id=504067 suggest this is NOT possible

2 comments noteworthy:

Gedit remembers the last folder where a document was saved, so I think this cannot be applied right now. Open the bug again if you think that the current behavior is not the one expected.

Regarding the first issue, he is right. Right after installation, gedit suggest the /home/$(USER)/ directory to save a file instead of /home/$(USER)/Documents. I think this should be changed (if it is actually not only a problem of Ubuntu).

  • The initial save location (ie. user home) is hardcoded into gedit
  • Gedit will remember a new save location and make that the default
Rinzwind
  • 299,756
  • 1
    In that case, why does gedit (on my system) pick / instead of the last location a file is saved (I never save anything directly on /)? Apparently gedit cannot write this setting properly, so where is this stored? Could it be corrupted? – Marijn Nov 01 '16 at 11:43
  • I got the same problem, but it happens randomly. Sometimes, the default is home, otherwise, it is root /. – sugab Aug 17 '17 at 01:51