Shutter with XMonad

For me, Shutter is the best open-source screenshot program available for Linux. When I used Windows, I really liked Snagit – Shutter is a good alternative.

Installing Shutter

Installing Shutter is straight forward enough. However, before doing so, I added a couple of use flags to enable the drawing tools and afford the functionality of taking screenshots of websites. This needed if you want similar functionality to Snagit where you can easily take a screenshot and then quickly and easily edit it. Such as highlighting an area or blurring-out sensitive information.

echo "x11-misc/shutter drawing webphoto" >> /etc/portage/package.use

To install, simply type.

emerge --sync
emerge --ask shutter

Configuring XMonad

If you’re using XMonad and you are unable to use Shutter due to error messages similar to the one below, you’ll need to make sure your xmonad.hs file is configured to use EWMH Hints, which is required by Shutter.

Error while taking the screenshot: Maybe mouse pointer could not be grabbed or the selected area is invalid.
Error while taking the screenshot: Maybe mouse pointer could not be grabbed or the selected area is invalid.

Open up ~/.xmonad/xmonad.hs with a text editor.

nano ~/.xmonad/xmonad.hs

We need to import the following package.


import XMonad.Hooks.EwmhDesktops
...

You’ll also need to define the handleEventHook and logHook properties as show below.


...
handleEventHook = ewmhDesktopsEventHook,
logHook = ewmhDesktopsLogHook,
...

Don’t forget to recompile XMonad by pressing the modification key (Windows key on my system) with q.

WinKey + q

Resources

Shutter – Screenshot Tool: Official site.
http://shutter-project.org

Gentoo Browse: x11-misc/shutter
http://gentoobrowse.randomdan.homeip.net/package/x11-misc/shutter

Wikipedia: Extended Window Manager Hints
http://en.wikipedia.org/wiki/Extended_Window_Manager_Hints

Github.com: ahitrin / xmonad-config
https://github.com/ahitrin/xmonad-config/blob/master/xmonad.hs

Be the first to comment

Leave a Reply