TATA Photon Plus and Xubuntu

That was a tough one! At least for me. I took more than an hour on this shit.

Firstly, none of the manuals/websites deal with the issues in a comprehensive manner. I too won’t. I will but, try to highlight the issues I faced and the way I solved them.

My modem is the old one Olive VME blah blah…

1. I assume you don’t have an alternate net connection. If you have go to step 2. Download wvdial and the last 4 dependencies from: http://packages.ubuntu.com/maverick/comm/wvdial. For other ubuntu versions the links are there on the almost top right hand side the page. Generally, you wouldn’t need other dependencies, if you do you will have to download them too. But for the first try, no need.

2. Download usb-modeswitch and usb-modeswitch-data from http://packages.ubuntu.com/maverick/comm/usb-modeswitch. This is used to change your driver from usb-storage to usbserial for your device. You can also do it manually by rmmod usb-storage and modprobe usbserial vendor=0x201 product=0x2009. But why not automate things, yeah!

2. Install all by: ‘sudo dpkg -i *.deb *.man’, in your download folder. If you have a net connection use aptitude: sudo aptitude install wvdial usb-modeswitch.

3. Now before you can do anything, plug in your device. Wait till its led goes blue. Do a ‘lsusb’. You will find a device name in front of one of the usb devices. For me it was 201e:2009. The first part ‘201e’ is the vendor name while the ‘2009’ is the product id.

4. Now you will have to find this in /etc/usb_modeswitch.d directory. If the file exists, yuhuu! or else create it. And then put the following in it:
################################################## #####
# Haier CE 100

# from 201e:2009
DefaultVendor= 0x201e
DefaultProduct= 0x2009

TargetClass= 0xff





The MessageContent should not be an issue – any one of the 3 would work.

5. Now, to automatically load the driver for your device (201e:2009 in my case), edit /lib/udev/rules.d/40-usb_modeswitch.rules, and append the following at the end:


# Qualcomm, Incorporated (TATA Photon +)
ATTRS{idVendor}==”201e”, ATTRS{idProduct}==”2009″, RUN+=”usb_modeswitch ‘%b/%k'”

6. Now reboot. And if everythings correct, after plugging in the device, a dmesg will show you:


[ 1824.980062] usb 3-2: new full speed USB device using ohci_hcd and address 3
[ 1825.216299] option 3-2:1.0: GSM modem (1-port) converter detected
[ 1825.216588] usb 3-2: GSM modem (1-port) converter now attached to ttyUSB0
[ 1825.223243] option 3-2:1.1: GSM modem (1-port) converter detected
[ 1825.224738] usb 3-2: GSM modem (1-port) converter now attached to ttyUSB1
[ 1825.229527] option 3-2:1.2: GSM modem (1-port) converter detected
[ 1825.230280] usb 3-2: GSM modem (1-port) converter now attached to ttyUSB2

If you are getting anything else, something has gone wrong. You can either post a comment about your issue or search on the net.
7. Now comes wvdial. Well its not necessary. If you are using network-manager – you can right click->edit connections-> mobile broadband -> add/edit tata photon -> fill in user,password both as ‘internet’ -> check connect automatically and done.
8. If you want to use wvdial, edit the /etc/wvdial.conf and put:


[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Stupid Mode = 1
Modem Type = USB Modem
ISDN = 0
Phone = #777
New PPPD = yes
Modem = /dev/ttyUSB0
Username = internet
Password = internet

9. wvdialconf should give you the output as expected and foretold by the user manual. Then a sudo wvdial will connect you. sudo is required to start the ppp daemon. Do not forget it. You might be required to do it 2-3 times initially.
10. I have changed from wicd to network-manager for this purpose and am very happy. Now my net connects automatically at plugin, very unlike windows, wherein I have to either run a batchfile with rasdial command, if the drivers are loaded, or use the photon dialer.
Well, this documentation is very crude and as I am writing it after a week of fixing my connection, so it might not be up to te mark. Also it is meant for my device only. For others, you might have to change the vendor/product ids and device names (ttyUSB0)… But all in all the total process is:
1. Switch the mode to identify your usb modem as a modem and not a storage device. This is the only major issue.
2. Connect.
3. Njoi!




xubuntu: wine colors, themes


Okay, so someone did a great job. And I respect him for that. But it required a few minor tweaks, esp. for xfce/xubuntu. So I did that. Primarily because I got this error:

desktop_color = format_hex_color(c.get_value(‘/desktop/gnome/background/primary_color’))

glib.GError: Failed to contact configuration server; the most common cause is a missing or misconfigured D-Bus session bus daemon. See http://projects.gnome.org/gconf/ for information. (Details –  1: Failed to get connection to session: Error connecting: Connection refused)

The edited version can be found at: http://gist.github.com/901214

Linux Commandline hacked!!

The site is simply superb.

and it gets better,

I mean, well being sort of a linux geek, I knew some of them. But, this shit was truly amazing. My personal cuties:
^search^replace (in the last command)
sudo !! (last command with sudo)
!search:p (check command history, but avoid running it (through :p))
:w !sudo tee % (vim – save a read only file as sudo)
echo “ls -l” | at midnight (as an alternative to cron :D)

and do not miss the icing :),
curl -u user:pass -d status=”Tweeting from the shell” http://twitter.com/statuses/update.xml

Finally I can talk to ubuntu

Yes, finally. finally finally finally.
Finally my internal mic works on my laptop (acer5520).

After pouring all my brains out on what the problem or fix could be, I finally resorted to installing the latest alsa drivers (1.0.19) from source and voila! Now I do not know if its the version difference or installing from source, which caused the miracle, (and neither do i care to know) the important thing is that it works. And so does my skype. Its a bit noisy thgouh and I have to tweak my volume levels.

The point to never forget is that now I don’t have to boot back to windows, ever :D. Well, I may use xp on virtualbox, specially for preparing the resume (Oh resume! why aren’t thou in sexy latex?) after the sweet mishap of losing my job, I can easily delete my grub entry and eventually the win partition (a big :D).

mpd (music player daemon/musicpd) and icecast2


remember, no other audio output is required if your icecast server is running. the alsa output used in the link is just for fallback. if you do not want any output (audio) on the server itself, use only the shout output.

now, as it happened with me, may be you will encounter an error saying no audio device specified while playing music (i got this error with gmpc). if that’s the case, use mpc (cmd: mpc play).

depending on the buffer limit, the delay between the server and client might be upto 15 secs.

also, if you get “The file you requested could not be found” page on opening any streams, its true. you have fucked up somewhere, for instance, not keeping the user in the audio_output configuration as “source”, but “admin”, which was my admin user for icecast server :D.


Original link: http://debaday.debian.net/2008/11/09/apt-p2p-peer-to-peer-downloading-of-debian-packages/

Is faster at downloading from mirrors.
Uses much less memory and a little less CPU.
Can download almost all files (source files, Packages.bz2, etc…) from peers, not just .deb packages.
Works with only the information apt has, no need for other files.
Doesn’t require a new apt transport for communicating with apt.
Is more modular and easier to understand as it is based on existing technologies (e.g. twisted).

Netbeans 6.1 and Java jdk6 (jdk 1.6)

If you are as unlucky as me you will find that if you try to use netbeans with jdk 6, you will be thrown a greyed blank window. Now, this happened to me in solaris but it does not necessarily depend upos the os.
The solution is:
export AWT_TOOLKIT=MToolkit

or you can create an executable with the following line: “AWT_TOOLKIT=MToolkit netbeans”, and use this executable to start netbeans.