Sunday, December 13, 2009

Some algo fun

Well, I was trying to figure if a user could be given a pass code of length 40, and split in pieces for ease, I ended up dealing with numbers and so many calculations, that I finally made an algorithm and wrote it down in JS. The code is as follows:
//uses Firefox Firebug

var n = 1;

var s = 1202;

var m = 1;

while((s-n)/(n+1) >= 1 && n <= m) {

m = (s-n)/(n+1);

console.log('dashes = '+n);

console.log('chunksize = '+m);




Some results to consider:

String Length

Number of dashes

Split length










Tuesday, December 08, 2009

Nautilus auto-mount with long disk id

Since Ubuntu 9.05, the free partitions are mounted with their disk id in Nautilus, which is not very convenient.

An easy and simple solution is to create a label for that partition, and then Nautilus mounts it with that label, making it easy for future use, and even if one formats the partition causing its id to change, setting the label will fix the problem immediately.

For ext2, ext3, and ext4, one can use e2label, and mtools for vfat partitions.

It is very convenient when one has multiple programs pointing at that same partition, and its id has changed.


Sunday, October 18, 2009

Ubuntu Karmic rocks on Thinkpad X61

Yes, I installed Karmic beta two days ago, after Xorg Edgers bleeding edge package made X completely unusable on Jaunty, and it was worth it, in every sense.

The experience is flawless, and the package is great for Desktop experience. Video works flawless for Intel i945, so no problems with Compiz. On the lighter side, there are very good Desktop themes, and wallpapers included.

The Wacom tablet support in Gimp has gotten better, compared to Jaunty, and both mouse and the pen can be enabled at the same time.

Xorg does not leak memory, and VMware works great too. The fingerprint reader works well, expect in Gnome screen lock.

I forgot to mention all the latest packages, which is great, except some are experimental like Inkscape 0.47, which is very slow, and made me doubt the system performance.

Inkscape 0.47 seems to promise a lot, and I am sure it would be great once the bugs are out.

Rest, I am very satisfied with Karmic Beta.

How to fix Gnome applications menu entries

I have tried Google, and all so many discussions, and almost none helped. After deleting an entry from the Applications menu, which can be done from the menu editor opened by right clicking the Ubuntu Icon, and selecting 'Edit Menus.'

I deleted a few entries which were visible even after the application had been uninstalled. After reinstalling the applications, I failed to see them reappear.

From my experience, the entries are never deleted, but merely removed from the menu, and are blacklisted. So even after installing the application, they fail to appear in the menu.

After a little search, I was able to find the links in ~/.local/share/applications where ~ represents the user's home directory. I could find all the application links that I had deleted.

The simplest way to get them back is to drag them to the menu editor.

I will investigate and post once I have more info.

Tuesday, September 15, 2009

Jaunty with kernel 2.6.31 and latest Intel drivers

I updated my kernel version to 2.6.31 with the latest xorg-edgers intel update, and the system rocks.

The system is smooth, no memory leaks, no hacks, and both 2D and 3D display are perfect. Try blender to see the difference.

References: release

Monday, August 24, 2009

Texas Instruments TI89 Titanium On Ubuntu Linux Jaunty

It is easy to connect, browse and manage a TI calculator with TILP.

To install:
> sudo apt-get install tilp

To Run:
> sudo tilp

Right click on the left window, and click Change device (ctrl+D)

Click the button with the lens to scan for your device.

Select your device in the list and press OK. You should have the device ready for browsing, backing up, as well as restoring, much better than the device browser provided by TI for windows.

I have not tried the cellsheet, or other options which are available in Windows. There should be some options in Linux as well.

Sunday, August 23, 2009

Jaunty a brilliant product with a bad kernel

I loved the fist impression and, now I loathe the experience. To be truthful, I think Ubuntu team could have done better by releasing a little late, or by updating Jaunty release with the kernel 2.6.30, because it works.

You can install the latest kernel-image, and headers from

Reboot, and your life immediately gets easy. Overall performance is great.

UXA leaks reduce, and acceleration gets better.
Blueman works either way, connecting easily, means there was a problem with original bluetooth module.
VMplayer would have problems compiling, use the patch from;jsessionid=4FA51D8195A709F472E22E3E56BA76EC#1246247

So if you want to enjoy Jaunty, get kernel 2.6.30.

Thursday, August 20, 2009

Ghost borders in IE6

After having come so far away from IE6 with Google's Chrome glittering well in Linux, we still have to care a lot for IE6 which seems to have 14% of user base in our company, and it is a pain.

External container would have problems if it is leaving a padding, or has a border, resulting in ghost borders, which would flicker or appear partially.

To fix, add zoom:1, or add display:relative to the to the css for the container.


Wednesday, August 19, 2009

Another surprise 3d accelerator UXA for intel x3100 leaks memory unaffordably

I have more than sufficient memory for my heavy duty use of my computer with at least two operating systems running all time, and have never had a memory crisis. My swap partition rarely gets touched, and here right after using Compiz after enabling UXA in xorg.conf, I have a memory crisis, my whole system becomes so sluggish only to remind me to check the memory to find out that my swap is full, and I have only a quarter of my RAM left.

Reason, UXA is leaking a lot of memory creating a havoc, which I would not be able to accept, because I can not live without Compiz, and it is so sluggish with UXA disabled.

Solution is to edit /usr/bin/compiz, and change the

COMPIZ_OPTIONS="--ignore-desktop-hints --replace"
line to:
COMPIZ_OPTIONS="--replace --sm-disable --ignore-desktop-hints ccp --indirect-rendering"

This fixes the problem, I also upgraded my intel driver to the latest, but that did not seem to help, until the above mentioned fix.

System is smooth again.


Monday, August 17, 2009

Rar and Unrar-free

on Jaunty, when I was looking for a rar extractor, I found unrar-free in the depository to be attractive (FREE is always attractive, even when one is working in a open source environment). I installed it, and tried to extract an archive. It would extract a few, and leave a few as failed. I downloaded the file multiple times, only to get the same results. Finally, I gave rar a thought, and it did it.

Beware, unrar-free does not work!

Sunday, August 16, 2009

Jaunty Apache2 no VirtualHosts problem

After moving to Jaunty, I encounter a queer problem, which would display the following mesage, and Virtualhost would not work.

Could not reliably determine the server's fully qualified domain name, using for ServerName
[warn] NameVirtualHost *:80 has no VirtualHosts

I had not changed anything, and copying same files from Hardy to Jaunty should have not caused an issue, since Apache's version remains the same, and so do the config files.

After scanning through apache2.conf, ports.conf, and all my website conf files, I could not find an issue. Then on a careful observation of the examples in Apache documentation I realized that a port definition was required in all virtual hosts.

So <VirtualHost *> would no longer work. One will have to change to <VirtualHost *:80> in all the websites. This fixed the issue.

New OS, new surprises!


Nautilus Ubuntu Missing Thumbnails

The thumbnails in Nautilus do not seem to be regenerated, once the correct libraries or codecs for different video formats are installed. If one has opened the folder filled with videos without installing codecs, there's a chance they have been blacklisted by the thumbnailer.

The solution is to open the /home/[username]/.thumbnails folder and delete all files in fail folder.

After that, to restart Nautilus from a command line, do:
>killall nautilus

>nautilus &

Now it should regenerate the thumbnails.

If this does not work, please make sure you are able to play those videos, and correct libraries to play them are installed.

You can also try deleting all files in the all folders in.thumbnails.

Saturday, August 15, 2009

Finally Ubuntu Hardy Heron 8.04 to Jaunty 9.04 on Thinkpad X61

I have finally made the move to the new world, after waiting for a year. It's just great. Plug-n-play Xorg, so I do not have to restart X to enable my Wacom tablet (in simple terms re-login, or start another x-session meaning "switch user"), and can change the screen resolution on fly, and the rotate, it all works flawlessly.

A few problems:
1. Blueman bluetooth manager from is an excellent tool to facilitate bluetooth device, audio, and network management. It (version 0.5) was flawless with my Iphone on Hardy, and 1.1 seemed very promising, not available for Hardy. It does not connect so easily with my Iphone now for tethering, but works. I have not tried the pulse audio, and other plugins, but they definitely look promising.

2. It does have thinkfinger tools available, but that does not work properly, and is very annoying, but the same can be installed by adding a repository by editing /etc/apt/sources and adding the following line
deb jaunty main

at the end, and installing the related key:
sudo apt-key adv --recv-keys --keyserver F2A12FABE936A7BBDC4EA33351DB180D1323E149

Later run:
sudo apt-get udpate && sudo apt-get upgrade

Finger reader should work flawlessly.

3. The "New Wave" theme looks beautiful. Have a look:

Gimp's toolbars do not show on the taskbar anymore.

That's all for now, will add more soon.


Tuesday, July 28, 2009

AT&T T-mobile Iphone 3G/3GS internet tethering to Ubuntu Linux Hardy Heron (the easy way)

  1. Open in your Iphone Safari browser and install internet profile for your network.
  2. Enable internet tethering in Settings>General>Network.
  3. Enable bluetooth and stay on the bluetooth screen.

ON your PC
  1. Install Blueman from
  2. Bond with Iphone (For this you need the iphone bluetooth screen to remain open)
  3. Enable Network in services, Edit>Services
  4. Click the settings icon on the same screen to enable DHCP.
  5. Right click Your phone's name in the list and select Connect to PAN.
  6. Your system will ask for your password to access DHCP client.
  7. Open your browser, make sure it is not working in offline mode.
  8. You should have internet tethered.
Easy A'INT iT!

Saturday, May 23, 2009

T-Mobile, AT&T, Sprint GPRS (3G) internet connection on Ubuntu Hardy Heron (8.04) Linux

1. Make sure wvdial is installed.
2. Gnome-ppp and KPPP are two good PPP dialers, but Gnome-ppp was not able to connect in at least 20 trials. KPPP works very well.
3. Connect the 3G phone, or the Aircard. (I have used Nokia 6263, and Sierra wireless 881U aircard)
3. Start a terminal, and type sudo wvdialconf. If would find the modem and write modem speed, device address, and other initial configuration in /etc/wvdial.conf.
4. Edit /etc/wvdial.conf to add :
Init3 = at+cgdcont=1,"IP","" ( is only for T-Mobile, search Google for other providers' APN)
Phone = *99#
Username = user
Password = pass
Save the file.
5. Now type wvdial. It should connect without a hitch, if your device is working properly. Yes it is that simple.
6. Press CTRL+C to disconnect.
6. Start KPPP.
7. Click Configure to add a Modem.
8. Copy settings from /etc/wvdial.conf for device, and speed.
9. Click Modem commands and add Init2 string from wvdial.conf in Initialization string 1. Paste Init3 string in Initialization string 2.
10. Give the modem a name and press OK to save.
11. Add a new account, and select Manual Setup.
12. Name the connection T-Mobile or whatever you want, and add a number *99#.
13. Leave all other default settings.
14. Press OK to exit the configuration.
15. Type user as Username and pass as Password and connect.
16. It should work.
17. You can enable Dock into Panel in Misc configuration to minimize it into an icon when connected.

References :