ohmkara 1.0

a technical blog.

Archive for the ‘linux’ Category

FVWM, making laptop multimedia (sound) keys work

leave a comment »

I was giving fvwm a spin on my laptop. Of late I have grown to like fvwm.

Problem statement: Making volume / multimedia keys of the laptop work in fvwm

Well the following two pages documents how it is to be done —

1. Figuring out the key-codes for your multimedia / sound keys and including these in your .Xmodmap : howto-link

2. Map these keys to alsa-mixer commands in your .fvwm2rc: howto-link (post: Audio buttons)

Written by deepak

May 4, 2010 at 11:15 pm

Posted in free lunch, linux

Tagged with ,

fvwm + xscreensaver

leave a comment »

For xscreensaver to work, a daemon process has to be running in the background. I load it up with the following line in my ~/.xinitrc

xscreensaver -no-splash &

Written by deepak

April 15, 2010 at 8:55 pm

Posted in linux, my notes

linux screen resolution

leave a comment »

I have just started using FVWm2 @ home but everytime I login, X was going into weird screen resolutions — the solution is available here: @Ubuntu wiki

The following works — adding

xrandr -s 1152×864

to your ~/.xprofile file (ya, I know, wierd resolution — more on that in another post, if ever)

Written by deepak

April 15, 2010 at 8:49 pm

Posted in linux, my notes

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

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