Files opened with gedit on command line no longer open within the existing gedit session

Bug #1573728 reported by Kenneth Wilke
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gedit
Unknown
Unknown
gedit (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Prior to my update today to Ubuntu 16.04, I could open a file using gedit on the command line and it would open in the gedit window i already have open. After updating to 16.04 when I open a file with say `gedit /tmp/myleakycode.c` it opens in a new window.

Oddly, as I was writing this bug report it's now working I expect it to, where opening files on the CLI adds to my existing session.

I'll follow up if I find some pattern as to what triggers this.

I am running Ubuntu Gnome 16.04 with the 4.4.0-21-generic kernel, gedit 3.18.3, terminator 0.98 to open the files.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: gedit 3.18.3-0ubuntu4
ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
Uname: Linux 4.4.0-21-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
CurrentDesktop: GNOME
Date: Fri Apr 22 12:54:04 2016
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/gedit
ProcEnviron:
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gedit
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Kenneth Wilke (kenneth-wilke) wrote :
Revision history for this message
Kenneth Wilke (kenneth-wilke) wrote :

Still running into this every once in a while, still haven't noticed any particular pattern of usage that causes it more than any other though :\

Revision history for this message
Kenneth Wilke (kenneth-wilke) wrote :

This is still occurring

Seems like the pattern is that it'll open in my existing gedit window if that window is entirely within my primary display

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gedit (Ubuntu):
status: New → Confirmed
Revision history for this message
Karl Trygve Kalleberg (karltk) wrote :

I see the same thing (17.10), gedit 3.22.1:

- if I maximize gedit vertically, gedit foo always opens a new gedit window
- if I maximize gedit horizontall, gedit foo always opens a new gedit window
- if I don't maximize in either direction, gedit foo opens in the existing gedit window

I'm running Wayland, not sure if that has any impact.

Revision history for this message
Pedro Côrte-Real (pedrocr) wrote :

Just moved to Ubuntu 18.04 and can confirm the issue and it does seem to be something related to the window manager. I can confirm this only happens with a maximized window and in 16.04 it would happen with gnome but not Unity.

Revision history for this message
Pedro Côrte-Real (pedrocr) wrote :

It doesn't seem to be about maximization but about window location. If any part of the gedit window is against the screen edge or over it a new window opens. If the whole gedit window is fully within the screen and not against any borders it opens in the existing window.

Revision history for this message
Pedro Côrte-Real (pedrocr) wrote :

Here's the upstream bug report with an included patch:

https://bugzilla.gnome.org/show_bug.cgi?id=730414

Maybe that patch could be added to the Ubuntu package?

Revision history for this message
Pedro Côrte-Real (pedrocr) wrote :

Since upstream doesn't seem to want to commit the fix could the ubuntu package add this as a patch? I've rebuilt the package with the patch from the upstream bug (attached) and it seems to work fine as verified by other users in the upstream bug.

I couldn't get dpkg-source to actually apply it automatically with the following error:

dpkg-source: warning: unexpected end of diff 'gedit-3.28.1/debian/patches/09_position_fix.patch'

So I patched it manually. But I'm sure that's just a simple issue someone with actual knowledge of dpkg packaging will fix easily.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Patch from the upstream bug" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Pedro Côrte-Real (pedrocr) wrote :

I've ran the patch for a few months now with no issues. A new update has now reverted that so I have to go back and reapply it. Could the patch just be added to the ubuntu package and be done with it?

Revision history for this message
Sebastien Bacher (seb128) wrote :

The upstream comments suggest it should be fixed with that commit
https://gitlab.gnome.org/GNOME/gedit/commit/80184824

Changed in gedit (Ubuntu):
importance: Undecided → Low
status: Confirmed → Triaged
Revision history for this message
Pedro Côrte-Real (pedrocr) wrote :

That will only come out with newer gnome versions, so this would only be fixed in 20.04 if you're using LTS releases. I'm running the original patch with no issues, so maybe it would be nice to just add that to the current package?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.