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

Installing XMonad on Gentoo

I have already installed Gentoo with a Kernel supporting NVidia graphics cards using the open-source Nouveau driver. I also have a working installation of Xorg server.

Now all that’s left to do now is install XMonad!

emerge --ask xmonad xmonad-contrib

Notes that will probably be removed/deleted

The above pulled in a lot of additional software and took quite a long time to complete. However, all seemed to work. Here I should mention about how to start and link to command/cheatsheet etc. Include .xinitrc and how .xsession does not work (should be removed it present).

After that I decided to install firefox. That too pulled in a lot of software and took ages to complete. More so than the above! I did need to add the following to package.use.

=/dev-lang/python-2.7.5 sqlite

After the installation, I saw the below Portage warning messages.

* For more information on udev on Gentoo, upgrading, writing udev rules, and
*     fixing know issues visit:
*     http://wiki.gentoo.org/wiki/Udev
*     http://wiki.gentoo.org/wiki/Udev/upgrade

* Messages for package sys-fs/udisks-2..1.0:

*    CONFIG_USB_SUSPEND:               is not set when it should be.
*    Please check to make sure these options are set correctly.
*    Failure to do so may cause unexpected problems.

* Messages for  package media-video/mjpegtools-2.0.0-r3:

* mjpegtools installs user contributed scripts which require additional
* dependencies not pulled in by the installation.
* These have to be installed manually.
* Currently know extra dependencies are: ffmpeg, mencoder from mplayer,
* parts of transcode, mpeg2dec from libmpeg2, sox, toolame, vcdimager, python.

* Messages for package app-misc/strigi-0.7.7-r2:

* Because you didn't enable either of the available backends:
* clucene or hyerestraier, strigi may not be functional.
* If you indend to use standalone strigi indexer (not needed for KDE),
* be sure to reinstall app-misc/strigi with either cluence (recommended)
* or hyperestraier (unreliable) USE flag enabled.

* Message for package sys-auth/polkit-kde-agent-0.99.0-r1:

* WARNING! Your system configuration contains neither "kde-base/kdebase-runtime-meta"
* nor "kde-base/kde-base-startkde".  You need one of the above.
* With this setting you are unsupported by the KDE team.
* All missing features you report for misc packages will be probably ignored for closed as INVALID.

I made the above kernel change on the next next kernel upgrade but as far as I could tell XMonad seemed to work fine without it anyway.

Resources

Arguments With My Friends – How to Install Xmonad on Gentoo
http://awmf.blogspot.co.uk/2007/08/how-to-install-xmonad-on-gentoo.html

Haskell.org – Tutorials
http://www.haskell.org/haskellwiki/Tutorials

learnyouahaskell.com – Learn You a Haskell for Great Good!
http://learnyouahaskell.com/chapters

Gentoo Wiki – Xmonad
http://wiki.gentoo.org/wiki/Xmonad

Haskell.org – Xmonad/Installing xmonad
http://www.haskell.org/haskellwiki/Xmonad/Installing_xmonad

Haskell.org – Xmonad/Basic Desktop Environment Integration
http://www.haskell.org/haskellwiki/Xmonad/Basic_Desktop_Environment_Integration

Wikipedia – xmonad
http://en.wikipedia.org/wiki/Xmonad

Think In Geek – Simple guide to configure xmonad, dzen2 and conky
http://thinkingeek.com/2011/11/21/simple-guide-configure-xmonad-dzen2-conky/

Wikipedia – Conky (software)
http://en.wikipedia.org/wiki/Conky_(software)

Gentoo Wiki – rxvt-unicode
http://wiki.gentoo.org/wiki/Rxvt-unicode

Haskell.org – Xmonad/General xmonad.hs config tips
http://www.haskell.org/haskellwiki/Xmonad/General_xmonad.hs_config_tips

Haskell.org – Xmonad/Config archive/John Goerzen’s Configuration
http://www.haskell.org/haskellwiki/Xmonad/Config_archive/John_Goerzen%27s_Configuration

ArchLinux – Xmonad
https://wiki.archlinux.org/index.php/Xmonad

Haskell.org – Xmonad/Frequently asked questions
http://www.haskell.org/haskellwiki/Xmonad/Frequently_asked_questions#Replacing_greedyView_with_view

How-To Geek – How to use Xmonad, a Tiling Window Manager for Linux
http://www.howtogeek.com/114728/how-to-use-xmonad-a-tiling-window-manager-for-linux/

Huntly Cameron Web Stuffs – How-to: Set up XMonad & XMobar on Ubuntu
http://www.huntlycameron.co.uk/2010/11/how-to-set-up-xmonad-xmobar-ubuntu/

Haskell.org – Xmonad/Using xmonad in Gnome
http://www.haskell.org/haskellwiki/Xmonad/Using_xmonad_in_Gnome

Xmonad.org – XMonad.Config.Gnome
http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Config-Gnome.html

Xmonad.org – XMonad.Layout.PerWorkspace
http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-PerWorkspace.html

Xmonad.org – xmonad-0.11 manual
http://xmonad.org/manpage.html

Xmonad.org – A guided tour
http://xmonad.org/tour.html

ArchLinux – dmenu
https://wiki.archlinux.org/index.php/Dmenu

ArchLinux – Gmrun
https://wiki.archlinux.org/index.php/Gmrun

Haskell.org – Xmonad/Using xmonad in KDE
http://www.haskell.org/haskellwiki/Xmonad/Using_xmonad_in_KDE

Xmonad.org – XMonad.Config.Kde
http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Config-Kde.html

Xmonad.org – XMonad.Doc.Configuring
http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Doc-Configuring.html

cgogolin.de – sample xmonad.hs by Christian Gogolin
http://www.cgogolin.de/downloads/xmonad.hs

Shinobu’s Secrets – Tag Archives: xmonad
http://zuttobenkyou.wordpress.com/tag/xmonad/