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

Friday, 20 May 2011

Ubuntu 11.04 Natty - Changing the Number of Workspaces

OS: Ubuntu 10.04 Natty Narwhal

By default, Natty comes with 4 workspaces, which you can view by clicking the Workspace Switcher icon in the Unity Launcher. I personally don't like using multiple workspaces, so I wanted to change this to 1, so I didn't accidentally move windows to hidden workspaces (with hotkeys etc.) never to find them again. Others of you may want to reduce the number to 2, or even increase the number. An easy way to do this is with the Compiz Config Settings Manager, but if you don't have this installed, you can do it with gconf-editor.
  1. Hit F2 and type gconf-editor
  2. Navigate to apps > compiz-1 > general > screen0 > options
  3. Update the number of workspaces by changing the values of the variables hsize and vsize, which represent the horizontal and vertical number of workspaces respectively (I set both of mine to 1)
Note: if like me you only want to have 1 workspace, you probably will also want to get rid of the Workspace Switcher icon in the Unity Launcher. Once you have followed the above instructions, all you have to do is log out and back in again and the icon will be gone!

Wednesday, 18 May 2011

Banshee Notification Area Icon in Ubuntu 11.04 Natty

My favourite extension for Banshee is called Notification Area Icon, which lets you control Banshee from an icon in the panel (left click will restore / minimise to tray, and right click will give you music controls). Unfortunately this stopped working after I upgraded to Ubuntu Natty.

To get it working again, you need to put Banshee in the Unity panel whitelist, which you can check with the following command.
gsettings get com.canonical.Unity.Panel systray-whitelist
Mine read as follows:
['JavaEmbeddedFrame', 'Mumble', 'Wine', 'Skype', 'hp-systray', 'scp-dbus-service']
To update this, you must append 'banshee' to the end of the list, and set it like so:
gsettings set com.canonical.Unity.Panel systray-whitelist "['JavaEmbeddedFrame', 'Mumble', 'Wine', 'Skype', 'hp-systray', 'scp-dbus-service', 'banshee']"
And then you will need to do a restart.


REFERENCES
http://fossplanet.com/f10/%5Bbug-777112%5D-%5Bnew%5D-notification-area-icon-not-working-ubuntu-11-04-banshee-2-0-0-a-154634

Adding a Custom App to the Unity Launcher

OS: Ubuntu 11.04 Natty Narwhal

I use a custom version of Eclipse, which I simply download from their website, extract to somewhere in my home directory, and then I can run the executable. If you want to integrate something like this with the new Unity launcher in Natty, you can do so by following the instructions below:
  1. Open the dash and run "Main Menu".
  2. Create a "New Item" in a suitable location (e.g. Applications > Programming).
  3. Leave the Type set to Application. Give it a nice readable Name, and then for the Command, simply type the path to your executable. You can also add an icon by clicking the springboard button.
  4. You should then be able to invoke the Dash, and type the Name you entered before, and your app should appear. You can then drag it into the Launcher.