Phisical button to open gnome-calculator not working


#1

I have a laptop with a physical button to open gnome-calculator this works fine with deb application but doesn’t work with snap app. I noticed the same behavior with the browser. The button browser normally opens the browser but now it does nothing. Only if the browser is already open it takes you to home page


Proposal: allow snaps to specify their exact desktop file ID
#2

You need to find where those key shortcuts are defined and modify path for app which they execute.


#3

Looking atthe code in gnome-settings-daemon, we have:

case CALCULATOR_KEY:
        do_execute_desktop_or_desktop (manager, "org.gnome.Calculator.desktop", "gnome-calculator.desktop", timestamp);
        break;

So it is looking for two particular desktop file IDs. However, due to the way snapd installs desktop files, it would instead have the ID gnome-calculator_gnome-calculator.desktop, so isn’t found.

As for the web browser case, I don’t see a reason why it shouldn’t work for a snapped browser: it simply launches the default handler for the “http” scheme, so all you should need to do is to configure it in the default applications control panel.


#4

Ubuntu 18.04.2
I can observe the same behavior in gnome-calculator and gnome-system-monitor.
I tried different key combinations.
Vlc, Chromium and other snaps work.