February 24, 2010

Syncing Ubuntu System Time With Network Time

Try one of the following to sync your system time with the network time.

1. Check whether your system date and time are correct. If not, set the correct date and time.

2. You can also try System-> Administration-> Time and Date.

i) Unlock.

ii) Select Keep synchronized with Internet servers.

iii) If you are asked to install NTP support, click Install NTP support.

iv) Click Select Servers, and check required servers, or add a new one by typing URL of the server in the textbox clicking the Add button.

3. Please refer to the post Removing SSL Certificate Error In Ubuntu.

Removing SSL Certificate Expiry Error In Ubuntu

SSL certificate error for any site shows up when your system time is not in sync with the network time. If you view the details, you'll find that the date shown is in the past. To sync your system time, you can use ntpdate.

1. If it is not already installed, install it first.

varsha@varsha-laptop:~$ sudo apt-get install ntpdate

2. If it is already installed, try syncing the time.

varsha@varsha-laptop:~$ sudo /etc/network/if-up.d/ntpdate


varsha@varsha-laptop:~$ sudo ntpdate ntp.ubuntu.com

3. Try editing the ntpdate file.

varsha@varsha-laptop:~$ sudo gedit /etc/default/ntpdate

The file looks like:

# servers to check. (Separate multiple servers with spaces.)
NTPSERVERS=”0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org”
# additional options for ntpdate

If you have your own NTP server, list it under NTPSERVERS.

Save and exit the editor.

4. Now, use cronjob to run ntpdate every hour.

varsha@varsha-laptop:~$ crontab -e

In the file, type the following.

@hourly /etc/network/if-up.d/ntpdate

Save and exit. See the options at the bottom of the terminal for help.

5. Try updating again.

varsha@varsha-laptop:~$ sudo /etc/network/if-up.d/ntpdate

Try opening any site. You will at least get the option of adding an exception.


1. http://www.askdavetaylor.com/invalid_or_expired_security_certificate.html

2. http://www.ubuntugeek.com/keeping-your-system-clock-current-automatically-via-network-time-protocol-ntp.html

3. http://www.cyberciti.biz/faq/set-date-time-network-time-protocol-ntp/

4. http://www.howtogeek.com/howto/ubuntu/sync-your-system-clock-with-internet-time-servers-in-ubuntu/ (for Ubuntu 8.10)

February 23, 2010

Recovering File System In Linux

When your Linux doesn't give you a GUI, I know how it feels. It happened to me, and I felt like screaming my head off, which of course was of no use. Later I found that the file system had somehow got errors on it. I tried a number of things, some of which were helpful.

Listing it all down,

1. I booted into recovery mode, even when the normal mode failed, it took me to the shell prompt, where I was root by default.

2. I tried http://forums.techarena.in/operating-systems/1241547.htm. This didn't do much good.

3. I tried /etc/init.d/gdm restart and /etc/init.d/gdm start. This gave me a message box with the following error message.

Ubuntu is running in low-graphics mode.
The following error was encountered. You may need to update your configuration to solve this. (EE) Failed to load module "i810" (Module does not exist, 0)

But the screen got hanged and again made me turn off my laptop using the power button. So, it didn't help basically, the reason being there was no problem with the GDM, there were errors in the file system.

4. fsck did the magic. I tried a few times, then used Windows to post my query to different mailing lists. A. Mani and Prosun Prodhan of iitd mailing list helped me out.

5. On typing fsck, I somehow had a feeling that it was working to some extent.

mountall: fsck/ [856] terminated with status 4
mountall: Filesystem has errors:/
init: mountall main process (852) terminated with status with status 3
Mount of filesystem failed.
Fix<y>? yes

This gave me the following:

/dev/sda6: ***********FILESYSTEM WAS MODIFIED****************
/dev/sda6: ***********REBOOT LINUX***********
/dev/sda6: 228389/1212416 files (0.2% non-contiguous), 110712/4849614 blocks

Then I rebooted.

I tried this a number of times, until I booted with an Ubuntu live CD and did the same, and it finally gave me the default GUI mode.

Thanks to all who helped.

I don't know why this happened, but probably because I had not shut it down properly. I had to turn off my laptop with the power button, because it got hanged on inserting a pendrive infected with virus from the lab.

Note: Repeated use of fsck must be avoided. The first thing to focus on is your filesystem. That shouldn't be harmed.

February 20, 2010

Twitter On Pidgin

This post of mine is similar to the previous one. You can use Twitter on Pidgin. For this, do the following:

1. Install pidgin-mbpurple plugin, from Synaptic Package Manager or aptitude (for Ubuntu/ Debian). You can also download it from here. Another option is to check the plugin twitgin from Tools-> Plugins.

2. Restart Pidgin.

3. Add a new account, choosing the protocol TwitterIM. Enter your Twitter username and password under 'Basic', and set your proxy under 'Proxy' tab.

4. Check this account in Accounts window.

Happy tweeting. :)

Facebook Chat On Pidgin

Wondering why there is no IM client for Facebook, I just Googled a bit to find that there is a plugin for Pidgin that allows users to configure their Facebook account. What I did was:

1. Install the plugin pidgin-facebookchat. You can use your Synaptic Package Manager or aptitude (in case of Ubuntu/ Debian), or, if that is an older version, then download the latest file from here.

2. Double-click the .deb file and click Install Package. You'll probably have to configure, compile and install the package if you download the .tar.gz version.

3. Restart Pidgin.

4. Select Manage Accounts from Accounts, and click on Add....

5. Select protocol Facebook, enter your username and password under tab 'Basic'. Under 'Advanced', check your preferences, and under 'Proxy', set your proxy (if applicable).

6. Then check your Facebook account in the Accounts window.

That's it. :)

February 12, 2010

Converting .rpm Package To .deb

Alien is a program that converts between different file formats. If you want to use a package from another distribution, you can use alien to convert it to your preferred package format and install it.

Alien can be used to convert a .rpm package to .deb. If you have downloaded a .rpm package instead of a .deb, you need not refetch the correct package. You can do the following:

Install Alien

1. Download from here.

2. You can also install via command line.

varsha@varsha-laptop:~$ sudo apt-get install alien

Convert .rpm Package To .deb

1. Convert the package to .deb using the alien command.

varsha@varsha-laptop:~$ alien package_name.rpm

This takes the latest version of the package.

If you want the current version,

varsha@varsha-laptop:~$ alien -k package_name.rpm

2. To install the package, use dpkg command.

varsha@varsha-laptop:~$ dpkg -i package_name.deb

You can also use the alien command to directly install the package after converting.

varsha@varsha-laptop:~$ alien -i package_name.rpm

Note: See the manual for details on how to use the command.

varsha@varsha-laptop:~$ man alien

February 7, 2010

Installing qGTalk In Ubuntu 9.10

A few days back I came to know about qGTalk. So I decided to give it a try.


1. Download the package from here.

2. Then, check whether the dependencies, i.e., libglib2.0-dev, libqt4-dev, g++, libgloox and Qt 4.3 are met.

If you have problems resolving the dependencies, try installing from Synaptic Package Manager or apt-get or try downloading the package. In my case, libglib2.0-dev, libqt4-dev and libgloox weren't installed, and I also had problem in installing them using the package managers. So, I downloaded them.

i) Open a terminal and type:

varsha@varsha-laptop:~$ wget http://launchpadlibrarian.net/24833148/libqt4-dev_4.5.0-0ubuntu4_i386.deb

libglib2.0-dev can be installed using Synaptic Package Manager, but if you wish to download,

varsha@varsha-laptop:~$ wget http://launchpadlibrarian.net/36376694/libglib2.0-dev_2.22.3-0ubuntu1_i386.deb

varsha@varsha-laptop:~$ wget http://camaya.net/download/gloox-1.0.tar.bz2

(With the help of Irfan from nitdgplug mailing list.)

ii) Double-click and install the .deb files. For installing gloox-1.0, extract, configure, compile and install. Read the INSTALL file in the extracted folder.

3. Then, follow the steps given on the same page.

varsha@varsha-laptop:~$ tar zxf qGTalk_en-0.1.9.tar.gz
varsha@varsha-laptop:~$ cd qGTalk_en-0.1.9/
varsha@varsha-laptop:~$ qmake-qt4 qGTalk.pro
varsha@varsha-laptop:~$ make
varsha@varsha-laptop:~$ sudo make install

4. Launch it from Applications-> Internet-> qGTalk.


varsha@varsha-laptop:~$ /qGTalk_en-0.1.9/qGTalk/
varsha@varsha-laptop:~/qGTalk_en-0.1.9/qGTalk/$ sudo make uninstall

This might show you an error, but removes qGTalk from your system.

February 3, 2010

Mounting Windows Drives In Ubuntu 9.10

Generally, Windows partitions get mounted automatically. But, if any of the partitions don't, do the following:

1. In the terminal, type,

varsha@varsha-laptop:~$ mount /media/disk-2

Here, disk-2 (for instance) is the disk that fails to mount. It may be different in your case.

If the drive fails to be recognized, try the following.

2. Open /etc/fstab to see if the particular partition is listed there.

varsha@varsha-laptop:~$ sudo gedit /etc/fstab

If not, then try one of the following:

i) Open the terminal and type,

varsha@varsha-laptop:~$ sudo mount -a

ii) If the above command doesn't work, type,

varsha@varsha-laptop:~$ mkdir /mnt/disk-2

Then try mounting,

varsha@varsha-laptop:~$ sudo mount /dev/sda5 -t ntfs /mnt/disk-2

sda5 is the concerned partition on the HDD, it may be different in your case.

To auto-mount, add it to /etc/fstab.

/dev/sda5 /mnt/disk-2 ntfs user,uid= 0 0

[Source: http://ubuntuforums.org/archive/index.php/t-933441.html]