Page 1 of 1

gedit annoyance

Posted: Thu Mar 01, 2012 12:58 pm
by viking777
I have suffered from this for ages on different distros as well not just LMDE. I find it intensely annoying that every time I open a document with gedit (using the mouse (it doesn't happen if you use the command line) it INSISTS on opening another document at the same time called 'Unsaved Document'. That isn't so bad in itself, but the real annoyance is when you want to close gedit, it insists again on asking you if you want to save this - completely unwanted - document. I find it amazing that this problem is not more widely mentioned online, but there is very little about it. I have found this:

http://unix.stackexchange.com/questions ... with-mouse

and this:

https://bbs.archlinux.org/viewtopic.php ... 8#p1031898

And not much else.

Now both of these seem to deal with the KDE environment, not Gnome, and certainly not Gnome3. The situation is further complicated by the fact that I use two file managers on LMDE, Nautilus (rarely, it is so horrible, but it is integrated into the desktop) and Dolphin (vastly superior but not integrated into gnome).

I have looked at the solutions given in the websites above and tried to adapt them to gnome3 and my personal preference of file managers, but it seems impossible.

First I have to edit /usr/share/applications/gedit.desktop not the files mentioned in the links above, and second however I choose to modify that file it will not work with both file managers that I use.

In order to get it to work with Dolphin I have to edit gedit.desktop with this:

Code: Select all

gedit $1 < /dev/null
But if I then open the same file from Nautilus it actually makes things several times worse. I get a file called '$1', another called '<' , another called 'dev/null' and lastly the file that I actually want to open.

If I want it to work with Nautilus I have to edit gedit.desktop to read simply:

Code: Select all

gedit
(instead of the default 'gedit %U')

But if I do that and then try and open the same file in Dolphin, nothing happens at all.

Maybe you can see why this is driving me nuts?

But can you see an answer??

I know I can't.

Re: gedit annoyance

Posted: Thu Mar 01, 2012 2:07 pm
by olle
I have not seen such a behaviour. Opening gedit brings the "unsaved doc" but it is replaced by the doc I search and open. So the unsaved one is not any more visible.

Could it be a localization problem ? I am using the Finnish version.

olle

Re: gedit annoyance

Posted: Thu Mar 01, 2012 2:27 pm
by viking777
olle wrote:I have not seen such a behaviour. Opening gedit brings the "unsaved doc" but it is replaced by the doc I search and open. So the unsaved one is not any more visible.

Could it be a localization problem ? I am using the Finnish version.

olle
Ahh! well maybe that is what should be happening, but for me it doesn't, the 'unsaved' document stays alongside the one you intend to open and won't go away until you tell gedit not to save it.

I don't think switching to the Finnish localisation would do me much good though :lol:

Re: gedit annoyance

Posted: Thu Mar 01, 2012 3:08 pm
by bimsebasse
I get this too, it only happens if I open a text document as root through the file's context menu, then I get the document + an untitled blank document every time. It must be filed as a nautilus bug somewhere, I haven't even bothered looking :)

Re: gedit annoyance

Posted: Fri Mar 02, 2012 5:36 am
by viking777
Not just me then. But I get it as a normal user as well, in other words all the time. You are right there should be a bug report somewhere, although it didn't show up in my google search which was quite thorough. Maybe I should search in the bug tracker directly instead of through google. I'll give it a go sometime.

Re: gedit annoyance

Posted: Fri Mar 02, 2012 5:54 am
by KittyKatt
I used to get this error sometimes when I used gedit. I don't remember if I fixed it or not (this was a couple of years back), but I'll see if I can find out what I did, if anything. :)

Re: gedit annoyance

Posted: Fri Mar 02, 2012 9:28 pm
by Mindstormscreator
I don't ever experience this, but I do experience something else strange. If I open a read-only file as a normal user, gedit lets me add text for a little bit, but then claims that the file is read-only and I can't add or remove any text, including the text I added. So really, this behavior should occur right when the file is opened...
Anybody else experience this? Maybe it is an ongoing gedit bug, I didn't do any research.

Re: gedit annoyance

Posted: Sat Mar 03, 2012 5:39 am
by viking777
Mindstormscreator wrote:I don't ever experience this, but I do experience something else strange. If I open a read-only file as a normal user, gedit lets me add text for a little bit, but then claims that the file is read-only and I can't add or remove any text, including the text I added. So really, this behavior should occur right when the file is opened...
Anybody else experience this? Maybe it is an ongoing gedit bug, I didn't do any research.
I might be able to explain that. If you go to Edit>Preferences>Editor, do you have 'autosave' box ticked? If you do, this could be what is causing this to occur. The default behaviour for me is that I can type as much text as I like into a read only file, I just can't save it when I have finished.

Re: gedit annoyance

Posted: Sun Mar 04, 2012 12:30 pm
by viking777
I think I have solved this annoyance (it might not be the same tomorrow, but it works now). As I have two different file managers there are two different solutions required.

The first is for Nautilus. You have to open /user/share/applications/gedit.desktop with root privileges and change the default command from

Code: Select all

gedit %U
to

Code: Select all

gedit %u
(just upper and lower case is what makes the difference).

Now I know the vast majority of sane people out there will not have Dolphin running on LMDE Gnome, but for the benefit of any other 'cuckoo's' like me this is how you fix it for Dolphin.

Open Dolphin and right click on any text file. Click properties, then click the spanner icon that is visible on the properties window. Under 'application preference window' click on gedit (it won't be there unless you have already added it, it isn't there by default). Then click on the 'edit' button followed by the 'application' tab.
In the 'Command' window enter "gedit $1 < /dev/null" without the quote marks. OK out and that is you all set.

Re: gedit annoyance

Posted: Thu Mar 29, 2012 10:03 am
by zerozero
debian-system-adjustment (through romeo) was updated yesterday and today; this is yesterday's changelog
debian-system-adjustments (2012.03.28) debian; urgency=low

* Set gedit so it doesn't create backup copies
* Themed GDM3

-- Clement Lefebvre <root@linuxmint.com> Wed, 28 Mar 2012 17:59:49 +0100
does it address this issue?

Re: gedit annoyance

Posted: Thu Mar 29, 2012 1:41 pm
by viking777
zerozero wrote:debian-system-adjustment (through romeo) was updated yesterday and today; this is yesterday's changelog
debian-system-adjustments (2012.03.28) debian; urgency=low

* Set gedit so it doesn't create backup copies
* Themed GDM3

-- Clement Lefebvre <root@linuxmint.com> Wed, 28 Mar 2012 17:59:49 +0100
does it address this issue?
It works in Nautilus (both as normal and root user) and it works in my latest file manager spacefm (both as normal and root user), but it doesn't work in Dolphin (as either user). But since Dolphin is not part of the gnome desktop anyway, I guess you can say that it works.

Thanks for the heads up btw because I had to revert the adjustments I had made (mentioned earlier on in this thread) before it would work in Nautilus.