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

Sunday, April 5, 2009

converting mp3 tags to lowercase

I have created a small code in python for converting mp3tags. namely artist, album and title to lowercase for uniformity. Anybody want to play with the code can email me.

my website

So i thought of using the website creation utility of goggle and here is the address of my website
http://sites.google.com/site/alindsharma/

All your criticism and suggestions for improving website are most welcome.

Thursday, March 5, 2009

renaming all files in a directory to change spaces to underscores

$find . -depth|rename 's/\ /_/g'

thts why linux is linux

And just off the track: you can calculate time taken by any command using time command. This will tell time taken to rename all the files in the current folder.

$time find . -depth|rename 's/\ /_/g'

comaring md5sum for a directory

Suppose you have a BOOKS directory and you want to backup it and check using md5sum for the integrity of the backup. So first you have to make md5sum of your original BOOKS directory as follows:

$find BOOKS/ -type f -print0 | xargs -0 md5sum > checksum.md5

then you copy checksum.md5 to the directory in which backup BOOKS directory exists. Now run this command to check the integrity

$md5sum -c checksum.md5

or if the files are too many then

$md5sum -c checksum.md5 |grep FAILED

put the errors in a file and use find and replace of any editor to remove ": FAILED" and then againn copy for good files. Repeat the process until everything is alright.

$md5sum -c checksums_backup.md5 |grep FAILED|grep /tmp/x.txt
$for i in `cat /tmp/x.txt`; do echo "$i" ;cp oldDir/$i backupRootDir/$i -v; don
e

And to check that whether a new file is added or som old one is deleted you can always run the diff and comm command.

reference http://info.michael-simons.eu/2008/10/25/recursively-md5sum-all-files-in-a-directory-tree/

Thursday, February 5, 2009

software that I use

c++ -> development of math oriented projects
conky -> lightweight process viewer
fslint -> gui for deleting duplicate and empty dir
fvwm -> lightweight window manager
gdeskcal -> calender for desktop
gmusicbrowser -> music player with functionality rename/delete/move
iceweasel/firefox -> internet browser
kate -> editor with a konsole
leafpad -> lightweight text pad
mercurial - distributed version control system
octave -> scripting lile matlab
pico -> general console based editing
pidgin/gaim -> messenger client
python -> great programming language
workrave -> taking breaks
vux -> random music player
This post will be edited continuously :)

mercurial and git

I am experimenting mercurial and git for distributed version control system. Both are nice. From my point of views the main pros and cons are as follows
mercurial :
pros: single binary
cons: bit slower that git
git :
pros : fast
cons: placed some 130 binaries in my bin

I will keep updating it with increase in my experience with them.
one thing that distributed version control lacks is the ability to restrict someone to work on a particular module. lets see if i can find out some way or is this really a restriction. Surely not for the open source world.

Wednesday, January 7, 2009

transparent conky background in fvwm-crystal+rox-filer


As you can see from the screenshot that I have finally managed to get a transparent conky background. Here is the script in my ~/bin directory
=====filename:conky_background.sh========
x=`sed 's/.*">\(.*\)<.*/\1/' /home/alind/.config/rox.sourceforge.net/ROX-Filer/pb_Default |grep '[.jpg|.png|.bmp]$'`
echo $x
sleep 20
feh --bg-scale $x
=============
And add the following line to .fvwm-crsytal start up file

+ I Test (x /home/alind/bin/conky_background.sh) Exec pidof /home/alind/bin/conky_background.sh || exec /home/alind/bin/conky_background.sh


Only problem is that if u change background during a current session then u have to run once conky_background.sh from command line. Else it will automatically load the new wallpaper during next startup of fvwm. I will try to automate this also. The reasons for non-transparent background of conky was some fighting b/w conky, rox-filer to draw on root-window. This makes them both draw the same pic and what u get is the illusion of transparency.
cheers!

Tuesday, January 6, 2009

enable sudo with root password

# apt-get install sudo (for debian users)
# visudo -f /etc/sudoers (open the file for modifiation)
add the following to the file
Defaults env_reset, rootpw
yourusername ALL=(ALL) ALL

Now you have a working sudo which will ask for root password instead of user password at the time of running sudo.Gives a feel-good feeling of entering super user password before running super user commands.