Adding a return URL during logout with CAS

On 11 January 2012, in IT, Web, by David

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, you can add a ?url=http://my.url/ to the logout URL and get this (likely, depends on your CAS settings) displayed as a link on the logout page. So, a full URL like this is good to go:


https://cas.foo.edu/cas/logout?url=http://davidjb.com/
Tagged with:
 

Configuring pulseaudio-equalizer defaults

On 16 December 2011, in Hardware, IT, Linux, Software, by David

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 audible and this is a very bad thing.

Continue reading »

Tagged with:
 

Notes about Redmine and GitHub Post-commit Hooks

On 14 December 2011, in IT, by David

We’re currently using Redmine for our project tracking and recently have wanted to have our GitHub projects automatically get updated within Redmine. A post-commit hook to the rescue!

Continue reading »

Tagged with:
 

If you’ve migrated your site from earlier versions of Plone to the latest ones in the 4.x series, or else have started using plone.app.discussion earlier than that, you might have come across a situation where comments on your site show user IDs as authors rather than a user’s full name. If you see this anywhere, chances are your comment’s migration didn’t go according to plan, and that the Creator information didn’t get recorded correctly on the comment.

I’ve just written this on the Collective developer docs: http://readthedocs.org/docs/collective-docs/en/latest/misc/upgrade.html#fixing-creator-details-on-existing-comments

The script there should help by stepping through all comments on your site and fixing up the creator details as required. As mentioned in the comments beneath the script, the mileage you get may vary depending on the state of your comments. I found half my site’s comments were fine and half weren’t. Some of mine had no author name, email, or user ID in the relevant fields, and the script there checks for these (and the actual existence of a user after looking up what’s in the Creator property), so that should be enough to sanity-check so it won’t stomp over correct comments.

That said, if for some reason, you happened to have a user with ID david and full name of Administrator, also had a user with the ID of Administrator, and had a comment which had an incorrect Creator but did have the three fields of author_username, author_name, and author_email, then it won’t affect those comments and you might just have to manually fix them up.

Tagged with:
 

So I recently purchased a new set of Logitech G930 headphones and am currently using them with the latest version of Ubuntu, 11.10.  Set up was a breeze – just plug, check your PulseAudio config, and play.  For those of you, like me originally, who were wondering whether the G930 works on Linux, it certain does on Ubuntu.

Now, it wasn’t all peaches and cream because of two things.  Firstly, the audio output with the default configuration was completely lacking any depth and ‘substance’ to the sound being produced.  I’m not an audiophile and I have slight hearing problems, but the sound was entirely lacking anything in the form of bass, and overall, just very tinny and washed out.  Praying it’s not the headset itself, I went and obtained pulseaudio-equalizer from this PPA (and it comes with its GTK counterpart, pulseaudio-equalizer-gtk).  Running the latter of these two commands brings you up the interface, and I selected the ‘Laptop’ preset and enabled this.  I had to re-jig around a little with clicking the ‘EQ enabled’ checkbox and the ‘Apply Settings’ button whilst listening to music but this preset makes things 100% better.  First hurdle solved.

The second issue was the constant static being introduced in my audio.  Only when sound was being played mind you, not just when the headset was sitting turned on in silence, so this lead me to think it must (hopefully) be something I could configure and not an interference issue or something hardware related.  Thankfully, I was right.  Firing up pavucontrol, my much-preferred application over the default Ubuntu sound panel, I found the static was being introduced when my headphone output device was set at 100% volume (the Output Device, not anything else). The static is gone after I dropped the device output back (I’m using 33%). If I need more amplification, then I can simply use the Equalizer virtual output device to increase the volume (and/or amplify the applications behind the output).

Now, the headset works fantastically.

Tagged with: