Category Archives: Ubuntu

Set BING Background as your Desktop Wallpaper in GNOME


BING comes up with a beautiful background everyday. I thought why not set this background as my desktop wallpaper. But it would be a cumbersome task to set it manually. So I searched (Googled, BINGed) for some script which will do this for me. I found BING Downloader which does this task on Windows. I could not find any such script for GNOME. So, I thought of writing one.

I wrote a script which when executed automatically sets the GNOME wallpaper as BING background of the day. This is a PHP script. To execute this script you need to have php installed on your system. You can install php in Ubuntu as

sudo apt-get install php5 php5-cli

Now you are all set to download this script. Download Link: http://www.spsneo.com/scripts/bing_wallpaper.tar.gz

Download this file, extract the script file. Now you can run the script from terminal :
php bing_wallpaper.php

And your wallpaper is set. You can run this script daily from your terminal or you can set a cron job for the same or you can set up an icon in your gnome panel for this script.

I will keep updating this script. And I am also planning to write the same script in python. So check back again if you dont want to install php on your system.

Send your feedbacks and suggestions.

Update 1: I have modified the script to work with http proxy. Just assure that the environment variable http_proxy is properly set.

Update 2: Modified the script to keep the image centered on the desktop with black background. Try it out.

Colourful man pages in Ubuntu


Linux man pages are the most important resource for a Linux freak. By default man pages are formatted using the ‘less’ utility. ‘less’ shows the man pages in black & white, something like this :

grayscale man pages

If you use ‘most’ utility to format man pages, you will get a properly colour-formatted man pages. Take a look at man pages configured on my system :

color man pages

Do you like this one ?? Read on how to configure ‘most’ as your man pages viewer.

Step 1: Install the package ‘most’

$ sudo aptitude install most

Step 2: Configure ‘most’ as your man page viewer using update-alternatives :

$ sudo update-alternatives --config pager

update-alternatives

Enter the number corresponding to /usr/bin/most , here in this screenshot its 5.

Yeah, its done. Nothing more to do !!

Have fun.

Let me know if you find any difficulty doing this.

P.S: This can be done in Fedora as well as other linux also. In Fedora I guess you will have to use the command  /usr/sbin/alternatives instead of update-alternatives as root. Somebody try out in Fedora and let me know.

How to force fsck (File System Check)


Ubuntu linux, by default performs an ‘fsck’ one every 30 times the file-system is mounted to make sure the hard disk has no errors.

Sometimes you may need to perform an ‘fsck’ during next boot. Here’s the solution -

Create a file /forcefsck without any contents. This can be simply accomplished by

$ sudo touch /forcefsck

The next time you bootup fsck will be performed on all the partitions of your hard drive.  Since the file /forcefsck is deleted during the bootup process, this will force ‘fsck’ just ones.

On the contrary, if you frequently turn off your machine, you may be annoyed by regular fsck done every 30 times filesystem is mounted.  So, you may sometime wish to disable fsck and boot up fast. This can be done by creating a file /fastboot

$ sudo touch /fastboot

This file is also deleted during the boot up. So this method disables fsck only once. To change the frequency of ‘fsck’ according to your need you may use a very good utility ‘tune2fs’.

Check out its man pages for more details.

P.S.: These methods are generic to all Linux distros, but I am not sure about the frequency.