Sunday 20 January 2013

Howto: Fix XSane error; scanner failed to start.

For a little while now I've been unable to use XSane due to an error when trying to perform a colour scan on my Epson Perfection610.  Many things were tried including purging xsane, removing ~/.sane etc.

I finally found a solution given by Ronok in this post.

Following the full steps is not necessary, I had sane and most things associated with it already installed.

sudo gedit /etc/sane.d/dll.conf

Then find "epson" and "epson2"

Comment out "epson2" and uncomment "epson" so you are left with:


I rebooted but I'm unsure if that is required, afterwards XSane worked perfectly as it had for years.

Thursday 3 January 2013

Howto: Fix an Acer Aspire 1410 Netbook Graphics

Recently my brother decided to give Linux a try, I pointed him at Linux Mint 14 (Cinnamon flavoured).  He found it simple and perfect for his needs but the graphics were hopelessly slow and major problem.  The Intel 4500MHD graphics were awful using the Gallium driver it had defaulted to.

A quick Google wasn't entirely helpful until I found :

   sudo add-apt-repository ppa:oibaf/graphics-drivers
   sudo apt-get update
     sudo apt-get upgrade
A quick reboot and the graphics performance was very much improved.

Wednesday 2 February 2011

Howto: Unpack/Extract Files from Multiple Folders in One Go

Just recently I had a situation where I needed to extract multiple archives, roughly 100 in fact, with each being in a sub folder.

Not particularly wanting to sit clicking into each folder, right click the archive and extract each one, then move the file (avi in this case) up into the parent folder I got busy on the terminal. Luckily this is a perfect job for Bash and instead of the job taking around 2hrs of tedious clicking and waiting to extract each I was able to leave the command processing the files and get on with some more interesting work while the job was done.

So here is the command line that go it all sorted.

  cur="`pwd`";for i in `"ls"`; do echo "$i";cd "$i";unrar e "*.rar";mv "*.avi" "$cur"/ ;cd "$cur";done

So its not very elegant, I was going to use "find" but as I wanted to move the avi at the same time, thought this way would be better.

I would be happy for anyone to leave a comment and show me a better way, always eager to learn :]

Friday 10 September 2010

Howto: Bind Keys In Nautilus To Scripts Or Other Menu Items.

I picked up this excellent tip from Webupd8.

First you should have installed Nautilus Open Terminal for an initial very useful shortcut. It adds a menu entry on the right click and in the File menu to do exactly what it says, open a terminal at the current folder you have open in the active Nautilus window. So enter the following into a terminal.

sudo apt-get install nautilus-open-terminal

If it is already installed it will just inform you of it in the text it spews, otherwise it will install it, and inform you of that too.

Open up gconf-editor from a terminal or Alt+F2 (you may also have it listed in your Applications/System Tools/ menu as Configuration Editor. Be a little bit careful in here, there is possibility of breaking stuff. Navigate in the left hand pane to Desktop/Gnome/Interface.

Change the toggle for "can_change_accels" to true/enabled. Leave the gconf-editor window open as you most likely want to disable it again after setting the keybindings you want. Be aware that you can only bind to the main Nautilus menu and not to its right click menu.

Press Alt+F2 and enter "nautilus -q" to restart Nautilus, then you may set any menu item or script to have a key bind simply by opening the Nautilus main menu and then pressing the key bind that would like to set it as while hovering over the item. For instance I hovered over Open Terminal and I have set to F4, I have also added bindings to other scripts I use fairly frequently.

I would suggest disabling the "can_change_accels" to false again to prevent accidental overwriting of key bindings, thats entirely up to you though, and be aware of what key binds you set of course, binding ctrl+c to close/quit nautilus is going to cause problems ;)

Sunday 2 May 2010

Howto: Ubuntu 10.04 Lucid Post Install Acer Aspire One 110 (aka AAO & AA1) 8GB/16GB SSD Model

I need to clarify that this is on the Acer Aspire One 110, a couple of comments have indicated that the wifi fix did not work on their machines, one at least has a different model and its entirely my mistake I didn't state clearly which model it is I have, well the wife and I both have. Doing a lspci shows we have Atheros AR5001 wireless device.

Post install there are a number
of things that need tweaking. The wifi and media cards will not function correctly without some work, other things will improve performance or help the SSD longevity.

Lets start by fixing the wireless, its probably the first thing you want to do as it will drop your connection like a butterfingered, blind juggler...... With one hand.

In your System / Admintration / Software Sources, enable any repo's that aren't enabled, though you can avoid the source ones if you want. The fire up synaptic, Reload the repository lists and add following package:


it will also select a similar named package with your kernel version in its name that we also want. Once that is done I would reboot and your wifi should be nearly done. Now I have installed on mine twice and the second install wouldn't automatically connect to the home wifi when I rebooted, I had to go into System / Preferences / Network Connections and delete the existing wireless connection there, and then Add the connection again. I am not sure why, but its not much trouble to correct and barely worth the time investigating. Yours may work without doing that.

Media Card Readers
You need to edit /etc/default/grub (as root ofc) and find the
line that starts:


Change it to read

GRUB_CMDLINE_LINUX_DEFAULT="pciehp.pciehp_force=1 elevator=noop quiet splash"

The pciehp part fixes the card readers to be hot swappable and the
elevator=noop improves SSD performance, we'll add that now while we are dabbling in the right place. Anyone with a HD version who may be following this should omit the elevator=noop.

To then make the changes actually apply next boot they have to be applied to the Grub boot process so you should then perform :

sudo update-grub

Many thanks to Magrat G for pointing out the ommision in the comments.

Ramon in the comments made the following suggestion:

I've got a SD card in the storage expansion slot (where /home is mounted). To avoid suspend/hibernate failure, this is a nice tweak:

echo "SUSPEND_MODULES=\"sdhci sdhci_pci\"" | sudo tee -a /etc/pm/config.d/suspend_modules

It is reported in bug #477106 (see comment #35):

I will add a disclaimer that I have not tested that but it seems like a good fix and has many reports of it working for many people.

Move /tmp to RAM and general fstab fiddling
Lets backup our fstab before we start messing with it, if anything breaks we can copy it back and start again.. By we, I mean *you* of course ;)

sudo cp /etc/fstab /etc/fstab-bak
sudo gedit /etc/fstab

then add these lines at the bottom

none /var/log tmpfs size=10M 0 0
none /tmp tmpfs size=100M 0 0
none /var/tmp tmpfs size=20M 0 0

That is all we do to move /tmp to RAM but we can make another change here to improve SSD lifespan and performance. Find the lines that mount your SSD partition/s and tweak the options to include noatime so the filesystem does not record access times, which is pretty useless and causes unnecessary writes. An editted line might look like this for root:

/dev/sda1 / ext2 defaults,noatime,errors=remount-ro 0 1

Or if the UUID scheme is in use /home might be:

UUID=10b794b3-78b6-44f1-b179-8e38302efe05 /home ext2 defaults,noatime 0 2

Notice the use of ext2 in the examples above, Its fairly important to not use a journalled filesystem on this older SSD. I'm not a filesystem guru and it may be fine to use ext3 or ext4 without journalling, but I am unsure so I formatted with what I knew was recommended.

You get the idea, if you have any doubts just leave it be or google for a more in depth guide on this point.

I will be adding further onto this post as time permits and I go through them myself, or remember what I did.

Wednesday 14 April 2010

Howto: Move the Window buttons back to the correct side.

Ubuntu 10.04 Lucid Lynx has moved the window buttons to the left on the title bar. Its a peculiar thing to decide to do and myself and others I have spoken with can't see *why* they should chose to do it. The only answer I keep coming back to is that this is just something to stand out and give a unique(ish) appearance, as part of their re-branding.

Well, I would much prefer them back over on the right, as I feel it looks better and I really don't see the point in moving something that
requires a retraining has no purpose than for appearances sake. In my opinion of course.

Paste the following into a terminal:

gconftool-2 --set '/apps/metacity/general/button_layout' --type string ":minimize,maximize,close"

Or, fire up gconf-editor from a terminal or Alt+F2 run dialog, and in the left pane navigate to :
apps / metacity / general

In the right pane double click on button_layout and paste in:

Note, if you select Ambiance again in the theme selector it will again "break" your buttons, bit of a nuisance.

This will give the original layout, be aware that the default themes will look a little broken if you do this, if you do use the orginal theme I would advise you to keep the order of maximise,minimise,close (I am not sure whether it still breaks the buttons surround). They will look fine in the new order on the right, the bevelling on the theme will look nasty if you re-order the buttons though. Personally I don't much like the default theme so I will be retaining my current window decoration and going back to the "old" order.

The window theme I use can be found here : LINK :

Friday 18 December 2009

Howto: Split pane Nautilus

This is now not necessary as Ubuntu 10.04 has dual pane built-in, just hit F3

Found this on OMGBuntu and have been using it, its pretty useful so far and has been stable.

sudo add-apt-repository ppa:berndth/ppa

Then I opened up Synaptic and clicked "Reload" to reload all repository data, and "Mark all Upgrades" and apply it. Alternatively you can do:

sudo apt-get update &&;sudo apt-get dist-upgrade

You will need to either logout and back in, or hit ALT+F2 and "killall nautilus" and then ALT+F2 again and "nautilus" to restart it with the new changes. Note that if you have added extra buttons to the Nautilus toolbar you will have to readd those as the update will have over written them. Add the changes to the NEW file, don't just copy over the old if you had a backup. The new file contains menu items for the split pane which you won't want to lose.

Now you can use F3 to pop open or close the extra pane.

Tuesday 17 November 2009

Howto: Stop Ubuntu 9.10 Karmic Mounting USB Devices With UUID Instead of a Name

Ubuntu 9.10 Karmic Koala changed the way USB devices get mounted a little bit. Instead of being mounted as /media/disk and then each other device becoming /media/disk-1, disk-2 and so forth, now the device is mounted with its UUID, a seemingly random string.

I never minded the disk-1, disk2 thing, though it was slightly annoying to not know which device was which sometimes it was seldom a problem as I had frequently just plugged it in and watched it mount. So the new change was a bt more of an annoyance as its harder to see which random string just appeared sometimes.

The solution as ever is pretty darned simple however, just label the device you lazy bum ;)

Pop along to the following page and read how to label different partition types, most likely fat16/32 or NTFS for your average thumbdrive of phone/mp3 player mounted as a mass storage.

Personally I use the Gparted method as mtools has an issue which means you have to add the device to a config file first (its detailed on the page) and while its not hard, its just an extra step I don't need.

So if you don't have Gparted installed already do the following or use Synaptic:

sudo apt-get install gparted

Start Gparted from the System/Administration menu, then select your device from the drop down list in the top right then unmount it by right clicking it in the lower frame and choose unmount. This is so you can make changes to it. Choose to "label" it from the same right click menu or from the Partition menu, finally you have to apply the changes by clicking the right most icon on the toolbar to "Apply all changes". It is done instantly and no longer will that device be known as /media/4169-87bb.

Sunday 15 November 2009

Howto: Disable the 60 second delay in Logout/Restart/Shutdown

This new setting became a pet hate of mine within minutes of installing Ubuntu 9.10 Karmic Koala, there is a 60 second delay and confirmation dialog when logging out, restarting or shutting down. This default can be over-ridden to act instantly rather than waiting for 60 seconds or clicking a confirmation by setting the apps/indicator-session/suppress_logout_restart_shutdown boolean to true as follows:

gconftool-2 -s '/apps/indicator-session /suppress_logout_restart_shutdown' --type bool true

You can of course use gconf-editor if you want to use a GUI based tool, just navigate to /apps/indicator-session in the left tree and change the value of suppress_logout_restart_shutdown to enabled/ticked/true.

Wednesday 4 November 2009

Howto: Adjust updatedb.mlocat to a sensible time.

All credit for this goes to This Blog Entry where I found this helpful information.

If you are an early riser like myself (well, occasionally at least) then you may notice your PC grinding away on its harddrives like a mad thing. I have around 3TB of storage so the problem is exacerbated somewhat. The process to blame is updatedb.mlocat which runs between 6am and 7am, I want a quiet morning with my coffee so I am going to show you how to move it to between 3am and 4am

The job parameters are listed in /etc/cron.daily/mlocate. We don't edit anything here, its just for reference.

#! /bin/sh

set -e

[ -x /usr/bin/updatedb.mlocate ] || exit 0

# See ionice(1)
if [ -x /usr/bin/ionice ]; then
IONICE=”/usr/bin/ionice -c3″

$IONICE /usr/bin/updatedb.m

The files in /etc/cron.daily are kicked off by /etc/crontab, not by root’s crontab. For some reason, Ubuntu’s default install runs this process around 6am. Changing this file allowed me to make the job run at 3am. Here we change the hour time to 3 instead of 6, so you will need a sudo gedit or something to adjust this... carefully.. sudo gedit /etc/crontab

# /etc/crontab: system-wide crontab
# Unlike any other crontab you don’t have to run the `crontab’
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.


# m h dom mon dow user command
17 * * * * root cd / && run-parts –report /etc/cron.hourly
25 3 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts –report /etc/cron.daily )
47 3 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts –report /etc/cron.weekly )
52 3 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts –report /etc/cron.monthly )

updatedb can be configured to ignore certain paths - since my machine has a number of drives used for backups, I wanted to exclude those from the updatedb job. I accomplished this by editing /etc/updatedb.conf and adding to the PRUNEPATHS listing. Adding paths to the PRUNEPATHS option instructs updatedb to exclude those paths from indexing.

PRUNEPATHS=”/tmp /var/spool /media /mnt/backup”
PRUNEFS=”NFS nfs nfs4 afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre_lite tmpfs usbfs udf rpc_pipefs”