Posts by 'davidjb'

Configuring GTK/Gnome toolbar icon sizes and labels (Ubuntu 12.10+ and more)

One major annoyance (first-world, clearly) for me having upgraded to Ubuntu 12.10 is that my GTK toolbar icons are very large (32x32 pixels) and have labels on them. This takes up a decent amount of screen real estate in applications like gedit, Rhythmbox, and many others — effectively anything that’s using GTK. What’s worse, it looks like the latest Ubuntu (Quantal Quetzal) now is adding visual padding/spacing around the buttons. I don’t like this at all and prefer my buttons to be tiny and without labels.

As per the post at http://ubuntuforums.org/showthread.php …

Virtualenv being ignored by setuptools/Distribute/easy_install

This one couldn’t be simpler, but it’s worth noting all the same.  I’ve just experienced a situation where a virtualenv  was being completely ignored by all tools even though it was absolutely activated via source bin/activate.

The answer was to blow away the lib directory within the virtualenv and blow away the local Python interpreter at bin/python and re-create the virtualenv. After deactivating and re-activating, everything works correctly again.

I guess something in the environment (or env variables) got messed up. Who knows; it works now.

Restart/reset USB in Ubuntu 12.04 without rebooting

Either my Dell Optiplex 990 computer or my Linux install has an issue: occasionally, when I re-plug a USB device into the system, it’ll cause a fault in the USB module in the kernel and USB goes dark. I’m unsure as to whether this is a hardware or software issue, but I’d simply like to restart my USB subsystem and continue working. When searching the web for ‘restart USB in Linux’ and ‘reload USB kernel module’, you get a plethora of results and none of which will work (seemingly due to how the Ubuntu standard kernel is …

Members can’t add folders to Plone via WebDAV (401 Unauthorized)

This is a mirror of the (excellent) documentation at http://plone.org/documentation/error/unable-to-create-a-folder-through-webdav/, but just a short editorial to also highlight that this is still very applicable to Plone 4.x. Effectively, the symptom is that users will report seeing a “401 Unauthorized” error when trying to create folders within areas they have access to as an Owner.  Without further ado, the documentation:

Using a WebDAV client on a Plone site, site users are unable to create newfolders directories where they have Owner role.

Problem:

The WebDAV “make folder” method, MKCOL, requires the “Add Folders” permission. This is …

Jenkins CI and GitHub post-receive hooks ceasing to work (+ potential solution)

All projects fail

Recently our Jenkins CI system began having issues with failing to correctly accept post-receive hook POST requests from GitHub, even though it was working fine. Without thorough testing, I can only really see that the issue was related to upgrading Jenkins and/or the relevant Git and GitHub plugins. Thankfully, with even newer versions of the above, it has started working again. So, to those with issues, I offer this KGS (Known Good Set) of versions for your help:

  • Jenkins 1.470
  • Jenkins GIT plugin 1.1.19
  • github-api 1.28
  • GitHub plugin 1.4

Some projects …

Serving TileStache (or another app) using uWSGI against a web sub-directory

uWSGI is extremely promising as an application server given its huge range of options and supported platforms.  For me, however, just getting something seemingly simple up and running successfully was relatively confusing. I’d like to contribute to the documentation when I can, but thought a dedicated page about TileStache as a specific application (and associated configuration) was warranted. It does make more sense now, thankfully.

I want to serve my TileStache application at http://mydomain.com/tiles (taking careful note of the sub-directory present). I’ve chosen an INI-style configuration for my instance and here’s what the …

mr.scripty - my new best friend

If you’re working with Buildout, then check out mr.scripty, a fantastic Buildout recipe that allows you to use Python code in functions within its options.  This means that - in the few instances I’ve used it so far - have conditional statements regarding effectively anything.

In the two examples I added to the source documentation, I go and configure download links based upon architecture and separately, configure some (Java) environment variables based upon which directories exist (eg to handle different Linux distributions that might be running). This is only the start, but it’s a fantastic one.

Amazing I …

Java HTTP request fails with “javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated”

Searching the above-mentioned stack trace reveals lots and lots of results, unsurprisingly.  Most results are workarounds where you modify the code, but what about if an application (like Jenkins/Hudson CI, in my case) throws this error at you? The reason the error is occurring is because the SSL certificate of the target you’re connecting to isn’t considered valid by your Java instance’s keystore. This may be because the certificate itself is invalid, or, in my case, the CA chain couldn’t be validated (my OS is RHEL (Red Hat) 5.7, with OpenJDK 1.6).  For …

Adding a return URL during logout with CAS

CAS (Central Authentication Service) is a single-sign-on service (say that several times quickly) and through accessing a CAS /logout URL, as an application, you’re able to log the given user out.  What wasn’t clear (by Googling) was whether there’s a possibility to redirect the user back to the original application (or a given URL).  I now know, thanks to the CAS Protocol Documentation (section 2.3), that any posts that mention adding ?service=http://my.url/ to the /logout URL are incorrect, as this isn’t a valid parameter (at least not at time of writing).

However …

Configuring pulseaudio-equalizer defaults

I’ve recently been using the Logitech G930 headset with my Ubuntu 11.10 install and I’ve found that the default configuration offers nothing in terms of decent sound (tinny, no bass, etc). Thankfully, I’ve been able to turn to pulseaudio-equalizer for help with turning down the treble and up the bass. However, using pulseaudio-equalizer-gtk wasn’t an entirely satisfying experience as the default volume for my headset kept being set to 100% upon restart. Now, if you recall my previous post on this headset, having the volume for the device set at 100% leads to static being …