11

Currently elementary OS Freya uses gnome-screenshot as its default screenshot utility.

This has an annoying bug were screenshots of active windows will show the background around the border.

I've found that screenshot-tool, an app built for elementary OS, solves this while integrating nicely with the system.

How can I change the default application that launches when PrtScrn is pressed, from gnome-screenshot to screenshot-tool?



To install screenshot-tool you can add its PPA, as instructed in the elementary-apps blog:

sudo apt-add-repository ppa:fabiozaramella/screenshot-tool && sudo apt-get update
sudo apt-get install screenshot-tool

3 Answers 3

5

You can add a new keyboard shortcut:

First, open system settings and click keyboard:

Chose Custom, in the sidebar

Click the + button

Enter your command - in this case screenshot-tool

Click "Disabled", then press your chosen shortcut (in this case PrtScrn). You will have to accept it disabling the old shortcut, and then it will show up:

Finally, you have to log out and back in for the shortcut to be active.

6
  • Thanks for the answer Tim, but I already know how to set a custom keyboard shortcut. I asked how can I use the default shortcut to take a screenshot but re-direct it to this application instead of gnome-screenshot.
    – Gabriel
    Jul 12, 2015 at 14:25
  • @Gabriel by reassigning the shortcut to the new application will do exactly that.
    – user3
    Jul 12, 2015 at 14:28
  • @Gabriel You can use PrtScrn as the new shortcut - for screenshot-tool. As it is the same key, you won't have to change what you press
    – user3
    Jul 12, 2015 at 14:46
  • @Gabriel - when you select the PrtScrn for the new program, you will be asked if you want to re-assign the shortkey
    – user170
    Jul 12, 2015 at 16:53
  • So with custom shortcut assigned, its will disable the previous one, right? Jul 13, 2015 at 17:54
0

You could make the gnome-screenshot command run screenshot-tool.

First, make a new file in your home area, called .bash_aliases, and edit it.

touch .bash_aliases
scratch-text-editor .bash_aliases

Then into it put the following:

alias gnome-screenshot='screenshot-tool'

and save it.

I'm not sure the system settings will listen to this however.

-1

You can change what the binary /usr/bin/gnome-screenshot points to.

First, rename it:

cd /usr/bin
sudo mv gnome-screenshot gnome-screenshot-old

Then create a link from screenshot (the executable for screenshot-tool) to gnome-screenshot:

sudo ln -s screenshot gnome-screenshot

now when you run the command gnome-screenshot it will open screenshot-tool.


Note, however, that the shortcut PrtScrn may be assigned to gnome-screenshot -w (or with some option). It probably isn't, but if it is it will cause this solution to fail.

1
  • You would need to repeat this procedure after each gnome-screenshot update. Aug 26, 2015 at 12:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.