Encouraging Linux not to use the SWAP partition

I recently doubled the memory in my eee PC 1005HA netbook running Mint 16 from 1Gb to 2Gb and to try to maintain the 7 hours battery life I get out of it decided to reduce the possibility of it using the swap drive unless necessary. My initial thought was to delete the swap partition but after some research decided that this was not a good idea, it would be better to discourage Linux from using the SWAP partition!

I came across an excellent post written in 2012 by mikecrosoft in the Linux Mint Forums which clearly explains the steps. As I can’t improve it have reproduced it below. Of course this would apply to all modern day Linux systems, so I’ve since applied it to all of my desktop PCs and to my HP Sleekbook laptop.

Continue reading Encouraging Linux not to use the SWAP partition


Useful Utilities for Managing MythTV and Mythbuntu

MythTV is an excellent PVR, but on occasions thing can go wrong and it is useful to have a ready arsenal of utilities which you can run when things might go wrong!

Before your begin:

If you are not confident that a script won’t damage your database, it’s recommended you backup your database using the Backup and Restore feature in the Mythbuntu Control Centre

MythTV maintenance scripts are located in /usr/share/doc/mythtv-backend/contrib/maintenance

Continue reading Useful Utilities for Managing MythTV and Mythbuntu

Choqok – Support for Twitter has been restored!


When Twitter switched off API 1.0 back on the 11th June, the tweets went dark for Choquk users as the application had not been updated in time to support API 1.1. This was due to the original developer Mehrdad Momeny not having time to maintain Choqok himself and on an appeal to the Linux community. Daniel Kreuter has stepped in and had developed Choqok 1.3.1 which supports the API 1.1.

For Debian users of KDE 4.10, a patch has been compiled and is available in Launchpad. Just download and run.


Griffith and IMDB plug-ins

If you are using version 0.13 of the excellent Griffith Movie Database in Linux (also available for Windows and OSX) and you use IMDB as the source for movie info and posters, then you may have noticed that searching for a movie returns no results even though it is listed on the IMDB website!

The problem has been caused (once again) by IMDB and the way data on their their site is accessed. The latest python plug-ins for Griffith are located at http://svn.berlios.de/svnroot/repos/griffith/trunk/lib/plugins/movie/.

Right-click on the plug-in you require and save it to /usr/share/griffith/lib/plugins/movie/

Note: you will need to have SU permissions so I would suggest you first save the plug-ins to your Home directory and then as SU copy/ move them to the above directory.

Repeat for all IMDB plug-ins.

Then delete all IMDB plug-ins ending in .pyc, if you don’t your new plug-ins will not take effect.

Run Griffith and you will find the IMDB source now works.

Getting Flash to Work Reliably in Linux Web Browsers

Whether it’s Firefox, Chromium or whatever flavour of web browser you chose to use in Linux, the ability to play back the ever prevalent Flash video content in Linux is at best an unreliable experience.

Adobe stopped developing Flash Player for Linux (now stuck on 11.2) over a year ago and advised everyone to use Google Chrome in Linux or forget Flash.

Nice idea, but the latest 64-bit version of Google Chrome  fails to install in Ubuntu 13.04 (64-bit) with a dependency error [Note: 16/05/13 workaround can be found here at OMG Ubuntu]and it’s not open source.

To install Google Chrome for Linux go here.

The open source version of Chrome (Chromium) suffers from the same Flash Player crashes as Firefox. Furthermore, Chromium in order to play Adobe Flash utilises NPAPI plugins which is not considered to be very secure!

However, all is not lost and it is possible to open Flash content within a web browser using the “Swiss Army Knife” of all things video, VLC.

Installing VLC

If you do not have VLC installed on your PC, then this can be either installed from your software centre or from the command line. For Debian distributions like Ubuntu you would enter sudo apt-get install vlc from Terminal.

One small VLC tip – set it to Allow Only One Instance, this will prevent multiple copies of VLC trying to play at once. To set this, from VLC select Tools > Interface and check the box as per the screenshot.

If you also wish to queue up one video after another, also check the box Enqueue files in one instance mode.

Playing Flash Web Content in VLC

To be able to play Flash Player content displayed in your web browser through an external program like VLC, you will need to add-in an extension:

In Firefox

Go to Tools > Add-Ons and search for Open With (current version is 5.3.1), select it and click Install

Now click on Extensions and select Preferences for Open With, the options screen will be displayed.

Change all options as per the screen-shot below and then click on Add.

This will open a new window in USR\Share\Applications, scroll down until you find VLC, select it and then click Open. It will now be added to Open With.

Now, go to a website which hosts flash Video, YouTube is a good starting point right click on a video and select the new menu option Open Link with VLC media player.

VLC will launch and the video will play.

What about playing Flash in Chromium?

Unfortunately, if you use Chromium Open With does not exist in the Chrome Web Store which is a shame as it works pretty well in Firefox.

 There is an App called Open with Other Apps, unfortunately this only works with OSX, it appears to work in a similar way to Open With, but I’ve not been able to get it to work in Linux. The developer of Open With on his website FAQ says:

Will you make a version for Chrome/Safari/XYZ browser? No. I would like to but their extension system isn’t currently capable of the things Open With needs to work.

You can use the app VLC for YouTube, but as the name suggests this only works with YouTube. 

gPodder 3.x: Changing the Downloads Folder Location and Missing Subscriptions

In Ubuntu 12.04LTS (and variants) gPodder v2.20 was shipped and as with all previous versions of this podcast catcher software, it was relatively free of any major bugs as all good software should be if properly tested.

So it was with a degree of horror on upgrading Lubuntu 12.04 to 12.10 that I discovered all of my podcasts (10Gb worth) had apparently disappeared off my hard disk along with the subscription lists.

Missing Subscriptions

It a pity that not enough consideration had been given to how to transparently migrate from the SQLLite2 database in gPodder 2.x to the SQLLite3 database in 3.x this could have been avioded. It’s hardly surprising that with these sorts of problems, the year of the Linux desktop remains a distant hope for the community. If stuff worked in the previous version, it should remain working in the new version and if it does not then the software should be held back until fixed as with open source there is no commercial pressure to get software out of the door at any cost other than that self imposed by the developers.

After a bit of searching on the internet I found an ubuntuforums.org post from gds which is reproduced below:

Re: gPodder subscription list gone after upgrade to 12.10

I had the same problem. Ubuntu 12.10 now ships gpodder 3 which uses a new and incompatible database format. They don’t appear to have supplied any conversion tool nor any warning that your old config wouldn’t be converted (thanks!). However – it seems gpodder3 keeps it’s configuration in a gPodder directory in your home dir, while gpodder 2 was keeping it’s configuration in .congfig/gpodder. So I was able to recovery my subscriptions.

Here’s what I did: from the gpodder download site I downloaded the last release of version 2 (I used this one). Unpack the files somewhere (we don’t need to actually install it, just run it once. I put them in /tmp). Make sure gpodder 3 isn’t running.

Then from a terminal I ran

cd /tmp/gpodder-2.9

Now you can export your subscriptions to an OPML file that gpodder 3 can import (it’s on the subscriptions menu). Once you’ve done it you can quit and run gpodder3. Skip past the initial dialog offering you default subscrptions and you can import the OPML file you created in the last step.

I had an extra problem, because even after this gpodder3 didn’t recognize any of my previously downloaded podcasts (it wanted to pull down 3Gb of new shows!). This might be unique to me because I was using a non-standard location for my downloads, but I solved this by the brute-force technique of doing one last sync to my player from gpodder 2 and then telling gpodder3 to consider all the subscriptions up to date. I’m sure we could do better but this was enough for me.

Changing the Downloads Folder Location

With my subscriptions back, the next step was to find out where my previously recorded podcasts had gone.

Now I suspect I’m not too unusual in downloading a lot of podcasts both video and audio. becaue of the formers size, I do not store them in the default download folder location dictated by gPodder but store it on a separate data drive so if my filesystem partitions runs out fo disk space (as that is where my Home directory is located) I will not crash the system! I’ve been there before so I’ve learnt the hard way.

Up until version 3, gPodder allowed you to change the downloads folder location and in the Wiki this is still possible if you run Windows, Linux/ Unix/ OS X and MeeGo. If you run a varient of Ubuntu Linux, then as far as version 3 of gPodder goes you are stuffed as this feature does not work due to a software bug.

Whilst the Wiki does suggest making “session-wide changes on Ubuntu Linux”, it does not really explain how to do it and how to test that the change has been applied and gives up in providing proper instructions by pointing distressed users to the Ubuntu community documentation on Persistent Environmental Variables, which isn’t great in itself.

Whilst a bug has been raised about this probelm and Thomas Perl has tried to provided some assistance to my question about how to see if the variables have been set, I’ve decided to take a different approach and redirect the gpodder downloads folder residing in my Home drive to another folder on a different drive. Whilst useful for resolving this particular gPodder problem, it also has other users like redirecting the contents of your Documents folder to another folder on the same or different drive.

To mount one folder on to another you need to use the following command syntax:
sudo mount -o bind <source folder path> <destination folder path>
This is what I did:
In my case my gPodder folder is located in /home/username/gpodder/ and I wanted it to be located on /media/data/gpodder/
1. I moved all files located in the source folder /home/username/gpodder/ to the destination folder /media/data/gpodder/
2. Opening Terminal I entered the command
sudo mount -o bind /home/username/gpodder/ /media/data/gpodder/
This mounted the destination folder on to the source folder, effectively redirecting it to the new location.
Whilst this command is useful, it’s of no use if you have to keep reentering it every time you wish to use gPodder.
To make this permanent you will need to edit /etc/fstab and add it in. Using the above example this is what I did:
1. In Terminal enter the following to edit fstab as sudo:
sudo nano /etc/fstab
2. At the bottom of the file add the following comment:
# Mount Folder /media/data/Documents/ on to /home/username/gpodder/
3. Then add the following line below:
/media/data/gpodder/ /home/username/gpodder/ auto bind,gid=46,defaults 0 0
4. Save the file
5. Exit nano and from Terminal enter the following to rerun fatab and mount devices listed in it:
sudo mount -a
If the syntax was correct, there should be no error messages and you should be returned to the command prompt.
Using you file manger check that the /home/username/gpodder/ folder contains the same content as /media/data/gpodder.
If uncertain, create a file or folder in one and see if it appears in another, you may have to refresh the display (F5) to display the change.
GPodder will continue to think it is saving podcasts to the default folder location, but using this trick it will actually be saving them to a location of your choice without the need to fiddle around with environmental variables.


Mini How To… Recovering the GRUB 2 Boot Menu

The one thing I really hate in Linux is the GRUB boot loader, it’s fine when it works but when it goes wrong it can be a complete pain to fix and in this respect GRUB 2 is worse than the original version of GRUB.

So after upgrading one of my Dual boot PCs to Windows 8 Pro from Windows XP, I was not surprised to find that I could not boot into GRUB. On this occasion not the fault of GRUB but of Windows which has always obliterated any GRUB (or for those who can remember that far back) / LILO instance.

The way to restore the GRUB menu is to use a tool called Boot-Repair, the only problem is that it is not included by default* in Ubuntu 12.04.

According to Help Ubuntu two options are available:

  1. Use the Ubuntu-Secure-Remix CD or the Live Boot-Repair iso CD
  2. Or just boot of an Ubuntu live CD and install it.

As I have plenty of Linux Format DVDs stuffed with all sorts of Live distros so I booted up Ubuntu 12.04 LXF remix live CD, opened terminal and added the repository using the following command:

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update

I then entered

sudo apt-get install -y boot-repair && boot-repair

to install boot-repair and then run Boot-Repair from Terminal

After that I just followed the on screen prompts.

Since first using it to fix the above problem, I’ve now used it on a number of occasions for different problems and it has yet to let me down.

*Apparently, this is due to change in a future Ubuntu release.

Mini How To… How to get rid of Unity from Ubuntu 12.10!

I’ve never been a fan of Unity, I prefer Gnome 3 so when I found that I was unable to login to Gnome 3 in Ubuntu 12.10 after upgrading from 12.04 and could only login to Unity, I decided that enough was enough and Unity was going to go as it just adds another layer of complication when diagnosing bugs in Ubuntu.

In this particular instance, the blooming useless LightDM display manager was the cause of the problem and after reverting back to GDM I could then login to Gnome 3 and not Unity.

I found this blog post which walked me through what turned out to be a simple task in removing all of the Unity mischief from Ubunti 12.10.

Mini How To… How to recover files on a deleted/ corrupt disk

Over Christmas holidays one of the things I did was to replace a failing hard disk in one of my computers with a used one I had spare. The failing hard disk was on an Apple iMac, but that’s another story!

Before I installed it I decided to delete the existing partitions on it using another computers running Ubuntu 12.04 and Gnome 3. At the time this computer had three hard disks installed and dual booted to Windows XP.

Having hooked up the hard disk I booted of a GParted live CD and promptly deleted the partition, shut-down the PC removed the hard disk and then rebooted. All seemed well until I tried to boot into XP where I got missing xyz file error message!

It then dawned on me what had happened. I had wiped the partitions off the wrong hard disk. Whilst I did have a backup, it was a little out of date and whilst normally you can recover deleted partitions with Gparted, if you are using the live CD it will only work if you remain in the original session as the undo information is held on the RAM disk the live CD creates. Once you reboot, your opportunity to recover with Gparted will be lost, as in my case.

To make matters a little more complicated, it was not a Linux disk, but a Windows NTFS formatted disk.

After a bit of searching, I discovered TestDisk which is available in the repositories but also available as a Live CD. More information is available on the testDisk Wiki page http://www.cgsecurity.org/wiki/TestDisk including a Step by Step tutorial.

In my case I booted off the Ubuntu 12.04 partition on the computer and from Terminal ran

sudo apt-get install testdisk

Once installed, from Terminal I entered

sudo testdisk

and the program started.

All I then did was:

  • set my PC type as Intel
  • selected the disk I wanted to recover
  • choose Analyse
  • took the default setting for the NTFS disk format
  • then followed the prompts and the step by step guide mentioned earlier.

Testdisk recovered the partition and 99.9% of the files on the disk.

One of the reasons why this was successful was because I did not use the disk after it was wiped with GParted, had I done so the result would have been less successful.

Next time when deleting partitions on a disk, I’ll double check that it is the right partition by first opening Terminal and entering sudo fdisk -l to list the disk and partition information for each disk.

I’ll also make sure I’m fully awake!

Installing the latest nvidia Linux drivers in Ubuntu 11.10

In Ubuntu 11.10 the version of nvidia drivers which are installed by default are 280.13.

However, if you want to get the most from your nvidia graphics card then you probably want to use the latest Linux drivers from nvidia which are published on nvidia’s website.

Before you try to upgrade, make sure that the graphics card you are using is supported by the latest driver. To do this, click on the Supported Products tab on the nvidia driver page.

Downloading Linux drives from a manufacturers website is not particularly easy as you have to compile the driver for your kernel. However, thanks to HeticGeeks’s blog, there is an easier way by adding the Ubuntu-X team’s PPA to your install.

Below is a summary of what you need to do:

To add the PPA enter from Terminal:

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates

you should see something similar to the following

now update your distribution by entering

sudo apt-get update

followed by

sudo apt-get upgrade

You should see nvidia-curernt listed as one of the packages which will be upgraded, press Enter to perform the upgrade


In my case on one computer the nvidia-settings package was held back, so performing a

sudo apt-get dist-upgrade

installed this outstanding package.

Finally, you will need to restart your PC to reload Xorg.

Once rebooted, run nvidia-settings to confirm your drivers have been upgraded to the latest version.