GNOME Bugzilla – Bug 747939
Opening files from the command line always creates a new window
Last modified: 2015-04-18 08:49:38 UTC
Steps to reproduce: * Open gnome-terminal. * Type `touch a b`. (Or somehow have two text files that exist.) * Type `gedit a`. * A gedit window editing `a` is opened. Focus back on gnome-terminal. * Type `gedit b`. Expected result (i.e. result up to GNOME 3.14): a new tab is opened for `b` in the existing gedit window. (In general, an existing window is used only if it is in the same workspace.) Actual result (since upgrading to 3.16): a new gedit window is created, editing `b`. I’m using GNOME and GNOME Shell on Archlinux.
Hi, everything work fine for me on fedora rawhide, both with Gedit from the system and from jhbuild too. I have also tried with gedit a & then gedit b & and also from two different terminal. In each cases, it open a tab on the already opened window for the files loaded after the first one.
Thanks for your response. I’ve managed to have a document open as a new tab in an existing window, but I’ve also managed to reproduce the issue again. I’ve tried multiple things: opening from Nautilus instead of a terminal, opening files not in the current directory (with a slash in the gedit command line), opening files of different types, varying the time between opens (with `gedit a; sleep 1; gedit b`) but in all cases I’ve seen both the issue and the correct behavior. So it looks random, and I haven’t found a criteria to deterministically get one behavior or the other :/
It's maybe a duplicate of bug #733577.
Or, do you use Wayland?
I don’t use Wayland, but bug #733577 sounds very likely as my window are usually "half maximized" (Super + left/right arrow). In fact, I’ve managed to reliably reproduce the issue with half-maximized windows, and reliably *not* reproduce it with non-maximized windows. Interestingly, I can *not* reproduce the issue with fully maximized windows either. (I also use https://github.com/wilfm/GnomeExtensionMaximusTwo/ , although that doesn’t affect gedit which doesn’t have an old-style title bar. I’ve also reproduced the issue with this extension disabled.) Closing as duplicate of 733577. *** This bug has been marked as a duplicate of bug 733577 ***