Pages

Monday, September 17, 2012

Custom Launchers in GNOME 3

Install 'alacarte', and then use!
Self explanatory.

Tuesday, September 11, 2012

Dual boot clock problems

Symptom:

You have a dual boot machine with Windows and Linux. The Linux OS thinks the BIOS time is UTC, whereas windows thinks it is local time. So depending on what your BIOS clock is set to, one of the OSes will show a wrong clock.

Solution:
  1. Decide what you want your BIOS clock to be. There are arguments for both sides.
  2. If you want you BIOS to be set to UTC, then:
    1. Linux will be fine, because this is what is expects. 
    2. For Windows add a registry entry as follows.
    3. Create a file called time.reg with the following content
    4. Windows Registry Editor Version 5.00
      [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
      "RealTimeIsUniversal"=dword:00000001
    5. Then double click it - and accept the warnings that follow.
    6. Done!
  3. If you want the BIOS to be set to Local time, then
    1. Leave Windows as it is
    2. In Linux, add a line in the file /etc/default/rcS with the content UTC=no

Monday, July 16, 2012

Automounting Network partitions

If you have network drives that you would like to be auto-mounted on startup on your Linux box, then the obvious way to do this seems to be to put the appropriate line in /etc/fstab. (Note that for Windows shares, the appropriate packages have to be installed - samba and smbfs).

However, if the fstab is executed before the network comes up, you have a problem - the mount will fail. The workaround is to either
  1. not do auto-mount, OR
  2. delay the mount till the network is up OR
  3. to use a program written specifically for this situation - Autofs. 

Friday, July 13, 2012

From J. N. Tata to Swami Vivekananda


Dear Swami Vivekanand,

I trust you remember me as a fellow-traveller in your voyage from Japan to Chicago [in 1893]. I very much recall at this moment your views on the growth of the ascetic spirit in India and the duty, not of destroying, but of diverting it into useful channels. I recall these ideas in connection with my scheme of a Research Institute for India, of which you have doubtless heard or read.

Compiling ngSPICE on Ubuntu 12.04

Wanting to install the latest version of ngSPICE on the new Ubuntu 12.04 box, i ran into a little trouble. The first is that ngSPICE is a very powerful interactive software, but the plain vanilla command line is really painful to use because it does not support backspace and arrow keys. The fix for this is to use the GNU readline library. Unfortunately, without the correct X packages installed, you will end up with a functioning installation of ngSPICE that cannot plot data, complaining that it "Cannot open viewport". The fix for this is to install the following packages:

Install autoconf and libtool  if you are running autogen.sh


Install bison, else configure will not run.

For GNU Readline support, install libreadline6, libreadline6-dev
For Plotting, install: libxaw7, libxaw7-dev, libx11-6, libx11-dev

Then run ./configure --with-readline

Then make and then [sudo] make install...

Thursday, July 12, 2012

Backing Up with Rsync

There's always a moment of butterflies when your machine hangs, or doesn't  boot up, or shows some cryptic message and dies. In the few minutes following my last such catastrophe, I berated myself for not taking regular backups on an external drive. Then I started to look at trying to recover the data using a live CD. When I finally got the new OS going I decided the first thing to do was to set up a system to silently backup the system every once in a while, either to a USB hard drive or to a network drive. So I wrote a script to do this using rsync. The script is as follows, with explanations for each line...

Tuesday, May 8, 2012

Custom Bash Prompts

When working on some tasks the bash prompt can become irritating. Moreover, switching back and forth can get pretty irritating with the export commands. So here is a small script to do the job conveniently. Just download the package and read the README file for detailed information on installation and usage.