dash-to-dock icon indicating copy to clipboard operation
dash-to-dock copied to clipboard

isolate workspaces doesn't start new nemo window

Open fcastilloec opened this issue 4 years ago • 6 comments

I have "Isolate workspaces" option enabled. I have also set nemo as one of my favorites for easy open. I open a nemo window in one of my workspaces (it's the only nemo window running), then switch to another workspace and click on the nemo icon (favorite). Instead of opening a new nemo window it just switches workspaces and focuses on the old one. All other apps work as expected, opening a new window when none is present on the current workspace. This behavior didn't happen on Ubuntu 18.04 with Dash to Dock 65.

I'm using Ubuntu 20.04 with Gnome 3.36.2 and Dash to Dock 68.

fcastilloec avatar May 21 '20 20:05 fcastilloec

Could be related to #1235. Looks like isolate workspaces is broken in this setup.

darkdragon-001 avatar May 24 '20 05:05 darkdragon-001

@darkdragon-001 it's probably not the same, that issues describe a problem with multi-monitors. This one is specific to isolate workspaces only, whether you have a single or multi-monitor setup. Also, that issue was tested with Wayland, which is still known for having bugs. This issue is specific to X11

fcastilloec avatar May 24 '20 18:05 fcastilloec

I don't want this issue to go stale, so just letting people know that this is still present on v69 on Gnome 3.36.8. If Nemo is open in a different workspace, clicking on its icon will switch workspaces rather than open a new window. The only workaround is to hold the Ctrl key when clicking so it'll open a new window on the current workspace.

fcastilloec avatar Feb 18 '21 21:02 fcastilloec

Hi! I'm using Ubuntu 20.04 and I also ran across this problem. I believe that the issue is on nemo's side, which does not define a "New Window" desktop option, at least in my installation. To solve this, open the nemo desktop file, usually located at /usr/share/applications:

$ sudo gedit /usr/share/applications/nemo.desktop

Then add "new-window" to Actions, i.e., replace

Actions=open-home;open-computer;open-trash;

with

Actions=new-window;open-home;open-computer;open-trash;

and define the action by adding to the end of the file:

[Desktop Action new-window] Name=New Window Exec=nemo %U

Finally, make sure to restart Gnome shell for the changes to take effect. Press Alt+F2, then type r and press Enter. I leave here my complete nemo.desktop file (to which I have made some modifications) since it might be usefull:

[Desktop Entry] Name=Files Comment=Access and organize files Exec=nemo %U Icon=filemanager Keywords=folders;filesystem;explorer; Terminal=false Type=Application StartupNotify=false Categories=GNOME;GTK;Utility;Core;FileManager; MimeType=inode/directory;application/x-gnome-saved-search; Actions=new-window;open-home;open-computer;open-trash;

[Desktop Action new-window] Name=New Window Exec=nemo %U

[Desktop Action open-home] Name=Home Exec=nemo %U

[Desktop Action open-computer] Name=Computer Exec=nemo computer:///

[Desktop Action open-trash] Name=Trash Exec=nemo trash:///

ptrindade96 avatar May 05 '21 16:05 ptrindade96

@ptrindade96 Thanks, I found this thread when looking for the reason a middle click does not open a new Nemo window. Your adjustment fixed this problem. The underlying issue is the same: A missing NewWindow action. However, I think the underlying issue is the behaviour or detection of the New Window option. It is not well-documented (at least I could not find any documentation on it), but from my experiments:

  • If there is an action called precisely "new-window" specified in the .desktop file, gnome-shell will use this for middle-click and click on an isolated desktop.
  • If there is no such action in the .desktop file, gnome-shell adds its own new window command that, I assume, just runs the the original Exec-value from the .desktop-file. It is visible in the right click menu and also triggered on middle click or click on an isolated desktop.
  • If there is a new window action that does not have the precise name "new-window", gnome-shell adds its own, so the option appears twice in the right click menu and the gnome-shell command is triggered on middle-click or on an isolated workspace.

Nemo is the only program I have noticed not falling into the cases described above:

  • Nemo by default does not list a new-window action in the .desktop-file and it actually has a gnome-shell generated new window command in the right click menu, until a window is opened (on any desktop), then it disappears.

What causes the different behaviour, I have not been able to figure out.

Edit: Fixed standard behaviour.

HifeFish avatar Mar 17 '22 10:03 HifeFish

I'm still having this issue on gnome 42.2 with Ubuntu 22.04 LTS. If I favorite an application, then isolate workspaces doesn't work with that application. I'm using dconf-editor to check workspace isolation. Maybe there's a better way that won't run into issues with favoriting, but I haven't found it.

TC-Wheel avatar Jul 07 '22 00:07 TC-Wheel