This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Gedit opening two tabs

Tags: None
(comma "," separated)
HamRadio64
Registered Member
Posts
5
Karma
0
OS

Gedit opening two tabs

Sun Mar 09, 2014 9:54 am
Hi,

I'm using Dolphin 2.0 included in the official Kde 4.8.4 installation coming with my Debian Wheezy.

In
Code: Select all
keditfiletype text/plain
I've associated the text files with Gnome's Gedit, according to:

Code: Select all
$ cat .local/share/applications/menu-xdg/X-Debian-Applications-Editors-gedit.desktop
[Desktop Entry]
Categories=X-Debian-Applications-Editors;
Comment[it]=Light-weight GNOME text editor
Comment=Light-weight GNOME text editor
Encoding=UTF-8
Exec=/usr/bin/gedit
GenericName[it]=
GenericName=
Icon=/usr/share/pixmaps/gedit-icon.xpm
MimeType=
Name[it]=Gedit
Name=Gedit
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=


Each time I double click on a text file I get two tabs of gedit opened, the one wich I'm interested in and another empty one.

I've tried changing
Code: Select all
Exec=/usr/bin/gedit

with
Code: Select all
Exec=/usr/bin/gedit %U

but it doesn't make any difference.

I have the same problem on each one of my three computers with Debian Wheezy, but back with Debian Squeeze I didn't have this problem.

Does anyone have some suggestions on how to open just one tab of Gedit?

Many thanks in advance for answering.
User avatar
google01103
Manager
Posts
6668
Karma
25

Re: Gedit opening two tabs

Sun Mar 09, 2014 2:48 pm
what happens if in Konsole you run:
Code: Select all
 /usr/bin/gedit file_name

is there still the unwanted tab?


OpenSuse Leap 42.1 x64, Plasma 5.x

wolfi323
Registered Member
Posts
1129
Karma
11
OS

Re: Gedit opening two tabs  Topic is solved

Sun Mar 09, 2014 6:47 pm
I found this bug report:
https://bugs.kde.org/show_bug.cgi?id=276103

Personally I remember seeing this as well in earlier openSUSE versions, but I cannot reproduce it here on openSUSE 13.1 with KDE 4.12.3 and Gedit 3.10.2 any more.

Maybe this actually was a bug in gedit that got fixed in the meantime?
User avatar
google01103
Manager
Posts
6668
Karma
25

Sun Mar 09, 2014 7:03 pm
wolfi323 wrote:I found this bug report:
https://bugs.kde.org/show_bug.cgi?id=276103

Personally I remember seeing this as well in earlier openSUSE versions, but I cannot reproduce it here on openSUSE 13.1 with KDE 4.12.3 and Gedit 3.10.2 any more.

Maybe this actually was a bug in gedit that got fixed in the meantime?


just to point out in the bug report there is a work around or 2
1. Open file .local/share/applications/gedit.desktop or /usr/share/applications/gedit.desktop
2. Search the line beginning with "Exec=", and replace it with:
Exec=bash -c 'gedit "$@" < /dev/null' - %U


OpenSuse Leap 42.1 x64, Plasma 5.x

HamRadio64
Registered Member
Posts
5
Karma
0
OS

Re: Gedit opening two tabs

Sun Mar 09, 2014 7:26 pm
google01103 wrote:what happens if in Konsole you run:
Code: Select all
 /usr/bin/gedit file_name

is there still the unwanted tab?


No, there's just one tab.
HamRadio64
Registered Member
Posts
5
Karma
0
OS

Re:

Sun Mar 09, 2014 7:31 pm
google01103 wrote: Exec=bash -c 'gedit "$@" < /dev/null' - %U


This does the trick, thank you both wolfi323 and google01103!
wolfi323
Registered Member
Posts
1129
Karma
11
OS

Re: Gedit opening two tabs

Mon Mar 10, 2014 7:31 am
For the record, I'm pretty sure now that this issue was a bug in gedit:
I could reproduce it on a fresh openSUSE 12.3 installation (KDE 4.10.0, gedit 3.6.2).
After upgrading gedit to 3.8.3 the problem is gone (with the same KDE version), only one tab with the document is opened.

I added this information to the KDE bug report.

Btw, a similar GNOME bug report can be found here:
https://bugzilla.gnome.org/show_bug.cgi?id=673741
That one is about the --new-window command line option though and was fixed in 3.6.2 already so can't be this exact same issue, but maybe it was related somehow. At least it proves that gedit did have such bugs... ;)


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], lockheed