Saturday, January 15, 2011

i m moving.

Thanks to the blogspot for supporting me for something like 3 yrs.
I have moved my blog to http://alindsharma.wordpress.com/
So anyone who is interested in following me in my quest for a better user experience of debian, can follow me on the new link. Thanks.

Friday, September 17, 2010

udev problems while upgrading debian lenny to squeeze

If you are upgrading to squeeze from lenny debian, then there are great chances that you will get stuck while the system tries to upgrade udev. There are two ways to deal with the problem
A) install the new kernel using "apt-get install" , boot into it, and then run dist-upgrade
B) "touch /etc/udev/kernel-upgrade" , and then run dist-upgrade
Hope this saves some of your precious time.

Reference : http://forums.debian.net/viewtopic.php?f=10&t=52360

Tuesday, August 10, 2010

packaging python modules

Recently I am becoming more and more involved in building for-fun-modules in python at home. As a result the problem of packaging my modules started to show up on my face. I found a good page which tells about the good practices in python.

http://infinitemonkeycorps.net/docs/pph/

For the time being i have decided on using pep8 and pylint for source confirmity. distutils for packaging and may be pip for managing the packages (iff debian package management system falls short due to some reason).

Tell me if you have some other solution.

Sunday, July 18, 2010

Pulseaudio : The Incredible

The pulseaudio is great. And the greatest thing is that you need not do any config settings in debian for that. Just install it and use it straight-forward. I am using padevchooser as the applet for configurations. Now I can easily add bluetooth headsets and route the audio to them. The blueman applet has pulseaudio plugin. Just enable it.

For using mplayer
alias mplayer='mplayer -ao pulse'

In gmusicbrowser you can do the settings in mplayer advance tab in settings.

And that solves some of the problems with music/videos.

Tuesday, July 13, 2010

Recommended compiler options in gcc

These are the recommended compiler options for catching most of the errors in c/c++ program.

-ansi -pedantic -Wall -W -Wconversion -Wshadow -Wcast-qual -Wwrite-strings

You can alias it with gcc/g++ in your bashrc/zshrc and your life will become a bit cooler ;)

alias g++="g++ -ansi -pedantic -Wall -W -Wconversion -Wshadow -Wcast-qual -Wwrite-strings"

alias gcc="gcc -ansi -pedantic -Wall -W -Wconversion -Wshadow -Wcast-qual -Wwrite-strings"

Ref : http://www.network-theory.co.uk/docs/gccintro/gccintro_32.html

Sunday, June 6, 2010

openbox-crystal

Just to satisfy the "very itch", I am planning to develop some default bindings and configurations for openbox widow manager. People who are intrested in developing the code or contributing on the ideas are most welcome.The source code can be downloaded from the website of openbox-crystal> It will be the home of the development (until further notified) and license will be obviously in GPL.So come on, Give me some sunshine, errr.... gimme some hand.:)

Thursday, March 11, 2010

anyremote : the golden bullet bluetooth remote for computers

Though I already have a remote for my laptop, but this anyremote thing is just awesome. We can use any bluetooth compatible mobiles ( ok, most of the them ) as a remote. I am using ganyremote (gui for anyremote) and blueman (gui for connecting bluetooth devices). So the process is as follows:

# apt-get install ganyremote blueman

Make sure that you can connect your mobile using blueman.

Download the appropriate java client's jar / jad file from http://anyremote.sourceforge.net/dload.html and install it on your mobile. Now start the ganyremote and start its server (can use execute button on the ganyremote applet). And then start anyremote-client on your phone. Then search in anyremote-client for other devices and press connect to connect the computer. Voila ! I was able to control gmusicbrowser from the mobile.
Next aim is to write a config in ganyremot to be able to switch of computer remotely.

Tuesday, March 9, 2010

Colemak layout

Ya I know that this is after a long time. I am sorry as I was busy with some mundane tasks. So here is the news : I have switched my keyboard layout to "colemak". This saves me from RSI and promises to increase my typing speed as well. The speed factor is yet to be verified by me, but the RSI is certainly true. I followed cold turkey approach and it started showing results in 3-4 days. The biggest positive point is remapping Caps key to Backspace key, which itself reduces right pinky movement a lot. In debian it is as easy as these scripts that I am using.

#### file: ~/bin/switch_keyboard_layout_colemak.sh ####
setxkbmap us -variant colemak
xset r 66

#### file: ~/bin/switch_keyboard_layout_qwerty.sh ####
setxkbmap us;
xset -r 66

Reference : http://colemak.com/

Tuesday, December 8, 2009

A new browser based on chromium.

Should check this link. I dont know how much of this is true and how much it is an intrusion in our privacy.

http://www.srware.net/en/software_srware_iron_chrome_vs_iron.php

Besides this if you want to try out a chromium based browser then can download the chromiium iron from the same page. I have not yet tested the browser myself but will certainly do that. It seems that I should read the full agreement before clicking "I Accept".

++EDIT++
A friend of mine sent this link.
http://www.google.com/support/chrome/bin/answer.py?answer=114836&hl=en
So its not a problem anymore, The only thing remains is the default ON options for such things. I thing that while installing chrome, these options should be asked for. And for the iron chromium, they should tell how to disable these options.

Sunday, December 6, 2009

unp : The universal de-compressor

For a person who spends a considerable amount of his time on computers, its really PITA to use different uncompress programs for wide variety of formats like zip, tar, gz etc etc available on the net. So when you download so many packages in so many formats, then just to uncompress them out, you try tar xvzf to find out that Oh! its not a gz archive. I found a better utilty for this purpose which works for almost all the tar/zip formats available. And its available on debian repo.

# aptitude install unp

And use it just like
$ unp x.gz
$ unp x.tar.gz
$ unp x.tgz
$ unp x.zip
$ unp x.bz2

So njoy!

Monday, November 30, 2009

the great Mark

Though this is not about linux/debian or anything like that. But here is the case:

You write a book, put it in GPL and somebody prints it and sells it and makes profit out of it. How will you feel ?

Read out to know how does the writer of dive-into-python thinks. After reading you will feel that the Title of this post is justified.

http://diveintomark.org/archives/2009/10/19/the-point

Wednesday, November 18, 2009

apt-get/aptitude

Many a times we mirror some iso-s of debian and put it on our laptops and/or local LAN to work as a repository. While installing it asks for authenicity of the packages.And we have to press/write 'Yes' all of the time. To get rid of this we can just write the following in /etc/apt/apt.conf

APT::Get::AllowUnauthenticated 1 ;

And please mind the spaces.

Monday, November 9, 2009

gnome-mount

Okay I agree that I dont use gnome/gnome-mount anymore. I have switched to halevt. But yesterday an acquaintance of mine (using gnome) ran into a problem. Her machine was not able to automount the usb thumb disks. I tried my hand for sometime making the normal user a member of some groups. But still it didn't work. Then I tried logging into root and mounting from there. But no fruits. At last I searched on net and found a command line for gnome-mount

$ gnome-mount -v -b -d <device point>

This device point information is available from the command dmesg. So i replaced <device point> with sdb1 and it gave a slight hint that some thing with media directory is creating a problem (dont remember the actual message). So I checked the /etc/fstab file and somebody has created an entry for /media and /media/sdb in fstab. I removed those and everything started fine. So just a piece of advice:
"Documenting the changes your are making to your system on a simple sheet of paper can come handy many-a-times."

Monday, September 21, 2009

nfs-debian-squeeze-portmap-ext4

cryptic topic name?
Ya I know. But I was unable to find a better heading. I wasted my full week in searching for the solution of mounting nfs on the configuration of ext4+squeeze(debian)+nfs4. But was unable to do it. The reason was not obviuos due to my lack of networking knowledge (sorry I am a telecom+elex engg by degree). It was gving some rpc error. Finally i hit the nail. The problem was at the server from portmap as it was only listening to the localhost. I just opened /etc/default/portmap and commented the only uncommented line in it.

#OPTIONS="-i 127.0.0.1"

And just gave a restart to the machine. (I could have restarted portmap but the incidents/failures happened in last 1 week made me go for "the orthodox restart"). And voila everything (ok i agree - nfsmount :( ) started working on the client.
PS: The whole simple process is working fine on debian lenny release.

Wednesday, September 9, 2009

recording desktop using xtv

Recently one of my friend asked me for some way to record his desktop for some purpose. I told him to go for recordmydesktop. But as he is already running some heavy-weight applications , his system became too slow Then I introduced him to vnc (xvncserver) on local and record it on a remote machine. And he was a bit happy but still the memory consumption was quite high.
Then I found xtv which can be installed on debian as

#apt-get install xtv

And then on the machine whose display he want to view: remove -no-listen-tcp so that display can be exported. Then write

$xhost + remote_machine_ip

where remote_machine_ip is the ip where you want to run the recordmydesktop application. and then on the remote machine just run

xtv -d local_machine_ip:0

where local_machine_ip is the ip whose display you eant to record. And check the memory consumtion. This is the best I can get at this moment.

Monday, September 7, 2009

process viewers

From a long time I was dependent on top and gnome-system-monitor for looking for the culprit process and killing them at my whim. Now I found another pair of tools which are better suited for my kind of job (looking for culprit and killing 'em). These can be installed on debian by

#apt-get install htop iotop

The htop gives process view in a bit graphical(can I use this word here) format. Also you can see cpu core wise usage. All the blood-shed is possible here. And the second one i.e. iotop helps in finding the cause of the churning sound coming from harddisk (basically amount for I/O for those few privileged users of flash HD). So enjoy using these tools. Once again I m in love with linux-debian.

And also one more news: debian is moving to time based release system with the delivery of "squeeze" expected in Dec this year.

Wednesday, September 2, 2009

here comes one more display manager

I recently configured "slim" display manager (ya its name itself is silm) on one of my machines. Its works nicely. A light weight manager as compared to other two normally available. The coolest point that I like is that if you want to restart or switch off from there is to give halt/restart command in username field and superuser password in password field. Isn't it nerdy.

Monday, August 10, 2009

iconifying all windows in fvwm

I added these lines in the end of Startup file of fvwm-crystal (~/.fvwm-crystal/preferences/Startup). These iconify all windows except the fvwm and desktop ones. delay is in milli-seconds.

#to iconify all windows except fvwm and the desktop ones
Schedule 10000 All ("*", !"Fvwm*|panel|gdeskcal") Iconify

Tuesday, May 12, 2009

vux - the radio-ish random player

first of all install vux
# apt-get install vux
then become normal user
$ find ~/music_folder/ -type f > ~/.vux/playlist
check wheter the playlist is made or not using
$ less ~/.vux/playlist
Then run
$ vux -x generate
$ vux
and enjoy your songs based on exploration and exploitaion (words from Reinforcement learning). In case some ctl error is coming then
$ vuxctl clean

Reference : http://www.penguin-soft.com/penguin/man/1/vux.html

Tuesday, April 28, 2009

password protect your tar archive

Just today my not-so-close friend asked for my flash-drive. That drive contained some data that i didn't wanted to let him see. So i started searching for a method to password protect my archive of secret files. Following are the commands that worked like a charm for me:

to create password protected archive

tar cfz - my_folder/ | gpg -c -o my_folder.stgz

and to decrypt and decompress the password protected archive

gpg -d my_folder.stgz |tar xfz -

Reference : http://mydebian.blogdns.org/?p=461