Results 1 to 8 of 8

Thread: Change default calculator

  1. #1
    Join Date
    Jul 2005
    Location
    Winter Haven, Florida, US
    Beans
    142
    Distro
    Ubuntu 11.04 Natty Narwhal

    Change default calculator

    Ubuntu uses gcalctool as the default calculator application. When I press the calculator button on my keyboard, it opens gcalctool. Is there a way to change this to open qalculate instead? I know I can set another keyboard shortcut for it, but having it pop up when I hit the calculator key would be nice.
    Ubuntu 11.04, exclusively Linux since 2000.

  2. #2
    Join Date
    May 2009
    Location
    /eu/uk/sco/fife/st_a/home
    Beans
    458
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Change default calculator

    I don't think there's any software for the re-mapping of keys. I'm not on my Ubuntu box right now, so I'll check back later.

  3. #3
    Join Date
    Jan 2010
    Location
    65 AD
    Beans
    304
    Distro
    Ubuntu Development Release

    Re: Change default calculator

    Enter the following code in terminal and it will open up your .Xmodmap file in your home directory and print the keycode number for your calculator key. Copy the keycode up to and including the equal sign and paste it into your .Xmodmap file. When you reboot your calculator key will be stripped of identifiers that make the shortcut work. Then you can make a new shortcut to qalctool and use the same key and it will only work for qalctool.
    Code:
    gksudo gedit ~/.Xmodmap | xmodmap -pke | grep -i calc | grep -o '^.*='
    You can revert the key back to normal by opening .Xmodmap and deleting the keycode command and rebooting:
    Code:
    gksudo gedit .Xmodmap

  4. #4
    Join Date
    Aug 2006
    Beans
    39

    Easiest Solution

    I think the easiest solution is to turn the original gcalctool file into a link to qalculate.

    Code:
    sudo mv gcalctool gcalctool_original
    sudo ln -sT /usr/bin/qalculate-gtk /usr/bin/gcalctool
    It works instantly. To undo, you would just:

    Code:
    sudo mv /usr/bin/gcalctool_original /usr/bin/gcalctool

  5. #5
    Join Date
    Jan 2009
    Beans
    2

    Re: Change default calculator

    I just tried:
    Code:
    sudo mv gcalctool gcalctool_original
    and got:
    mv: cannot stat `gcalctool': No such file or directory

    I know gcalctool is installed. Any suggestions?
    Last edited by swwing17; August 2nd, 2010 at 04:20 PM. Reason: code boxes

  6. #6
    Join Date
    Jan 2009
    Beans
    2

    Re: Change default calculator

    The instructions in the previous posts didn't work for me, so I went into (in Linux Mint) Menu>"Keyboard Shortcuts", clicked "Add". In the "Name" box I typed "Launch Qalculate", and in the "Command" box I put /usr/bin/qalculate-gtk. I clicked "Apply". I then (still in Keyboard Shortcuts) scrolled to "Launch Qalculate", clicked on the "Shortcut" column where it said "Disabled", so it said "New shortcut...", and pressed the keyboard key I want to assign to launch it. Closed "Keyboard Shortcuts", and it works now.

    I hope this helps.

  7. #7
    Join Date
    Jan 2009
    Location
    Toronto, Canada
    Beans
    214
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Change default calculator

    Quote Originally Posted by swwing17 View Post
    I just tried:
    Code:
    sudo mv gcalctool gcalctool_original
    and got:
    mv: cannot stat `gcalctool': No such file or directory

    I know gcalctool is installed. Any suggestions?
    Do this first:

    Code:
    cd /usr/bin

    /luigi

  8. #8
    Join Date
    Mar 2008
    Beans
    17

    Re: Change default calculator

    I have same problem, so the following procedure should fix your problem:

    1. find the key value of your calculator key in system--preference--keyboard shortcut

    2. in terminal, type in following command
    Code:
    gconf-editor
    Go under apps/metacity , you should see

    global_keybindings and keybinding_commands.

    If you click on global_keybindings, on the right pane you will find some entry for commands, like: run_command_1, run_command_2, etc. These have to be filled up with the relevant keysym for your key (like: XF86Play, XF86MyComputer, etc. use xev to see).
    Then you can assign the matching command (or script) on the other row, under keybinding_commands.

    you can find more details here
    https://help.ubuntu.com/community/MultimediaKeys

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •