How to tweak Ubuntu 11.04 Natty Narwhal, part 3

How to tweak Ubuntu 11.04 Natty Narwhal, part 3



Fixing Flash

Flash support under Linux isn’t quite as seamless as under Windows. While it’s easy to install and both 32-bit and 64-bit versions are available it sometimes has issues with video card drivers especially when running full screen. On top of this there’s also open-source alternatives which may come installed in your distribution by default.

Rather than navigate the quagmire a handy Firefox plugin called FlashAid will automatically detect the Flash you’re currently using the configuration of your Linux installation and recommend and automatically install the best version for you. It’ll also apply some tweaks to fix issues like full-screen playback.

Install it like any other Firefox plugin – type in ‘Flash-aid’ (note hyphen) at addons.mozilla.org and click to install it. After restarting Firefox you’ll see a button on the top right of your URL bar. Click this and follow the wizard to fix your Flash.


Flash Aid will automatically detect install and apply tweaks for Flash for your system.

Show desktop

In part 1 of this series we covered some useful keyboard shortcuts including Super + D to clear and show the desktop as there is currently no equivalent Show Desktop button as in previous versions.

Well there wasn’t – but the team at Web Upd8 have fixed this for you through the use of a rarely known program called wmctrl a command-line tool for manipulating window managers.

To add a Show Desktop icon to the Unity launcher first download bit.ly/jNSEF8 which contains two files. Decompress it to your desktop then run in a terminal:

sudo mv ~/Desktop/showdesktop /usr/local/bin/

This moves the script that uses wmctrl into your executable path. Now install wmctrl:

sudo apt-get install wmctrl

Finally drag the second file (showdesktop.desktop) to your launcher and you’re done. This is especially helpful if you’ve set the launcher to be always visible so the button is always accessible. Just note it has a cool down of a second or two between activation and to keep its location consistent consider dragging it to the top of your launcher bar.

Restore software sources

Another small change with Natty is the extra steps it takes to add or edit your sources – there’s no option for it in the System Settings control panel you need to access it via the Update Manager or Synaptic. It’s a small change but an annoying one if you use a lot of repositories. To restore   Software Sources to System Settings use the Dash (aka the Ubuntu button in the type left) and type in ‘main menu’ to find and run the menu editing application. Then under ‘System > Administration’ simply tick ‘Software Sources’. Easy!

Three useful tools

Ubuntu comes with a firewall but it’s not enabled by default and it’s command-line based. If you want a simple GUI to both add or remove rules and importantly monitor activity – all integrated with Ubuntu’s new pop-up message queue – there’s the firewall GUI appropriately called gufw (Graphical Uncomplicated FireWall). Install it with apt-get install gufw.

Then to run launch it from the Dash (or hit Alt-F2) and type in ‘gufw’. You can quickly add pre-defined rules (for example for Transmission or Skype) or use the Simple and Advanced tabs for defining your own. Note that your settings are saved and loaded at bootup even if gufw isn’t running but gufw needs to be loaded if you want to see message queue updates.

Next while there isn’t a CCleaner equivalent for Linux Bleachbit comes close allowing you to free disk space used by logs temporary files thumbnails and so on and maintain privacy by cleaning up histories and caches. You can find it in the Software Centre (search ‘bleachbit’) and once installed launch it from the Dash. Don’t forget to run the ‘as root’ version for cleaning anything outside your home directory. For more tips on releasing disk space see Cleaning up next.

And finally of course there’s the quintessential Ubuntu Tweak previously covered in these columns. Ubuntu Tweak has been updated for Natty and while you might not use it every day it has many excellent features. You can download and install the .deb from www.ubuntutweak.com or add the repository and install (which is preferred as you will be notified of updates for it via the Update Manager):

sudo -s
add-apt-repository ppa:tualatrix/ppa
apt-get update
apt-get install ubuntu-tweak

GUFW provides an easy interface to Ubuntu’s firewall.

Cleaning up

After updating installing your favourite apps and following the tweaks listed in this series it’s a good time to give your new install a little spring cleaning.

While optimising services and startup programs is less important these days on powerful desktop machines and disk space is more plentiful netbooks and tablets can still benefit from loading only what you really need and cleaning up any packages you don’t need anymore.

To clean what programs are launching at startup click ‘Power Button > System Settings > Startup Applications’. No printer or Bluetooth? Disable them. On a desktop and not a notebook? De-select the power manager. Not planning to login remotely? Disable remote desktop. If you’re not sure about a program leave it (e.g. don’t disable Zeitgeist in addition to logging it also affects searches from the Dash).

For services there’s no longer a services dialog you can launch but instead you can install the more fully featured Boot Up Manager which we’ve covered here in the past. Just search for ‘bum’ (yes have a giggle) in the Software Centre. Once installed you can launch it from ‘Power Button > System Settings > Boot Up Manager’. Use similar common sense when disabling services but be a little more careful as you could render your machine unbootable.

Finally for a little cleaning up do the following. Note these first two commands need only be run once. From a terminal:

sudo -s
apt-get install localepurge
apt-get remove ubuntu-docs

When installing localepurge it will prompt for your locale scroll down and choose ‘en’. Then run localepurge once from the command line. Subsequent package installs will automatically call localepurge at the end and delete any unnecessary language locales. For the Ubuntu docs they take a chunk of space and unless you’ve pulled up a Help recently you probably don’t need these and the same documentation is online if you do.

You can then run the following to free up disk space from obsolete packages and cached .deb files occasionally:

apt-get autoremove
apt-get clean

You can save several hundred megabytes using these tips especially after a new install and running Update Manager.

Ubuntu Tweak mentioned above also allows you to easily remove older kernels which can free up even more disk space if you have multiple older versions lying around.

Updating your hardware IDs

When you plug in new hardware and USB devices Linux identifies them via their unique IDs and is able to report their human-readable English names via a set of files that detail the manufacturer and model.

While most any hardware you plug in will be recognised it helps to update both your USB IDs database and PCI IDs database especially for recently released hardware. Linux distributions will occasionally update to the latest versions before shipping but this isn’t always the case – Ubuntu Natty’s files are actually a year out of date. You can manually update to the latest definitions with two simple commands:

sudo update-usbids
sudo update-pciids