nvPY on Gentoo

nvPY is a fast, simple to use, no fuss, cross-platform note taking application. One of the big benefits is that all your notes are stored somewhere on the cloud – so you don’t need to worry about them!

Unfortunately we can not simply use emerge to install nvPY, so there are a few prerequisites prior to installation.


There are not many prerequisites to nvPY but here they are all the same.

Simplenotes Account

In order to use nvPY, you will first need to create yourself a simplenotes account at simplenote.com. Now armed with your simplenotes login credentails, you can begin to install.


Because vnpy is not available through the Gentoo package manager, we first need to make sure we have the git client installed so that we can download the source code.

emerge --ask git


At the time of writing, nvpy works best with python version 2.7.x and it currently does not work very well yet with python 3.x. Also, nvpy requires that the python version to be used is compiled with support for TkInter.

I already have dev-lang/python-3.3.2-r2:3.3 install as my default. To install a lower version, like 2.7.x but keep 3.x as your default, do. Note, you will need to be root.

emerge -av python:2.7

If, like me, you already have python 2.7.x installed, make sure it is compiled with TkInter support. If not, as root, do the following.

echo "=dev-lang/python-2.7.5 tk" >> /etc/portage/package.use
emerge --ask --newuse =dev-lang/python-2.7.5-r3


You should now be able to simply follow the instructions on github. To summarise (copy really I guess), see below. Make sure you do this as a normal user.

git clone git://github.com/cpbotha/nvpy.git
cd nvpy
python nvpy

Launch nvPY

In order to run nvPY, it first needs to be able to connect to your SimpleNotes account. So before you first try to run nvPY, create the following file, making sure only your normal user can read it.

nano ~/.nvpy.cfg

Populate it with only the following information. Obviously, replace the values on the right hand side of the equals sign with your SimpleNotes login credentials.

sn_username = your_simplenote_username
sn_password = your_simplenote_password

Make sure only you can read it.

chmod -v 600 ~/.nvpy.cfg

Finally, try running it.

python2.7 nvpy &

Hopefully that worked!!

nvPY installed on Gentoo

Yay!! Job done!


The Official Site – GitHub:

How to install Python Tkinter in Gentoo Linux:

How to choose python version to install in gentoo:

Create a Self-Signed Certificate for Apache

Contained within an SSL certificate is information that pertains to you and your secured domain. Lets imaging that you have a web hosting company called Spider and the details for which are shown below.

Country Name (2 letter code):		UK
State or Province Name (full name):	Surrey
Location Name (city):			Camberley
Organisation Name (company):		Spider Web Hosting
Organisation Unit Name (section):	IT Support
Common Name (your domain name):		spiderwebhosting.com
Email Address ():			webmaster@spiderwebhosting.com

A challenge password: 			leave blank
An optional company name: 		leave blank

Generate a Private Key and Certificate Signing Request

Here we generate a Certificate Signing Request and populate it with our details. The -nodes flag tells openssl to create a private key that does not require a pass-phrase. Emitting this flag will prompt for a pass-phrase every time you use it. If installing it on Apache, this will mean entering it every time the Apache service is restarted.

openssl req -new -nodes > spiderwebhosting.com.csr

The above command will generate the CSR and the private key in your current directory.


Generate the Certificate

To generate a certificate, you need a Certificate Signing Request and a private key. The output of the below command will create a certificate valid for 365 days, called spiderwebhosting.com.cert within your current working directory.

openssl x509 -in spiderwebhosting.com.csr -out spiderwebhosting.com.cert -req -signkey privkey.pem -days 365

Make sure that the private key is not world-readable but the certificate is.

chmod go-rwx spiderwebhosting.com.cert

The above command removes read, write and execute permissions from the group and other users.


Linux.com: Creating Self-Signed SSL Certificates for Apache on Linux

Hosting.com: Generate a Self-signed SSL in Linux

Unix and Linux System Administration, fourth edition; Nemeth Snyder Hein Whaley.
pages 971-973

The Most Common OpenSSL Commands

What is a Pem file and how does it differ from other OpenSSL Generated Key File Formats?

Generating 2048-bit CSR with OpenSSL

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


Shutter – Screenshot Tool: Official site.

Gentoo Browse: x11-misc/shutter

Wikipedia: Extended Window Manager Hints

Github.com: ahitrin / xmonad-config

Gentoo: Temporarily Configure Networking

This can be useful if your working from a LiveCD or testing the network. Note, “temporary” means it will not survive a reboot! To configure networking, adjust the below command for your own environment.

ifconfig eth0 broadcast netmask up
route add default gw

The above commands assign the static IP address of to the eth0 interface and defines the default gateway as

You might also need to add some nameservers to your /etc/resolv.conf configuration file.


Again, this configuration will be lost after a reboot. To permanently create these rules, use the /etc/conf.d/net configuration file.