Coherent Blahs

Tips n Tricks

Google’s Chrome browser (with Java induced hiccup)

by Indiangeek on Dec.09, 2009, under Linux, Tips n Tricks

I had some problems with the newer releases of Firefox. And Google just enabled extensions for Chrome browser. Time to switch. And boy, am I happy!! It renders the websites much MUCH faster than Firefox, imported all my bookmarks, and most importantly, search keywords, from Firefox.

I did face one problem though. On my Ubuntu 8.04 LTS laptop, it didn’t support Java out of the box. Flash worked fine, but no Java.

However, found the fix pretty easily on the web. You need to do the following if you are facing this problem:

sudo mkdir /opt/google/chrome/plugins

cd /opt/google/chrome/plugins

sudo ln -s /usr/lib/jvm/java-6-sun/jre/lib/i386/libnpjp2.so

After this, restart Chrome, and voila, Java is working fine.
Reblog this post [with Zemanta]
1 Comment :, , more...

Email filter to Google Talk message

by Indiangeek on Nov.27, 2009, under Linux, Technology, Tips n Tricks

Not all Emails are made equal. And some have the priority that they cannot wait.  Given that, I was looking for a way to filter out mails, and get a quick notification on some high priority Emails.
Since I have an Android phone, the best way for me to get notified is either through SMS, or through Google Talk. SMS costs money. So, I wanted the notification to come over GTalk.
My work Email resides on an Exchange server, and it has no way to filter an Email and generate a GTalk notification from it. So, I had to look for some client side solution.
Looking around the web, I found GTalk uses jabber as the underlying protocol, and I can use xmpp libraries to communicate with it.
(continue reading…)

Leave a Comment :, , , more...

Converting Google My Maps to Garmin (or other) gps’s gpx/gpi format

by Indiangeek on May.21, 2009, under Linux, Technology, Tips n Tricks

We have a vacation coming up next month, and I was wondering how to best use my Garmin nuvi 350 for the trip. It became more necessary since the accomodation we’ll be staying at will not have any Internet access (so, no access to Google Maps).

Google Maps have the nice feature where you can send a Point of Interest (POI) directly from Google maps to your Garmin GPS. However, it has a few shortcomings:

  1. Garmin issue: It has only Windows XP (No Win2k) and MacOSX support. So, no Linux support. Bummer!! It’s not Google’s fault, since Garmin has not ported the plugin for Linux. This is a double bummer since Garmin now uses Linux in most of its GPS lines. Since they are getting so much commercial value from Linux, I’d expect them to give a little back and port their software for Linux.
  2. Google Issue 1: Only the POIs that show up in the search of google maps can be sent to the GPS. No Custom placemarks can be sent. This is surprising since most GPS’s take co-ordinates for POIs, which is readily available in Google maps.
  3. Google Issue 2: Either I am missing something, or Google just completely didn’t get it. There is no way to completely send a whole Saved Map to a Garmin (or any other GPS) device from Google maps. That’d mean, if you have a saved map with many placemarks, you’ll have to send them individually. It’s just not cool.

However, the best news is, there is a solution around all these issues. The steps to get this done are:

  • Create a new Map in Google Maps. For this, click on My Maps: google my maps
  • Then click on “Create new map”. Put a suitable name to your map: google_new_map
  • Now you can add placemarks, either by searching for them, or by right clicking and selecting “Add a placemark” anywhere in the map. The added placemarks for the map will show up on the left side:google_map_create_placemark
  • After all the placemarks have been added, get the link for your saved map. You can get the link from the top right corner:google_link_to_map
  • Then go to http://www.takitwithme.com/ and insert the Google Map link into the textbox. Click “Load MyMap” and TakeItWithMe will load all the placemarks from your Google Map.
  • Click on the Download GPX button, and you should be able to save all the Google Placemarks as a .gpx file. This .gpx file can be converted into different GPS formats. In our case, we need to convert it to a .gpi format.
  • For Windows users, you can use the POI Loader directly to load the GPX file into your Garmin GPS.
  • For Linux users, the GPX file needs to be converted into GPI format, and manually loaded. For this, use gpsbabel. The command for converting it to the Garmin gpi format is:

gpsbabel -i gpx -o garmin_gpi -f Yellowstone.gpx -F Yellowstone.gpi

Leave a Comment :, , , more...

Getting Logitech QuickCam Fusion to work on Ubuntu Jaunty Jackalope

by Indiangeek on May.17, 2009, under Linux, Technology, Tips n Tricks

Yesterday, I plugged in my Logitech QuickCam Fusion webcam into my Jaunty Desktop with Kubuntu, and it didn’t work out of the box. Searching online showed the Webcam should be supported natively in the kernel using the uvcvideo kernel module. So, what went wrong:

A quick look at /var/log/syslog showed:

May 17 11:40:41 newcompy kernel: [  876.134221] usb 1-1.1.4: USB disconnect, address 8
May 17 11:40:45 newcompy kernel: [  880.404316] usb 1-1.1.4: new high speed USB device using ehci_hcd and address 9
May 17 11:40:45 newcompy kernel: [  880.673393] usb 1-1.1.4: configuration #1 chosen from 1 choice
May 17 11:40:45 newcompy kernel: [  880.673482] uvcvideo: Found UVC 1.00 device <unnamed> (046d:08c1)
May 17 11:40:46 newcompy kernel: [  881.672050] uvcvideo: Failed to query (135) UVC control 1 (unit 0) : -110 (exp. 26).
May 17 11:40:47 newcompy kernel: [  882.672039] uvcvideo: Failed to query (129) UVC control 1 (unit 0) : -110 (exp. 26).
May 17 11:40:47 newcompy kernel: [  882.672042] uvcvideo: Failed to initialize the device (-5).

May 17 11:40:48 newcompy kernel: [  883.636047] 9:3:3: cannot set freq 16000 to ep 0×86

So, the module was failing to initialize, and as a result no /dev/video or /dev/video0 was getting created automagically.  A little googling got me the solution.

Basically, the issue is, for some webcams, including this one, the audio device has to be initialized before the video device can be initialized. But, for the kernel, it detects the video device first, and goes ahed to initialize it, causing the issue.

The easy, manual solution is… after booting the machine and connecting the webcam, run the following command on a shell prompt:

sudo rmmod uvcvideo

sudo modprobe uvcvideo

The first command removes the uvc video module (driver for the webcam), and then re-initializes it using the second command. Since the audio section is already initialized, this goes through fine. You should expect something like the following in the /var/log/syslog file on running these.

May 17 11:42:50 newcompy kernel: [ 1005.135784] usbcore: deregistering interface driver uvcvideo
May 17 11:43:08 newcompy kernel: [ 1023.761270] uvcvideo: Found UVC 1.00 device <unnamed> (046d:08c1)
May 17 11:43:08 newcompy kernel: [ 1023.788759] input: UVC Camera (046d:08c1) as /devices/pci0000:00/0000:00:1a.7/usb1/1-1/1-1.1/1-1.1.4/1-1.1.4:1.0/input/input6
May 17 11:43:08 newcompy kernel: [ 1023.790091] usbcore: registered new interface driver uvcvideo
May 17 11:43:08 newcompy kernel: [ 1023.790227] USB Video Class driver (v0.1.0)

6 Comments more...

Another Bengali editor

by Indiangeek on May.13, 2009, under Technology, Tips n Tricks

Noticed this decent Online bengali editor that allows typing in phonetic Bengali, and converts it to unicode.

QUillpad

Leave a Comment : more...

Visio files on Linux

by Indiangeek on Jan.28, 2009, under Linux, Technology, Tips n Tricks

   As part of my work, I had to look at some Visio files that were saved in proprietary, undocumented .vsd formats. This was not possible on Linux, as the standard oodraw, dia applications didn’t support it (apparently for some legal issues). However, if you have access to a Windows machine with visio, there is a way out. You can open the file in Visio, and then save it as “XML Drawing”. This will save the file as .vxd format, which Dia can open and edit fine. Apparently, the XML Drawing format, although proprietary, is more documented and supported. So, if you get .vsd files sent regularly by your collegues, ask them to save them in .vxd instead, which will allow both Visio and other cross-platform programs to view/edit them.

Leave a Comment :, , , , more...

ffmpeg recipe: Convert to WMV

by Indiangeek on Nov.10, 2008, under Linux, Technology, Tips n Tricks

Converting Video/Audio on Linux is a breeze, and there is no shortage of tools. Especially between ffmpeg and mencoder, I can’t think of any conversion that’s not possible.
However, the problem is finding the right parameters suited for a specific task. There are multiple “wrapper” tools (e.g. Avidemux, HandBrake) that make life a lot easier. However, sometimes, knowing the actual conversion parameters help.

I was trying to convert some videos so that they play on Windows without need for any extra codecs etc. WMV format is the way to go for this. The following ffmpeg recipe seems to be working fine:

ffmpeg -i <input_file_name>  -s <output_resolution> -b <video_bitrate> -vcodec wmv2 -acodec wmav2 -ar 44100 -ab <audio_bitrate> -ac 1 -y <output.wmv>

Example:
ffmpeg -i output.avi  -s 180×120 -b 300k -vcodec wmv2 -acodec wmav2 -ar 44100 -ab 48000 -ac 1 -y movie.wmv

Leave a Comment :, , more...

Using python to search google

by Indiangeek on Nov.02, 2008, under Technology, Tips n Tricks

  Recently I was playing with couple of link scraping libraries, and was impressed by the simplicity of the mechanize toolkit. The only problem they have is lack of documentation.
  Following is an example script written in python that can do a google search and scrape the result links (of class ‘l’) in a few lines of code.

import re
import sys
from mechanize import Browser,DefaultFactory
import mechanize;

br = mechanize.Browser( factory=DefaultFactory(iwantbrokenxhtmlsupport=True))
br.addheaders = [ (“User-agent”, “Mozilla/5.0 (compatible)”) ]
br.sethandlerobots(False)

br.open(‘http://www.google.com/search?q=’+sys.argv[1])

def arrtonamed(arr):
        ret = {};
        for x in arr:
                ret[x[0]] = x[1];
        return ret;
# follow second link with element text matching regular expression
for link in br.links():
    hash = arrtonamed(link.attrs);
    if hash.has_key(‘class’):
            if (hash[‘class’] == ‘l’):
                print link.url+’[‘+link.text+’]’

A sample output for the script is:

$ python goog.py samya
http://www.thinkbabynames.com/meaning/0/Samya[Samya - meaning of Samya name]
http://www.samyatech.com/[SAMYA Technology : Green Power Expert! 祥業科技股份有限公司: 綠色 ...]
http://www.yawiktionary.com/s/1148371572412.html[samya - definition of samya - yawiktionary.com]
http://samya.indiangeek.com/[[ IndianGeek ] Welcome to Samya’s HomePage]
http://www.hossamramzy.com/stars/starsofegypt_samya.htm[The Stars of Egypt ® | Hossam Ramzy]
http://www.belly-dance.org/samia-gamal.html[Samya Gamaal - the queen of raqs sharki]
http://www.samya.ca/[Samya Therapies Splash Page]
http://samya-photography.deviantart.com/[Samya-Photography on deviantART]
http://www.facebook.com/people/Samya_Badraoui/1434855400[Samya Badraoui | Facebook]
http://www.healthgrades.com/directory_search/physician/profiles/dr-md-reports/Dr-Samya-Nasr-MD-EB461FD0.cfm[Dr. Samya Z. Nasr, MD, Pediatric Pulmonology, Pediatrics, located ...]

Leave a Comment :, , , more...

Writing বাংলা (Bengali) in Linux

by Indiangeek on Nov.01, 2008, under Technology, Tips n Tricks

On my impending trip to India, I’m planning to move my family from using Windows to Linux. I have Kubuntu Intrepid Ibex in mind as the distro.
The primary applications for my parents are Email (Thunderbird) & Web browsing (Firefox), both of them work like charm on Linux.
However, my father being a writer, he needs an editor that allows him to write in bengali, a regional language. Now, there is of course the keyboard layouts available for writing in bengali, and generate unicode output, it’s not that useful as it doesn’t support phonetic input. So, the writer will have to remember the keyboard layout.
Then I found Bhasha, a Java stand-alone application that allows writing in bengali phonetically, and produces unicode output. Problem solved.
Here is a screenshot.

Leave a Comment :, , , , more...

Firefox high cpu usage and flashblock

by Indiangeek on Aug.25, 2008, under Technology, Tips n Tricks

I’ve been noticing Firefox using up a lot of CPU lately. At any given time, I normally have about 3 to 4 firefox windows with about 5-6 tabs in each open. But with no activity in them, there should not be much CPU usage. On a hunch, I installed flashblock, a firefox plugin to disable showing flash apps automatically. Instead, it shows a blank rectangle, with a play button in the middle to start the flash app. Installing this made a dramatic effect, and soon I realized this is due to the n number of flash advertisements in different websites. I probably had about 10-15 flash apps playing at the same time, none of them really useful to me. Would highly recomment this add-on. 

Leave a Comment :, more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...