ohmkara 1.0

a technical blog.

Posts Tagged ‘linux

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 ,

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 , , ,

gdm to kdm login in fedora

with 4 comments

Note: In the following I am talking about fedora in general and fedora 10 in particular.

I did not like the gdm(gnome display manager) login screen. As far as I am aware gdm has limited themability and hence customizability. kdm (KDE display manager) seemed better. The info given in the kdm documentation that about how to migrate to kdm was slightly off the mark (in the specific case of fedora 10, I am not sure about others) and hence this post. If you are looking for a quick way to fix this and move on, then stop reading this  post now and go read the fedora KDE wiki which details multiple ways to make the gdm to kdm transition. If you are not in so much of a hurry, do read on…..

The fedora KDE page says

….The default display manager on Fedora is GDM – The GNOME Display Manager. You can switch this to KDM – The KDE Display Manager….

The fedora KDE page details multiple ways to get the gdm to kdm switch done. One of the easiest and quickest ways (manual fix) is — add / edit lines in /etc/sysconfig/desktop  file to say…



This file is being loaded in the /etc/X11/prefdm (preferred display manager setting)which does the following (code in the prefdm file)

if [ -f /etc/sysconfig/desktop ]; then
        . /etc/sysconfig/desktop
        if [ "$DISPLAYMANAGER" = GNOME ]; then
        elif [ "$DISPLAYMANAGER" = KDE ]; then
        elif [ "$DISPLAYMANAGER" = WDM ]; then
        elif [ "$DISPLAYMANAGER" = XDM ]; then
        elif [ -n "$DISPLAYMANAGER" ]; then

But in my case (I am not sure if it is specific to my installation or more general) there was no /etc/sysconfig/desktop file and sice I was not sure if that file was supposed to do something else too i.e if I add these two lines alone will something else break (i.e if that file is there, is it supposed to contain something else?). I switched to kdm in a different (simple) way (as in lesser editing and lesser time to implement) i.e There is a 3rd way :P. If there is no /etc/sysconfig/desktop file there is a catch-all fallback scheme at the end of the /etc/X11/prefdm script which originally read as follows.

# Fallbacks, in order
exec gdm “$@” >/dev/null 2>&1 </dev/null
exec kdm “$@” >/dev/null 2>&1 </dev/null
exec wdm “$@” >/dev/null 2>&1 </dev/null
exec xdm “$@” >/dev/null 2>&1 </dev/null

Which I changed to….

# Fallbacks, in order
exec kdm “$@” >/dev/null 2>&1 </dev/null
exec gdm “$@” >/dev/null 2>&1 </dev/null
exec wdm “$@” >/dev/null 2>&1 </dev/null
exec xdm “$@” >/dev/null 2>&1 </dev/null

And it worked. Please note this is a fix only if you do not have a /etc/sysconfig/desktop file. If you have that file the fix with the file (manual fix) suggested by the fedora KDE wiki — Link is the way to go.

P.S: Only now am I checking out what the etc/sysconfig/desktop file does. God says here that.

If some of the files listed here are not present in the /etc/sysconfig/ directory, the corresponding program may not be installed….

4.1.5. /etc/sysconfig/desktop

The /etc/sysconfig/desktop file specifies the desktop for new users and the display manager to be run when entering runlevel 5.

Correct values are:

  • DISPLAY=<value>, where <value> is one of the following:
    • GNOME — Selects the GNOME desktop environment.
    • KDE — Selects the KDE desktop environment.
  • DISPLAYMANAGER=<value>, where <value> is one of the following:
    • GDM — Selects the GNOME display manager.
    • KDM — Selects the KDE display manager.
    • XDM — Selects the XFree86 display manager.

For more about the X Window System under Red Hat Enterprise Linux, refer to Chapter 7 The X Window System…..

So you sure can edit /etc/sysconfig/desktop on your own. But if you do that you are locking the new user logins to default to kde.

Anyways hope that was useful…..

Written by deepak

January 11, 2009 at 10:14 am

Posted in linux

Tagged with ,