Ubuntu 11.04 boot hung on the splash screen, here’s the fix

Last night all was well with my Ubuntu laptop and I shut it down as normal. This morning it hung on boot at the splash screen with 5 dots lit up. Reading posts here and there suggested I should just let the machine cook for 15 minutes or so (something like Windows and it’s pre-boot installations of updates). So I left it alone for an hour and no improvement. The disk activity indicator almost from the point of the splash screen slowed to once or so a minute for the entire hour. Nothing was happening and waiting any longer would be pointless.

I read up on the grub recovery mode and jumped into the grub menu (hold the Shift key down while booting) and selected Recover Mode and in the console hit Control-D to get to the login prompt.

There, I tried a few things always suspecting it was the monitor/xserver/display. Something about the display kept gnawing at me but I cannot say what it was.

I hit upon a writeup that showed this:

Booted into recovery mode and logged in on command line.

Checked everything was up to date, reinstalled gdm and xorg:
$ sudo apt-get update && sudo apt-get upgrade
$ sudo apt-get install --reinstall gdm xorg

Removed xorg.conf so that a new one was created upon boot:
$ sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.faulty
$ sudo reboot

This did work and after rebooting the only issue was I didn’t have the right display (NVidia) driver. It just so happened that a system update brought in the latest kernel changes and coincidentally gave me the right driver. I had to seek no further.

This took over 4 hours of my time to fix.

Remember what you did a few days ago on your Linux computer

I am busy like most people throughout the day and switch tasks often. Taking good notes during my work is tedious and there are times when I forget or cannot and I lose knowledge this way. I lose the  steps leading to solutions, I forget to record some item for billing purposes or I need to verify the length of time I spent doing something. What I want is someway to automatically take a snapshot of my monitor screen(s) producing a time stamped image. There are solutions in Windows and for Mac but none that I found for  Linux.

Shots folder

First, there’s a top-level folder I call shots as in snapshot that

Folder holding daily folders of images

holds all the folders for each days worth of images. The location and name of this folder can be changed in the script. I keep it in my home folder for convenience.

Daily folders
Each day the script checks for a folder to hold the images and if it doesn’t exist it creates it. The name of the daily folder is the date. Over time these folders will collect and build up taking valuable disk space. You should delete the oldest of these folders as a matter of good disk hygiene. Then again the script could be modified to search for folders that are older than a configurable number of days and remove the image contents and the folders.

Folders created every day containing images

Desktop images are snapped in the current script every 300 seconds or 5 minutes and dropped into the daily folder in the shots folder. Scrot is configurable through the command line giving you the ability to reduce resolution of images, for instance, thereby reducing the size and clarity of the images if that’s a concern.

Inside a daily folder

Scrot has other configurable parameters so you should read the man page at least.

Here’s how you solve this in Linux. The recipe is simple:

  • 1 – screen capture utility
  • 1 – shell script

Fulfilling the first item, what we need is as simple screen capture utility to take a snapshot every so often and place the image in a known location. So there’s a single folder containing date stamped folders and each date stamped folder contains date and time stamped images. How do we do this? There are several utilities and applications in the Linux world that can take screen captures. The simple one that free that does the job more than adequately is SCROT. For Ubuntu,

sudo apt-get install scrot

Using scrot, it takes a screen capture, labels it with the date and time and move it into a known directory. It’s accomplished this way:

scrot ‘%Y-%m-%d_%H:%M:%S_$wx$h.png’ -e ‘mv $f ‘”$DIRECTORY”

Where $DIRECTORY is the path to a directory of your choosing.

Executing this command line yields a file named:


if executed on 7/24/2012 at 6:54. The photo is a 1600×900 pixel PNG file.

This works well. Then next and final thing to do in our recipe is create a shell script that periodically executes this command and each day change the date stamp. Here the bash shell script:

# TODAY - today's date.
# DIRECTORY - directory to store the image in; ours is 'shots'.
TODAY=$(date +"%Y-%m-%d")
# Repeat forever.
while true;
# If the directory does not exist, create it.
if [ ! -d "$DIRECTORY" ]; then
# take a shot and name it with a timestamp and move the shot
# to the 'shots' folder.
scrot '%Y-%m-%d_%H:%M:%S_$wx$h.png' -e 'mv $f '"$DIRECTORY"
# do again
sleep 5m

This script is setup to automatically run when you log in or is run manually, your choice.


Keep your camera updated

I get a new feature with my digital camera by updating it’s firmware, who knew you could update the camera?

It never dawned on me that me DLSR camera from Samsung would or even could be updated like my fancy mobile phone or my laptop computer. It never dawned on me but as I found out it can be updated and it was a pleasant surprise to boot.

I’ve had a Samsung NX10 for almost year and a half and have enjoyed it immensely. I have no real complaints except for the absense of a way shoot panoramic scenes. It’s not a big deal, I have a way to create panoramas from discrete photos by way of a Windows program called Hugin which works great. Still, there are times when I’d just like to take thise shoots and be done with it.

I went on the Samsung site and drilled down from the NX10 page to the downloads page to the firmware page. Found the latest firmware and the installation guide. The guide was simple as I expected it to be, obtained the firmware and had the camera use the firmware. After a minute the camera was updated and turning the camera mode to SCENE and I saw panarama mode with instructions on the screen. The instructions said basically shoot and move the camera, I clicked the shutter button and moved the camera slowly left to right surveying the room. The camera took perhaps 8 shots end when I clicked the bitton again. Hitting the review button I saw the stitched together long photo and felt the moment of satisfaction now knowing that I now had another tool in my little toolshed. Thr picture was really quite impressive and so is upgrading the firmware of the camera.

Have a digital camera, see if it can updated, you’ll appreciate it.

Rooting my Asus Transformer (TF101) and one of those scarry moments

Rooting a new tablet can be scarry (what if I brick it?), so finding a set of instructions that worked the first time is key and that’s what I present for the Asus Transformer TF101.

I’ve put off getting a tablet until now and for someone who works on being up to date with technology this was difficult to say the least. The Asus Transformer was the choice tablet to get given performance and price. I’ll leave others to argue the pros and cons on this, for me this was a good choice.

One thing though, root access is required for some of the functions that my tablet would undertake. An example is this – running a video player on the tablet pulling a ripped DVD from a remote server on my lan. The remote server has a disk carrying my ripped DVDs (I rip my own DVDs so that I can do just this, watch them from my pc or tablet remotely). The server needs to be a device that Linux (Android if you will) can access and to mount devices that are not in the existing /DEV and /MNT directories requires root access.

Googling around a bit I found the XDA-Developers forums which had a number of articles/videos explaining how to root the tablet.

These are the resources I used:

Video instructions
A list of resources from XDA-DEVELOPER
The Revolution HD Rom you could use to replace the stock Rom.

I followed the video instructions and reviewed the other resources I’ve just pointed you too and found that it worked wonderfully well.

I didn’t try the Rom and include it here for reference and as a possible future assignment for myself.

Bottom line – this really did work and worked well. I now have root access and it’s allowed me to do, just as I pointed out, setup a mounting point to the remote drive and now play dvds over my wireless right to my tablet.

Stopping Skype’s HOME window from opening

So you log into Skype every time your PC starts and that darn HOME window appears too. All you want is your contacts list but there’s that window. I was wondering how to stop it and the options Skype makes available doesn’t seem to have a way to turn it off. Well the guy in this this blog entry described just how to do and it works well. I am repeating it here only for simplicy sake:

1. Close Skype
2. Go to c:\users\YOUR USER NAME\AppData\roaming\skype\shared_dynco
3. Open file dc.db in notepad,delete its content, save and close
4. In dc.db file properties set it up to read-only and confirm
5. Return a folder back and go to shared_httpfe
6. Repeat steps 3 and 4 in file queue.db

Don’t forget, make these empty files read-only.

Web surprise – the long tail for paper notebook lovers

I am always so surprised when I find that other people enjoy or love the same things I do and notebooks are my surprise for the day.

I currently write in a Gibson Markings notebook that I bought from Staples on sale and I bought a few more at the price for the future. Noodling around the web today looking for sellers of these fine little notebooks I stumbled on a few websites devoted to finding the perfect little notebook. Sites as in more than one site? Yes, that’s right there are a whole slew of sites devoted to this one topic. The long tail strikes again.

Here are a few of the sites and each have a review generally with pictures about a myriad of small note books.


My wonder never ceases, the net really allows people to bring their interests into public view. I am amazed.

Moving my company sites and activities into the “cloud”

I have several services that I’ve been using for years both of my own creation and some ope-source and I needed to move them onto a hosting provider. It just didn’t make sense to continue to host these things myself any more and I’ve been doing it a long time.

Which provider, what features and how to do it?

After looking at HostGator, Westgate, and others I selected GoDaddy surprisingly enough.

This is a test entry.

Move one step to the right to get better phone reception – why?

I’ve always wondered why mobile phone reception varies as you walk around. Stand in one place and you’ve got 5 bars, move to the right a step or two and you don’t. Reading Wireless Communications by Molisch provided the answer in the first 20 pages. Simply put, your signal is broken up between several pieces that come to your phone from different paths (multipath) and therefore at slightly different times (out of phase). At your phone they arrive to add together or subtract from each other. If they add together you have strong reception and if the subtract from each other you have weak reception.

Since the actual length of the signal is about 1m, when the multipath signals arrive at 1/2 the wavelength away from you (0.5m or about 1.5 ft)  you can experience a vastly different signal strength better or worse.


Copyright www.intechopen.com

In this picture, BS  (base station) broadcasts signal meant for the phone. The signal reflects off buildings, gets scattered through trees and defracts through other buildings. The signals in this case are coming from different directions and are of different lengths. Your phone has to add them together to make one big signal but the slight delay on some of the signals from others forces the total signal received to be less than what was transmitted.

Now you have the answer.

P.S. Could this be improved now? Practically speaking, no, since improvements would require much more processing power which will enlarge the phone handset and require a bigger battery. In the future the answer is maybe. Research continues all the time on this problem so it is likely that multipath signal noise will be reduced further. No garentees however it is likely.