Page 1 of 1

gedit won't open file first time

Posted: Sun Dec 16, 2012 4:43 am
by pastim
I'm on the latest and up-to-date version of Mint Debian. For some time I have been bugged by a weird problem.

When I select a file and try to 'open with' gedit from thunar nothing happens except the mouse turns into a spinning wheel. When I repeat the action it works.

I have seen similar reports elsewhere (other forums from Arch & Fedora) but no solution. There was one comment about permissions, and downgrading dconf, but I'm not sure what that's about.

Any thoughts out there?

Re: gedit won't open file first time

Posted: Sun Dec 16, 2012 1:33 pm
by viking777
Unfortunately gedit is riddled with bugs none of which are ever addressed. The one that annoys me the most is the 'unsaved document' error where it launches an empty document as well as the document you want opened (and then asks you if you want to save it when you close down :evil: ). I know for a fact that this error has been around for at least 7 years (because I have read bug reports from 2005) but has never been addressed. I guess your error might be something similar.

There is really only one option and that is to use an editor that isn't so buggy. Pluma (although based on gedit) is miles better, but sadly pulls in shed loads of Mate dependencies when you try to install it - and that is probably not what you want (certainly not what I want). I personally go for leafpad, it is functional, lightweight and not full of bugs (at least none that affect me). There are lots of others to choose from.

If you choose this route you will obviously have to tell Thunar that Leafpad is your default text editor not gedit. I am not sure how you do that, I don't use Thunar.

OTOH it could be a bug in Thunar. I wouldn't know, as I say I don't use it.

Re: gedit won't open file first time

Posted: Sun Dec 16, 2012 5:38 pm
by altair4
This is not at all relavant to the topic but:
viking777 wrote:Unfortunately gedit is riddled with bugs none of which are ever addressed. The one that annoys me the most is the 'unsaved document' error where it launches an empty document as well as the document you want opened (and then asks you if you want to save it when you close down :evil: ).
It saddens me that after all the years we've known each other that you never read any of my obscure HowTo's :(

gksu gedit /path also opens second empty tab: http://forums.linuxmint.com/viewtopic.php?f=42&t=110021

I'm more than just a pretty face you know :)

Re: gedit won't open file first time

Posted: Mon Dec 17, 2012 6:19 am
by viking777
First of all apologies to the OP for this slight hijack, but I should answer Altair's post.

I don't think you read my posts either :)

http://forums.linuxmint.com/viewtopic.p ... nt#p549188

Where I tried a variation of your solution 5 months before you posted it. It still didn't work, neither did anything else I tried (one of the main reasons is that a lot of people were complaining about this happening with 'elevated privileges' but for me it was happening every time I used a mouse click to open a document elevated privileges or not). I simply gave up with gedit and now remove it and install Leafpad instead, so I stopped looking for an answer, which also means I can't try your variation of that fix.

Thanks anyway.

Re: gedit won't open file first time

Posted: Wed Dec 19, 2012 5:31 am
by pastim
I find it strange that there are so few reports of this around. I can only assume it must be down to some particular combination of stuff.

Ah well. It seems there's no known fix for gedit around these parts, but, as suggested. leafpad seems OK, so I'll use that from now on (although I hesitate to remove gedit just yet).