Monday, 27 June 2011

Gnome-do Suspend not working in Ubuntu Lucid 10.04

I love Gnome-do, but the version in the Lucid repo stopped at 0.8.3.1 (and 0.8.2.1 for gnome-do-plugins), which had a bug that meant Suspend didn't work (from the Session Management plugin). After noticing this had been fixed in a later version, I resorted to grabbing the latest version of the source code and compiling it myself. This was a surprisingly easy task.

1) Get the dependencies (including Bazaar which you need to download the source code)
sudo apt-get install bzr
sudo apt-get build-dep gnome-do
sudo apt-get build-dep gnome-do-plugins
2) Download the source code
bzr branch lp:do gnome-do
bzr branch lp:do-plugins
3) Install (do this for both of the new directories)
cd gnome-do
./autogen.sh
make
sudo make install
4) Restart gnome-do and enable GNOME Session Management plugin

Note: I actually left the old repo versions installed, in the hope that there may be some dependencies fulfilled. Hopefully this wont cause any headaches in the future (it hasn't so far).

Sunday, 5 June 2011

Ubuntu 11.04 Natty - Slow Alt+Tab Window Switcher

If you regularly use the Alt+Tab window switcher, and find it is annoyingly slow to launch, simply go into the Compiz Config Settings Manager (you will need to install this if you havent already - it's in the repos), and look under Window Management > Static Application Switcher and then click the Behaviour tab, and set the Popup Window Delay to 0.

Rather odd that it would be set to anything else if you ask me...

Friday, 3 June 2011

Minify JavaScript in Eclipse with Google Closure Compiler

Recently I decided it was time to start minifying my jQuery scripts before deploying them to decrease download time. After lots of research, I found Google Closure Compiler, which not only minifies, it also obfuscates and even optimises your scripts (dead code removal etc)! The best place to get this done is within Eclipse, and you can do it using a plugin by Rock Star Apps. Details here: http://update.rockstarapps.com/index.html.

Basically, add this URL to your Eclipse Software Sites: http://update.rockstarapps.com, and install Rockstar Web Optimizer. You should then be able to right click a Javascript file and go Rockstarapps > Compress and you get loads of options like Google Closure Compiler, YUI Compressor etc.

You can even tell it to auto-build. When you are on the options screen, select "Automatically recreate file when one of it's dependencies changes", and then it will rebuild every time you save the source file.

UPDATE: sadly it appears rockstarapps are no more. If anyone knows of another way to achieve this, I would be very grateful!

Wednesday, 1 June 2011

CentOS php-config: command not found

If you try using php-config, and you get the error: "command not found", you just need to install php-devel.
sudo yum install php-devel