You are not logged in.

#1 2011-06-05 12:29:26

pootzko
Member
From: Nerdvana
Registered: 2008-06-23
Posts: 109
Website

Gedit opens an "Unsaved document" on opening files with mouse

when I open files by double-clicking the file with mouse I always get one additional "Unsaved Document X".. which is very annoying, because I have to close tham all, and click "Close without save"... it happens in dolphin, nautilus and krusader.

when I try opening a file from terminal using "gedit filename" that does not happen.
it also does not happen if I open the files from within gedit.

any hints on how to fix this?
thank you

Last edited by pootzko (2011-06-05 12:29:51)


...I put on my robe and a wizard hat...

Offline

#2 2011-06-07 23:45:22

eeg
Member
From: Ooozetralia
Registered: 2009-03-11
Posts: 25

Re: Gedit opens an "Unsaved document" on opening files with mouse

Hi, have the same problem too.

15 mins of  troubleshooting and cussing later, best I could come up with is to use "Run in terminal" mode when opening the file.

So you see a terminal very briefly appear before gedit itself starts. Sigh.

Its an annoying bug... not entirely sure if its with gedit or kde (dolphin/konqueror/etc). I tend to think the latter.

Offline

#3 2011-06-17 12:49:41

indianahorst
Member
Registered: 2008-08-23
Posts: 129

Re: Gedit opens an "Unsaved document" on opening files with mouse

Same problem here. But your workaround doesn't work for me:

I'm using krusader with urxvt as terminal. When I activate "run in terminal", krusader throws an error when opening a text file with gedit:

"KDEinit could not launch "konsole". Could not find 'konsole' executable."

Yes, no wonder, there is no konsole installed - because I use urxvt. In the prefererences of Krusader is urxvt as terminal emulatur registered.

Any hints?

Offline

#4 2011-12-23 23:39:38

felrood
Member
From: Netherlands
Registered: 2011-12-23
Posts: 1

Re: Gedit opens an "Unsaved document" on opening files with mouse

It's not a bug, it's a feature!

Gedit seems to display data from stdin in a new "Unsaved document". For example:

echo "foobar" | gedit

To break the pipe opened by krusader, i replaced the command 'gedit %U' in krusader with this script:

#!/bin/bash

gedit $1 < /dev/null

Offline

#5 2011-12-24 13:08:46

thesofty
Member
From: Nuremberg, Germany
Registered: 2011-05-09
Posts: 46

Re: Gedit opens an "Unsaved document" on opening files with mouse

Hey, I like this pipe feature big_smile. This is what I've been wishing since a  couple of years.
Thanks for the info.

Last edited by thesofty (2011-12-24 13:10:25)

Offline

#6 2012-01-11 09:27:33

pootzko
Member
From: Nerdvana
Registered: 2008-06-23
Posts: 109
Website

Re: Gedit opens an "Unsaved document" on opening files with mouse

felrood wrote:

It's not a bug, it's a feature!

Gedit seems to display data from stdin in a new "Unsaved document". For example:

echo "foobar" | gedit

To break the pipe opened by krusader, i replaced the command 'gedit %U' in krusader with this script:

#!/bin/bash

gedit $1 < /dev/null

man, you're a genius. thank you so much! smile

ps. perhaps a more global solution is right clicking Kmenu button -> edit applications -> find gedit there -> put "gedit $1 < /dev/null" in gedits command field -> save

Last edited by pootzko (2012-01-11 09:56:49)


...I put on my robe and a wizard hat...

Offline

#7 2012-02-28 23:36:49

DjDaviD
Member
Registered: 2012-02-28
Posts: 1

Re: Gedit opens an "Unsaved document" on opening files with mouse

pootzko wrote:
felrood wrote:

It's not a bug, it's a feature!

Gedit seems to display data from stdin in a new "Unsaved document". For example:

echo "foobar" | gedit

To break the pipe opened by krusader, i replaced the command 'gedit %U' in krusader with this script:

#!/bin/bash

gedit $1 < /dev/null

man, you're a genius. thank you so much! :)

ps. perhaps a more global solution is right clicking Kmenu button -> edit applications -> find gedit there -> put "gedit $1 < /dev/null" in gedits command field -> save

That's an amazing solution!
Maybe better would be...

gedit "$1" < /dev/null

(with the quotes). That way we prevent gedit to open two files with each non-spaced name in the case that our file name had blank spaces.
(gedit foo bar -->one file for 'foo' && one file for 'bar')

Thank you,

DaviD.

Last edited by DjDaviD (2012-02-28 23:38:03)

Offline

#8 2012-04-29 10:00:16

hearthstone
Member
Registered: 2012-04-29
Posts: 1

Re: Gedit opens an "Unsaved document" on opening files with mouse

It worked for me in dolphin on Debian testing:
"gedit $1 < /dev/null"

When I tried gedit "$1" < /dev/null, I got reprimanded for being root.

Thanks, Hearthstone.

Offline

Board footer

Powered by FluxBB