I have noticed strange behaviour with recent upgrade to gnome-session-3.32. I use virt-viewer a lot. I'm running view-viewer-8.0 since Jul 02. I have the customized .desktop for it in ~/.local/share/applications. [Desktop Entry] Version=1.0 Type=Application Name=Spice Virtual machine viewer GenericName=virtual machine viewer Comment=Spice remote windows Icon=virt-viewer Exec=/usr/bin/virt-viewer --attach --connect qemu:///system NoDisplay=false Categories=Network StartupNotify=false Terminal=false When there is no instance of view-viewer running, I can see New Window in the context menu of the application's icon. When there is at least 1 instance running, I cannot see an item with New Window. What should be done to get the behaviour of gnome-session-3.30?
Created attachment 590670 [details] new window present
Created attachment 590672 [details] new window not present
The attached images are identical.
If you want to have a new window action, I believe you should actually provide on in the desktop file. I don't know what you meant with it being there in earlier versions of gnome-shell (gnome-session shouldn't be relevant here) when the image attached was wrong. Something like this chunk in desktop file: [Desktop Action new-window] Name=New Window Exec=virt-viewer --new-window assuming the command takes such a parameter for achieving this; but whatever is correct to achieve this (that you'd run from the terminal instead).
Created attachment 590674 [details] new window present
yes, you need to provide a [Desktop Action new-window] action in the desktop file; gnome-shell doesn't know how to safely launch a new window (instead of new process) otherwise, when the program is already running. Marking CANTFIX, as I can't fix your custom ~/.local/share desktop file.
I changed the image to reflect the difference. I'll follow your advice to add New Window action (in fact it will be the same as already existing action)
I've added the new action: [Desktop Entry] Version=1.0 Type=Application Name=Spice Virtual machine viewer GenericName=virtual machine viewer Comment=Spice remote windows Icon=virt-viewer Exec=/usr/bin/virt-viewer --attach --connect qemu:///system NoDisplay=false Categories=Network StartupNotify=false Terminal=false [Desktop Action New] Exec=/usr/bin/virt-viewer --attach --connect qemu:///system Name=New Connection However this doesn't change anything. As soon as there is a virt-viewer running, New Window action disappears from the context menu.
"New window" disappears becaus you named it "New Connection" instead of new-window, so you should have a "New Connection" now always instead, plus "New Window" when nothing is running..
not really... [Desktop Entry] Version=1.0 Type=Application Name=Spice Virtual machine viewer GenericName=virtual machine viewer Comment=Spice remote windows Icon=virt-viewer Exec=/usr/bin/virt-viewer --attach --connect qemu:///system NoDisplay=false Categories=Network StartupNotify=false Terminal=false [Desktop Action New-Window] Exec=/usr/bin/virt-viewer --attach --connect qemu:///system Name=New Window Produces the attached screenshot.
Created attachment 590868 [details] new window not present