0

Is there are predefined keyboard shortcut for fast launch gnome-calculator?

When I try set custom (For example Ctrl+Alt+5) from settings they doesn't work for me:

enter image description here enter image description here

slava
  • 3,887
  • 4
    @Prakash, I think Pratap's answer about gnome-calculator being a snap package (in a default 18.04 install) provides the reason. – DK Bose Dec 27 '18 at 09:52
  • In general question is a default shortcut for calculator. I think it must exist because some keyboards have a calculator key and must use some default shortcut. – slava Dec 27 '18 at 10:00
  • @mature Ubuntu is slowly moving towards more snap. And I believe due to which although they changed the pre-installed gnome-calculator but somewhere forgot to change the inbuilt code for the calculator shortcut. – Kulfy Dec 27 '18 at 12:20

3 Answers3

3

The shortcut you are giving for Launch calculator is for gnome-calculator if you installed it via APT.

enter image description here

Below is the path of executable file of snap version of Calculator that is pre-installed with Ubuntu 18.04 which can be used to set shortcut as well.

/snap/bin/gnome-calculator

Output of lsblk -lf

NAME   FSTYPE   LABEL UUID                                 MOUNTPOINT
loop0  squashfs                                            /snap/core/6130
loop1  squashfs                                            /snap/gnome-3-26-1604/74
loop2  squashfs                                            /snap/gnome-system-monitor/57
loop3  squashfs                                            /snap/gtk-common-themes/818
loop4  squashfs                                            /snap/gnome-logs/45
loop5  squashfs                                            /snap/gnome-calculator/222
loop6  squashfs                                            /snap/gnome-characters/117
loop7  squashfs                                            /snap/gnome-system-monitor/54
loop8  squashfs                                            /snap/gtk-common-themes/319
loop9  squashfs                                            /snap/gnome-characters/139
loop10 squashfs                                            /snap/gnome-logs/40
loop11 squashfs                                            /snap/core/5328
loop12 squashfs                                            /snap/gnome-3-26-1604/70
loop13 squashfs                                            /snap/gnome-calculator/260

To use Ctrl+Alt+5 either install gnome-calculator from APT or create a custom shortcut for snap version of Calculator.

I have customized for both

enter image description here

enter image description here

Kulfy
  • 17,696
PRATAP
  • 22,460
  • I think if we use simply gnome-calculator in place of this long command, that should also work. by the way +1 to your answer since I noticed today in my virtualbox that the calculator pre-installed is now snap. – Kulfy Dec 27 '18 at 09:58
  • IIRC, there are about three applications installed as snaps by default in 18.04: gnome-calculator, system monitor, and something that shows characters such as emojis. – DK Bose Dec 27 '18 at 10:13
  • 1
    @DKBose I usually don't have anything installed in Ubuntu that I use in virtualbox. After running snap list I get 8 packages pre-installed, i.e. core, core18, gnome-3-26-1604, gnome-calculator, gnome-characters, gnome-logs, gnome-system-monitor , gtk-common-themes. – Kulfy Dec 27 '18 at 10:21
  • @PRATAP I've edited your answer to make it more clear. Also, Ubuntu software center provides snap version of calculator (at least in my main installation) so it is better to mention "APT" instead of software center. If you find some edit contradicting to your approach feel free to roll back the edit :) – Kulfy Dec 27 '18 at 10:26
3

Most shorter way is reinstall default snap calculator to deb:

sudo snap remove gnome-calculator
sudo apt install gnome-calculator

Then manual shortcuts from Settings starts working.

slava
  • 3,887
1

Did you check your Shortcuts (Ctrl+Alt+5) is used for another Keyboard Shortcuts? Because when I set Shortcuts (Ctrl+Alt+5) for Gnome Calculator (on Ubuntu 18.10), it's run normally. keyboard shortcuts for gnome-calculator

Maybe you need to "Reset All..." and set Shortcuts again.

slava
  • 3,887