Colin Harrington's complete blog can be found at: http://www.colinharrington.net/blog
2010-03-27 22:42:00.0
After setting up a laptop with Ubuntu, one of the things that I typically like to do is add a the CPU Frequency Scaling Monitor applet (cpufreq-applet) to my main Gnome panel.

I typically work running large web applications (Grails…) that typically use a lot of CPU power when running tests, launching the apps or refactorings within an IDE. I like the ability to quickly adjust the CPU ‘govenor’ which governs how the CPU is utilized from a power/performance perspective (see CPU Frequency Scaling in Linux for more).
Ubuntu 9.10 (Karmic Koala) uses Gnome 2.28.1 which requires authorization to change the CPU Frequency (which makes sense). Earlier versions did not require this authorization since it is new in Gnome 2.28.
With policykit-1 (also new in Ubuntu 9.10) you can grant yourself authorization for the cpufreq-applet based on a user or group by creating a policy file (at /var/lib/polkit-1/localauthority/50-local.d/org.gnome.cpufreqselector.pkla for example) that looks something like this:
[org.gnome.cpufreqselector]
Identity=unix-user:YourUser
Action=org.gnome.cpufreqselector
ResultAny=no
ResultInactive=no
ResultActive=yes
Thanks to this post/discussion for pointing this out
be sure you change YourUser to your username or group that you wish to have authorized.
I don’t know of a policy GUI that works with policykit-1 yet, so let me know if you find something.
I also replaced the icons in the /usr/share/pixmaps/cpufreq-applet/ with something I found on gnome-look.org
![]()
2010-02-04 00:25:00.0
This past month, I did a presentation at the Groovy Users of Minnesota which I called Grails: The View Layer. We took our time delving into the Groovy Server Pages, how Grails utilizes Sitemesh and some of the more obscure tags related to Sitemesh. Currently, Grails’ Sitemesh integration is not very well understood by the community at large and I wanted to spend some time on it since Sitemesh is such a powerful part of the Framework.
I was hoping to spend some more time polishing this slide deck, but hopefully this presentation skeleton is helpful to the community as it is. I am hoping to give this talk again at Gr8Conf in the USA this upcoming April and spend some more time creating more concrete and digestible examples.
2009-11-26 10:15:00.0
I asked a question on the GUM (Groovy Users of Minnesota) User list about how to achieve a user/machine specific config.
I didn't have much time to figure it out but this is what I ended up finding out:
Grails 1.1.1 create-app generates a Config.groovy with this as the first few lines that would have told me what I need to know if I actually took the time to read it:
// locations to search for config files that get merged into the main config
// config files can either be Java properties files or ConfigSlurper scripts
//
// grails.config.locations = [ "classpath:${appName}-config.properties",
// "classpath:${appName}-config.groovy",
// "file:${userHome}/.grails/${appName}-config.properties",
// "file:${userHome}/.grails/${appName}-config.groovy"]
//
// if(System.properties["${appName}.config.location"]) {
// grails.config.locations << "file:" + System.properties["${appName}.config.location"]
// }
So in my case all I had to do was put this in Config.groovy:
if (new File("${userHome}/.grails/${appName}-config.groovy").exists()){
grails.config.locations = ["file:${userHome}/.grails/${appName}-config.groovy"]
}
which allowed me to override properties by doing something like this in my ~/.grails/${appName}-config.groovy :
username = "sa"
password = "sekret"
// environment specific settings
environments {
development {
dataSource {
dbCreate = "create-drop" // use your imagination...
}
}
}
I also ran across a little gem that you can do the same type of config merging with your BuildConfig.groovy by implementing a ~/.grails/settings.groovy file. (yes its hardcoded rather than a config.locations property in BuildConfig.groovy – see BuildSettings.groovy for more)
Now I really wish there was a way to set defaults for things like server.port in the configs.
Thanks, Ted Naleid, Scott Vlaminck, and Robert Fischer for helping me find what I was looking for!
2009-10-25 00:27:00.0
SpringOne2gx was a blast this year. It was great to get to know many members from the community!
I was able to record the Grails BOF (Birds Of a Feather) session at SpringOne2gx this year: Download it Here (80MB)
Big thanks to SpringSource and No Fluff Just Stuff for putting together an awesome conference!
Props to Dropbox for allowing me to share this recording.
2009-10-08 23:44:00.0
Hulu Desktop (currently Beta) is now available on Linux! A friend tipped me off to an article on TechCrunch about it.
Downloading it and setting it up was pretty easy. I went to Hulu Desktop and selected download for linux. From there It gave me choices for Fedora and Ubuntu (both 32 & 64bit versions!) Since I run Ubuntu I downloaded and installed the deb – easy enough.
When you first launch it it asks you to accept the EULA.
The first time I launched Hulu Desktop I got an error, that "Hulu Desktop could not locate the Flash plugin. If you do not have it installed, please modify ~/.huludesktop with the correct location of libflashplayer.so." (remember the beta sticker?)

I had to edit the ~/.huludesktop file to use the wrapped version of the Flash plugin /var/lib/flashplugin-installer/npwrapper.libflashplayer.so and it worked like a charm!

Playback worked great, probably better than the in-browser experience. The interface is slick, better than the web-interface and more along the lines of Boxee. Fullscreen worked well for me.
Props to Hulu for providing a Linux version. The Linux desktop is a first class citizen. Skype has a Beta version that rocks on Linux. Google Chrome, Firefox, etc. Who is next? Adobe? CS5? I’d pay for Adobe CS5 on Linux.
So far its been pretty good stuff for Beta Software! I’ll definitely be using Hulu more now.
Here is a shot of the opening screen:
And another of the Menu (while watching media):




