4

Using Ubuntu 21.04 with pure Gnome Shell 3.38.

Consider this example scenario: I have 2 workspaces open, workspace-1 and workspace-2. In workspace-2, the Gedit app is open. In workspace-1, the Gedit app is not open.

While in workspace-1, I enter Nautilus app and double-click on a saved Gedit text file. Gedit opens the file but auto-moves to workspace-2 to present the opened file. WTHeck! Why isn't it opening Gedit in the workspace I am in? What is the point of workspaces if you can't create the stuff you want to work with in that workspace?

vanadium
  • 88,010
G.W.
  • 643
  • Sounds like it might be a bug in 21.04. I am using GNOME 3.36 in 20.04 and I can't seem to duplicate your issue. – Terrance Oct 30 '21 at 04:01
  • 1
    Not a bug, but how it works/is designed: by default the new file is opened in an existing instance. Still, I agree that for users who which to separate workspaces it is desired to have a new window opened in the current workspace. There might be tricks to change that behaviour, so useful question indeed! – vanadium Oct 30 '21 at 12:03
  • @vanadium Well, if it is not a bug, then it would be useful for the OP to file one anyways for a feature if this cannot be done in the newer version. – Terrance Oct 31 '21 at 05:10
  • @Terrance Interesting! Indeed, in 20.04, it behaves differently, the way you describe and the OP wants! – vanadium Oct 31 '21 at 11:56
  • Interesting answer here, likely pinpointing where this behaviour may have been changed in recent gedit versions: https://askubuntu.com/questions/75671/why-does-gedit-keep-randomly-opening-new-instances-when-opening-files-from-nauti?rq=1 – vanadium Oct 31 '21 at 12:14
  • Did you try gedit --new-window filename.txt or gedit -s filename.txt ? – raj Oct 31 '21 at 14:59
  • gedit --new-window filename does open in a new window, but this is not the expected behaviour. The behaviour should be "new-window" if "there is not another open window in the present workspace". If it is not a bug, it is a very bad design. – Davide Sangalli Dec 02 '22 at 08:53
  • This gnome shell extension apparently could do the job: https://micheleg.github.io/dash-to-dock/ However, the option "isolate workspaces" is not available in ubuntu 22.04 and reports Managed by GNOME Multitasking's application switcher. However under Settings --> Multitasking there is not an option to isolate workspaces ... – Davide Sangalli Dec 02 '22 at 09:24

1 Answers1

0

This behaviour has been added with the migration to Wayland only, instead of keeping support for X11, as discussed here.

But because this has been bugging me too, and I still use X11, I reverted the commits in question: Similar as here explained, you need to revert commits C1, C2 and finally, most importantly C3.

My patchfile for Gedit 40.1 you can find in my Gentoo overlay.

  • 1
    Same issue here. Ubuntu 22.04, gedit 41.0. Even if I set
    gsettings set org.gnome.gedit.preferences.ui show-tabs-mode 'never'
    the new window opens in the other worskapce. gedit -s filename works. But it is not a solution in my opinione.
    – Davide Sangalli Jul 29 '22 at 07:43