Ubuntu 11.10 Login Loop

Today I had my first Ubuntu induced headache in a long time and I thought I would share my experience with you in case anyone else suffers the same woes!

The Problem:

Following a routine update of Ubuntu 11.10, I was prompted for a restart due to a kernal update. On restarting my system all seemed well with the world  as I was presented with the usual LightDM X display manager login screen. When entering my username and password the screen quickly went to a console, text flashed rapidly on the screen (concern flashed rapidly through my brain), then returned promptly back to the login page once again. ‘Strange’ thinks I, so I promptly retry again… and again… and again but to no avail. The same thing keeps happening. I then attempt to login using the guest account but, once again, with the same results.

I then fire up another of my PC’s and promptly hit Google for answers. I find various different solutions: ‘It’s a security issue, delete ~/Xauthority’, I do this to no avail; ‘reconfigure LightDM’, I do this to no avail; ‘It’s a driver problem’, no it’s not! I intently watch the console flash again and again trying to discover the secret of it rapidly vanishing text as I keep trying to login to the desktop. Eventually I read what is displayed, ‘System V runlevel compatibility’. Bugger, that could be bloody anything!

Google frantically again but bothing that has been currently posted has ceased my pain! In the end, I decide to go old school (well, not really, just decide to metaphorically put a bullet in the head of LightDM!

The Solution:

At the login screen, I brought up a virtual console by pressing CTRL+ALT+F2

I log into Ubuntu using the console and all is well. Next I type:

sudo apt-get install gdm

When prompted I enter my password and gdm downloads and installs (old friend, you served me well in the past, sorry I had forsaken you but I need you now). When asked for a default manager I select ‘gdm’. Installation completes!

Next I type:

sudo gdm

My old friend the gdm login screen returns and displays himself to me proudly. Oh how I’ve missed you!

I enter my username (well, click on it) and enter my password. Angels begin to sing as Ubuntu loads up and everything seems to be working as it should. Cynically, I restart and login about a trillion times to ensure that I wasn’t being tricked. All is once again right with the world, apart from the usual wars, famine, economic meltdown and global warming but I can handle that!

The Cause:

Don’t know, don’t care, can’t be arsed to find out! Anyway, this worked for me.

The Conclusion:

Maybe there are other out there having this same issue and, if so, hopefully this simple solution may help them seek the peace that they are desperately searching for.

Share

How to associate ISO and other image files with Furius ISO Mount in Ubuntu 11.04

This simple tutorial will show you how you can easily associate and mount ISO and other supported images with Furius ISO Mount in Ubuntu 11.04.

First of all ensure you have Furius ISO Mount installed, either search using the Software Centre or in a terminal:

sudo apt-get install furiusisomount

Once done, ensure you have an image file available to setup the association. I’m using the Ubuntu 11.04 ISO file.

Browse to the file and right click to bring up the context menu.

Select ‘Open with Other Application…’

Select the ‘Use a custom command’ option and type in furiusisomount, as shown below:

Furius ISO Mount Custom Command Dialog

Furius ISO Mount Custom Command Dialog

Click ‘Open’ and your image file will now be mounted with Furius ISO Mount.

The next time you double click on an ISO image it will be automatically be mounted using Furius ISO Mount!

Please note: You can associate any image types which are supported by Furius ISO Mount

Share

Furius iConverter 0.3.1.0 Released

A new version of Furius iConverter has now been released for Linux and Windows.

Furius iConverter is a simple free application (with no adware or nag screens) designed to have only one use: convert your videos for playback on the iPod, iPhone (and iPod Touch) and iPad.

This version brings in improved user feedback including frames per seconds, frames converted from total frames and estimated time remaining (ETR). Feedback is also improved through the use of libnotify.

Visit the project page to grab a copy of the latest version.

 

Share

Compare two Microsoft Word Documents with Python

This is a simple piece of python code that compare 2 Microsoft word documents. I use this with Subversion as an alternative ‘diff’ tool for Word documents. I thought I’d post it in case it’s of any use to anyone else.

Note: you need python and Windows Python Extensions for this to work.

Anyway, here it is:

#!/usr/bin/env python
#
#       wordcompare.py
#
#       Copyright 2011 Dean Harris
#
#       This program is free software; you can redistribute it and/or modify
#       it under the terms of the GNU General Public License as published by
#       the Free Software Foundation; either version 2 of the License, or
#       (at your option) any later version.
#
#       This program is distributed in the hope that it will be useful,
#       but WITHOUT ANY WARRANTY; without even the implied warranty of
#       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#       GNU General Public License for more details.
#
#       You should have received a copy of the GNU General Public License
#       along with this program; if not, write to the Free Software
#       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
#       MA 02110-1301, USA.

import win32com.client
import sys

def word_compare(new, old):
        try:
                print ('Creating new instance of Microsoft Word. Please wait...')
                wordapp = win32com.client.gencache.EnsureDispatch("Word.Application")
                print ('Opening NEW document. Please wait...')

                #Open the New Document
                destination = wordapp.Documents.Open(new)
                if destination.ActiveWindow.View.SplitSpecial == win32com.client.constants.wdPaneNone:
                    destination.ActiveWindow.ActivePane.View.Type = win32com.client.constants.wdPrintView
                else:
                    destination.ActiveWindow.View.Type = win32com.client.constants.wdPrintView    

                # Compare to the base document
                print ('Comparing to BASE document. Please wait...')
                destination.Compare(old,
                    CompareTarget=win32com.client.constants.wdCompareTargetNew)

                # Close the New document
                destination.Close(False)

                # Show the Diff
                print ('Displaying Comparison')
                wordapp.Visible = True
                wordapp.ActiveWindow.Visible = True

        except:
                print ('Exception occurred. Word Application Terminated!')
                wordapp.Quit( )

if __name__ == "__main__":
        if len(sys.argv) != 3:
                print ('Usage: wordcompare.py  ')
        else:
                old = sys.argv[1]
                new = sys.argv[2]
                word_compare(old, new)

Download the code from here: wordcompare.py.

Starting...

Working...

Done

Share

How to automatically mount a NAS device at startup in Ubuntu Hardy Heron

Note: This is an old post that I had originally lost when my website went down. However, I found a backup and it appears that people still try to find it.

I have made the move to Ubuntu Hardy Heron, and a painless experience it was too. My only problem came when I tried to mount my NAS device using my previous method, which I used to use for Ubuntu 7.10, and it wouldn’t mount. I kept recieving this error:

mount error 20 = Not a directory

After a bit of Googling, it would appear that the ‘smbfs’ is deprecated and that users should now use ‘cifs’.

As such…

How to automatically mount a NAS device at startup in Ubuntu Hardy Heron

First, using the console get the prerequisites for the samba file system:

sudo aptitude install samba smbfs

I have two folders on my NAS device which I wish to mount on startup; these are, ‘music’ and ‘svn’. You should replace ‘music’ and ‘svn’ with the names of the folders you wish to mount. Therefore, we next need to create mount locations for these folders. I’ll be using my home directory (/home/harris/) to create my mount points, change these as appropriate:

mkdir /home/harris/SVN

Note: I didn’t need to create a ‘Music’ folder because Ubuntu creates one automatically.

Now it’s time to edit our fstab file. Better make a backup first in case it all goes tits up:

sudo cp /etc/fstab /etc/fstab_bk

sudo gedit /etc/fstab

Now we need to add some new entries to the fstab file. My Ubuntu username is ‘harris’ and the IP address of my NAS device is 192.168.2.185. You should obviously change ‘harris’ to your own username and change the IP to the IP of your NAS device and also change the name of ‘MUSIC’ and ‘SVN’ to the folders you wish to mount. Add the following lines to the end of your fstab file:

//192.168.2.185/SVN /home/harris/SVN/ cifs nounix,uid=harris,gid=harris,file_mode=0777,dir_mode=0777 0 0
//192.168.2.185/MUSIC /home/harris/Music/ cifs nounix,uid=harris,gid=harris,file_mode=0777,dir_mode=0777 0 0

Save the changes and close gedit.

Finally, lets reload fstab

sudo mount -a

Your NAS device folders should now be mounted.

It would seem, however, that Ubuntu has had a long standing BUG which causes a delay in shutting down. It appears that the network is shutdown before the samba shares are unmounted causing the following error when you shut down your Ubuntu box (a fuller explanation can be found here):

CIFS VFS: no response for cmd 50

The fix is simple, however; we need to create two symbolic links to the umountnfs.sh script.

sudo ln -s /etc/init.d/umountnfs.sh /etc/rc0.d/K15umountnfs.sh
sudo ln -s /etc/init.d/umountnfs.sh /etc/rc6.d/K15umountnfs.sh

You should now have error free shutdowns.

How to manually mount a NAS device in Ubuntu Hardy Heron

First, using the console get the prerequisites for the samba file system:

sudo aptitude install samba smbfs

I have two folders on my NAS device which I wish to mount; these are, ‘music’ and ‘svn’. You should replace ‘music’ and ‘svn’ with the names of the folders you wish to mount. Therefore, we next need to create mount locations for these folders. I’ll be using my home directory (/home/harris/) to create my mount points, change these as appropriate:

mkdir /home/harris/SVN

Note: I didn’t need to create a ‘Music’ folder because Ubuntu creates one automatically.

Next, I run the following commands to mount my folders:

sudo mount -t cifs //192.168.2.185/MUSIC /home/harris/Music -o nounix,uid=harris,gid=harris,file_mode=0777,dir_mode=0777
sudo mount -t cifs //192.168.2.185/SVN /home/harris/SVN -o nounix,uid=harris,gid=harris,file_mode=0777,dir_mode=0777

Note: This is still prey to the Ubuntu BUG listed above.

Share

Furius iConverter 0.3.0.0

A new version of Furius iConverter has now been released for Linux and Windows.

Furius iConverter is a simple free application (with no adware or nag screens) designed to have only one use: convert your videos for playback on the iPod, iPhone (and iPod Touch) and iPad.

This latest version adds support for new devices (iPhone 4 and iPad) and brings in new speed/quality settings.

Visit the project page to grab a copy of the latest version.

Share

Furius iConverter for Windows Just Released

A version of Furius iConverter is now available which runs on Windows.

Furius iConverter is a simple free application (with no adware or nag screens) designed to have only one use: convert your videos for playback on the iPod or iPhone (and iPod Touch).

Features

Easy to use
Converts any video
No configuration needed
Supports drag and drop
Supports batch conversion
Automatically creates high quality videos for your device
Uses H264 and AAC encoding

Furius iConverter on Windows 7

Furius iConverter on Windows 7

Furius iConverter on Windows 7

Furius iConverter on Windows 7

Furius iConverter on Windows 7

Furius iConverter on Windows 7

Visit the project page to take a look or download directly and follow the instructions below.
Instructions:
1. Install Python using the Windows installer from http://www.python.org/download/
2. Install PyGTK using the all in all-one-installer from http://www.pygtk.org/downloads.html
3. Download furiusiconverter_0.3.0.0_setup.exe (md5sig) and install.
4. Enjoy free, ad free video conversion for you ipod/iphone device
Share

Furius ISO Mount 0.11.3.1 Released

This is a localisation update adding new and updated translations. Many thanks to the following:
Bulgarian (bg): Svetoslav Stefanov
Chinese (Simplified) (zh_CN): XsLiDian
Dutch (nl): Dirk Roos
French (f): bouchard renaud, peterl
German (de): Klaus Riesterer
Hunsrik (hrx): Adriano Steffler
Italian (it): Christos Spyroglou
Greek (el): Christos Spyroglou
Italian (it): Christos Spyroglou
Japanese (ja): YAMAKAGE Hideo
Polish (pl): It’s Easy
Portuguese (pt): Celso Henriques
Russian (ru): Alexey Ivanes
Spanish (es): Adrián García
Swedish (sv): Anders Pamdal
Turkish (tr): Emre AYTAÇ

Head on over to the Furius ISO Mount page to grab the latest version.

Share

Furius iConverter Version 0.2.0.0 Released

A new version of Furius iConverter has been released. This version changes the encoding method to use the H264 encoder over xvid for superior quality.

Please note, this application has only been tested using Ubuntu 10.10 with FFmpeg version 0.6-4:0.6-2ubuntu6 from the medibuntu repositories. However, I would love to here how other people have got on with different distributions.

Cheers.

Share

A Command Line (Console) Progress Bar in C#

Thought this maybe of use to someone when needing progress feedback from the command-line in C#

//-----------------------------------------------------------------------
// <copyright file="ProgressBar.cs" company="Marcus Furius Development">
//     Copyright (c) Dean Harris 2010. This is free software: you can
//     redistribute it and/or modify it under the terms of the GNU
//     General Public License as published by the Free Software
//     Foundation, either version 3 of the License, or (at your option)
//     any later version.
// </copyright>
// <author>Dean Harris</author>
//-----------------------------------------------------------------------
namespace ProgressBar
{
    /// <summary>
    /// Class to create a console progress bar
    /// </summary>
    public class ProgressBar
    {
        #region Fields

        /// <summary>
        /// The length of the last output
        /// </summary>
        private int lastOutputLength;

        /// <summary>
        /// The maximum length of the progress bar
        /// </summary>
        private int maximumWidth;

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Initializes a new instance of the  class.
        /// </summary>
        /// <param name="maximumWidth">The maximum width of the progress bar.</param>
        public ProgressBar(int maximumWidth)
        {
            this.maximumWidth = maximumWidth;
            this.Show(" [ ");
        }

        #endregion Constructors

        #region Methods

        /// <summary>
        /// Updates the progress bar with the secified percent.
        /// </summary>
        /// <param name="percent">The percent.</param>
        public void Update(double percent)
        {
            // Remove the last state
            string clear = string.Empty.PadRight(
                this.lastOutputLength,
                '\b');
            this.Show(clear);

            // Generate new state
            int width = (int)(percent / 100 * this.maximumWidth);
            int fill = this.maximumWidth - width;
            string output = string.Format(
                "{0}{1} ] {2}%",
                string.Empty.PadLeft(width, '='),
                string.Empty.PadLeft(fill, ' '),
                percent.ToString("0.0"));
            this.Show(output);
            this.lastOutputLength = output.Length;
        }

        /// <summary>
        /// Shows the specified value.
        /// </summary>
        /// <param name="value">The value.</param>
        private void Show(string value)
        {
            System.Console.Write(value);
        }

        #endregion Methods
    }
}

Use it like this:

        static void Main(string[] args)
        {
            ProgressBar progress = new ProgressBar(50);
            for (int i = 0; i < 101; i++)
            {
                progress.Update(i);
                System.Threading.Thread.Sleep(25);
            }
        }
Share
Return top

If you like any of this free software, please help support this site by donating below. Thanks.

If you provide a link to your website or blog I'll post a link next to your name

Top Donations

£20.00 GBP from Edwin Peach

£5.00 GBP from Graham Twaddle

£2.00 GBP from Paul Field