Archive for January, 2012

Command line book

The Linux Command Line by William E. Shotts, Jr. is more than a reference book, it is a full fledged guide to the Linux command line.  It provides a great top to bottom look at the command line and helps to get you to think about how the command line can make your life easier.  It is available in print and as a free Creative Commons licensed download from here.

QGIS git

QGIS 1.7.3 segfaults for me because I upgraded the sip package.  Rather than downgrade sip I decided to try qgis-git from AUR.  It compiled for me without any problems and it has been stable in the short time I’ve used it.  It is a good alternative to use until the next official QGIS release.

Print to PDF

I’ve got print to PDF options in both Chromium and Firefox.  How long have they had this feature?  Do the Windows version have it too?   I know Firefox on Windows didn’t as of this summer, I had to install a program that set itself up as a printer and it generated the PDF.  Man, this has got me feeling dumb.  Ahhh doy!

Batch Geocoding with TIGER Geocoder 2010

I’m compiling a database of all the microbreweries in my state.  So far I’ve got a list of 43 breweries and their addresses.  I’ve geocoded them against the 2010 TIGER street centerlines.  I used a batch geocoding example from PostGIS in Action the basis for this query.

Continue reading

Spotify Linux beta 0.8


The PKGBUILD for 0.8.2 handles the Flash issue for you.  Click here for details.

The latest Linux version of Spotify catches up to the Windows version.  Hooray!  However, it is still in beta and one of the bugs in the program causes it to segfault when using the newest version of Flash.  Boo!  The current maintainer of the AUR pkgbuild came up with a workaround, get a copy of the previous version of Flash and use a shell script to point Spotify to it and so far this has worked for me.  Get the details below the jump.

Continue reading

Changing permission on files created by pl/r

With pl/r you have all the functions and abilities of R itself built available to you from your Postgres queries.  Among these is the ability to create image files of graphs.  When you create these graphs, however, by default they are given read-write permission to only the user who controls the Postgres daemon, usually that user is postgres.  There are no permissions for group or other so to see the image file you have to either chmod or chown the file as root and grant the permissions after the fact.  To save this step you can add the chown statement to your pl/r function.

system("chmod 666 /tmp/graph.png")

With the above statement your image, graph.png, will be read-writeable to the file’s user, group, and everyone.

Pacman 4 Upgrade

Pacman 4 has moved from testing to core.  The upgrade caused some dependency hell for me, I had to uninstall a few packages before pacman itself would upgrade.  They were:


Once those packages were removed pacman upgraded just fine.  Once pacman is upgraded you’ll need to do some additional steps to get package signing to work.  Check out this blog post and wiki page for details:


PL/R is one of many language extensions to Postgres that allow you to write functions and triggers in the programming language of your choice, in this case the R language.  R is widely used in statistical analysis, the GIS community is using it more and more often, see this Boston GIS pl/r tutorial for more information.

To get pl/r up and running on Arch you first have to have R itself installed.  Luckily R is in the main package repository and can be installed with a simple pacman -S r.  The R package puts its dynamically linked library in a non-standard location so you’ll need to tell the library linker where to find it so pl/r can make use of it.  To do so go to the /etc/ directory and as root, or through sudo, create a file called R.conf.  The file only needs one line, the path to the R library:


Then as root or through sudo run:


Next you’ll need to install pl/r from AUR.  If you’re running a 64 bit system you’ll want to edit the PGKBUILD file’s Arch section and add ‘x86_64’.  It is missing from the PGKBUILD, it may be added to later versions.

Once pl/r is compiled and installed you’ll need to add it to the databases you want to do statistical analysis on.  If you’re running Postgresql 9.1 or greater pl/r can be installed as an extension.  The easiest way to do so is through pgadmin3.  Just select the database, right click on Extensions, select Add New, then select pl/r from the drop down.

Over the last few weeks I’ve been going back through the 2011 baseball season and rewatching games via  Chromium and the Linux version of the 64 bit flash plugin handle everything just fine.  When my persnickety internet connection cooperates (it can be a bit slow sometimes) I get full HD quality, but most of the time it sits just a notch below the highest quality they offer.

uDig 1.3.1

uDig 1.3.1 was released a few days before the holidays, but I’m just now getting around to installing it.  The AUR pgkbuild for uDig is stuck at 1.1.1, but that’s not a big problem because uDig’s a java / eclipse based program.  To install 1.3.1 on 64 bit Arch:

Download the installer linked here

cd to the directory where the installer zip was downloaded

Unzip the installer with the following command:

sudo unzip -d /opt/

Make a symlink in /usr/bin that points to the shell script that launches uDig:

sudo ln -s /opt/udig/ /usr/bin/local/udig

And you’re good to go (assuming /usr/local/bin is in your path).  When the next version comes out you can simply sudo rm -rf /opt/udig and replace it with the new version.