ohmkara 1.0

a technical blog.

Archive for January 2010

how long did it take?

leave a comment »

How to measure how long it took to run a command — to benchmark etc. in linux / unix etc.

…]$ time command

Online man-page

Written by deepak

January 26, 2010 at 9:07 am

Posted in linux, my notes, tools

Tagged with

wireless ad-hoc network

leave a comment »

Try with static IP setting if you are un-able to logon to a wireless ad-hoc network. IP setting over DHCP did not work whenever I tried…. Maybe I am trying wrong.

Thanks to my roomie for this gyaan.

Written by deepak

January 26, 2010 at 8:59 am

Posted in my notes

Tagged with

split / join files in linux

leave a comment »

I was looking for a way to split and join files in linux.

“split” command splits — online man

“join” command joins — online man

Another way to join files is (say join two files file1, file2 to a combinedfile)

cat file1 file2 > combinedfile

You can specify sizes. Ex. If you want to split a bigfile (of size 820Mb) to an 700Mb file and the rest

the following ‘may’ work

split -b 734003200  bigfile

And so on see the manpage

Written by deepak

January 26, 2010 at 8:53 am

Posted in linux, my notes, tools

Tagged with

linux — display off / prevent display off

leave a comment »

I keep my laptop on most of (all) the time. To turn the display off when I sleep etc. I have the following alias in my ~/.bashrc

alias doff=’sleep 5; xset dpms force off’

doff command then gives me enough time to ctrl+alt+L before the display switches off.

To prevent turning off the display / screen blanking etc. while the system is idle and I am thinking / watching movies etc. I have the following alias

alias don=’xset -dpms; xset s off’

I did not invent these by any means, to know more — link

Written by deepak

January 3, 2010 at 7:03 am

Posted in linux

Tagged with , , ,

enqueue file(s) in audacious (and other linux media players)

with 2 comments

Problem statement: I “NEED” the feature — right click on the media file (say .mp3) and have a “enqueue in player-x” option / functionality

Solution: The following was tried out in audacious2 but I think that this would work for others like xmms beep etc.

Hope the following description is clear enough. Basically we are changing program-file association, this could be done in multiple places, following is one method.

Right click on any mp3 file and select “Properties”

Select the “Open With” (Tab)

Click “Add” (Button)

Click on “Use a custom command”

Enter the following text in the field — “audacious2 -e” (without the quote)

-e option exists for other media players (or some equivalent option / flag) with that change this process could work for other players as well, But I have only tested with audacious2.

I have deleted every other player listed in the above mentioned “Open With” (for mp3, flac etc.) only two was left — the default option is audacious2 (without the enqueue option) and right click on the media file provides me the audacious2 (with enqueue option).

Thought that I might as well share it because I spend some time to figure out a way to do this. There are some nautilus scripts available to do this, but I thought that this (“my” :P) method might work even in KDE etc. (not tested there though)

Please comment if you have any ideas about better enqueuing methods (I am a noob).

Written by deepak

January 2, 2010 at 6:44 pm

Posted in linux