Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

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.

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.

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 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."

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.

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.

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.

Thursday, November 27, 2008

uuid fstab and grub menu.lst

So Finally uuids are there in my config files. They are absically the identifaication of ur partitions irrespective of the detected device points. They look weird but are very useful especially in case u r changing ur hardsisks places in ur cabinet or u have a raid controller sitting and u r not using raid configuration.
So here is the process:

  1. become root
  2. # blkid (will give u the uuid of machine)
  3. /dev/sda1: UUID="2f1b9e84-dc33-4649-bb78-634afb6deb0c" TYPE="ext3"
    /dev/sdb1: UUID="74bef01f-605c-4d29-9e26-928c3dbaf315" TYPE="ext3"


  4. open ur fstab (the original looks like this)
  5. # /etc/fstab: static file system information.
    #
    #

    proc /proc proc defaults 0 0
    /dev/sda1 / ext3 defaults,errors=remount-ro 0 1 errors=remount-ro 0 1
    /dev/sdb1 /home ext3 defaults 0 2
    /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0

  6. replace the /dev things of partions with uuid and remember to comment out lld lines fore referenfe purpose and dont delete them.

  7. here is new fstab

  8. # /etc/fstab: static file system information.
    #
    #

    proc /proc proc defaults 0 0
    #/dev/sda1 / ext3 defaults,errors=remount-ro 0 1
    UUID=2f1b9e84-dc33-4649-bb78-634afb6deb0c / ext3 defaults,errors=remount-ro 0 1
    #/dev/sdb1 /home ext3 defaults 0 2
    UUID=74bef01f-605c-4d29-9e26-928c3dbaf315 /home ext3 defaults 0 2
    /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0


  9. now move ur /boot/grub/menu.lst to /root for backup and on commnad line do #update-grub. here is the new menu.lst


  10. Go for reboot once if u r not using raid controller without raid configuration or 2-3 times reboot in case u r using one.

  11. U can make a backup grub cd/floppy or a live cd will be handy in case of any problems.

Monday, August 4, 2008

bash completion

1) install the package bash_completion and it will unleash the full power of bash completion. Can check out in
$ apt-get install xserver TAB TAB and see.

2) and its time to switch to lighter terminals
try using mrxvt and see the small signature of the process

3) check out package conky for a light weight process/ram/swam/harddisk viewer