Update 2010-12-06: Ray points out that you can do this with gconf-editor, which is a much better solution.
It’s a handy feature of Gnome that pressing “PrntScrn” or “Alt+PrntScrn” will take a screen capture of the desktop or current window, respectively. However, in typical Gnome fashion, you can’t do anything more advanced. You can’t capture a region, or a window area. You can’t delay the capture. You can’t save the captures with iterating, numbered filenames. However, the equivalent KDE tool can do all of those things, and you can make Gnome use it.
When you press the PrntScrn key, Gnome calls gnome-screenshot
. When you press Alt+PrntScrn, it calls gnome-screenshot --window
. Again, typical Gnome design means you cannot configure what command is called. But you can make your own gnome-screenshot
script which calls ksnapshot
.
Create a script in /usr/local/bin or $HOME/bin (if you have that in your path), and edit it.
sudo touch /usr/local/bin/gnome-screenshot
sudo chmod 755 /usr/local/bin/gnome-screenshot
sudo vi /usr/local/bin/gnome-screenshot
Now paste in the following:
#!/bin/sh if [ "$1" = "--window" ] ; then ksnapshot -c else ksnapshot fi
Save and quit, and you’re done! Pressing PrntScrn now opens ksnapshot
.
-
Hi Tyler,
I think you just need to use gnome-screenshot –interactive to get the dialogue box that enables you to choose your settings. You can also use -a (Grab area), -d X (Delay Xs) for example.
$ gnome-screenshot –help
Usage:
gnome-screenshot [OPTION…] Take a picture of the screenHelp Options:
-h, –help Show help options
–help-all Show all help options
–help-gtk Show GTK+ OptionsApplication Options:
-w, –window Grab a window instead of the entire screen
-a, –area Grab an area of the screen instead of the entire screen
-b, –include-border Include the window border with the screenshot
-B, –remove-border Remove the window border from the screenshot
-d, –delay=seconds Take screenshot after specified delay [in seconds]
-e, –border-effect=effect Effect to add to the border (shadow, border or none)
-i, –interactive Interactively set options
–display=DISPLAY X display to use-
No need to go through all that. Gnome most certainly *does* allow you to change this. Run gconf-editor, navigate through to apps >> metacity >> keybinding_commands and change the gnome-screenshot bindings to ksnapshot.
gconf-editor is your friend. Gnome has most of these things configurable, but has consistently stated that it won’t be in the *default* UIs for people. They’d be happy for someone to write a ‘power user’ tool, but there’s little call for it.
-
4 comments
Comments feed for this article
Trackback link: https://www.tolaris.com/2010/12/01/replacing-gnome-screenshot-with-ksnapshot/trackback/