Category Archives: Computers

pkexec not found workaround

I’m setting up an old and slow laptop (EeePC 701) as mainly a console-only machine, but I do have XFCE4 on there for my kid to play around with, which he has to start with startx.

I don’t have policy-kit installed, so when he tries to launch Synaptic, XFCE freezes up. The output on the console says pkexec was not found.

Instead of installing pkexec and policy-kit, I just symlinked gksudo to pkexec.

sudo ln -s /usr/bin/gksudo /usr/bin/pkexec

Problem solved.

Posted in Computers | Leave a comment

How to Flip All of XOrg Upsidedown

I recently hung an old iMac upsidedown from the ceiling to be used as a media center. It’s out of reach of the kids, but I needed to flip the video upside down. Since I am using Linux, I needed X11 to be inverted.

Upside Down Mac
Upside Down Mac


It ended up being really easy.

1) Generate an xorg.conf file:

sudo X -configure

(This is saved in ~/

2) Copy the xorg.conf file to /etc/X11
sudo cp ~/ /etc/X11

3) Restart X to make sure the conf file is good
sudo service kdm restart

(or sudo service lightdm restart, or whatever you’re using)

4) Edit /etc/X11/xorg.conf
Find the “Monitor” section and add this line:

Option "Rotate" "inverted"

5) Restart X11 again to apply the change. It should now appear upside-down


One shortcoming — If you have an built-in¬†video camera, this does not flip the video camera upside down too. Since this is a media center, they won’t be needing the video camera at the moment.

Posted in Computers, Projects, Something Interesting | Leave a comment

GeoServer GetLegendGraphic Fails With “Width (0) and height (0) cannot be <= 0"

I had a weird issue with WMS GetLegendGraphic requests failing with the following message:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE ServiceExceptionReport SYSTEM ""&gt ;<ServiceExceptionReport version="1.1.1" &gt ;<ServiceException>
java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0
Width (0) and height (0) cannot be &amp;= 0

This was weird because my request definitely included non-zero height and widths, like so:


Eventually I tracked it down to an issue with the SLD xml. The XML was valid, but GeoServer didn’t like the use of CDATA tags inside of <Name>,<Title> and <ogc:Literal> tags.

So anywhere with formatting like this

<![CDATA[Parcel Area]]>
<![CDATA[ Low Density Residential ]]>

had to be changed to

<Name>Parcel Area</Name>
<Name>Low Density Residential</Name>

Once I got rid of the CDATA tags everything worked beautifully.

This issue was on GeoServer 2.5. YMMV, etc.

Posted in Computers, GIS Portfolio, Programming | Tagged , , , , | Leave a comment