gdm Init

I am using XFCE and decided to make my laptop boot directly to X. So, I installed gdm from SBo and changed the runlevel in /etc/inittab:

# These are the default runlevels in Slackware:
#   0 = halt
#   1 = single user mode
#   2 = unused (but configured the same as runlevel 3)
#   3 = multiuser mode (default Slackware runlevel)
#   4 = X11 with KDM/GDM/XDM (session managers)
#   5 = unused (but configured the same as runlevel 3)
#   6 = reboot

# Default runlevel. (Do not set to 0 or 6)
id:3:initdefault:

After a restart, the machine boots up directly to a graphic log in screen.

I like setting the brightness of my screen to a lower value, which I usually do by adding these two lines to ~/.xinitrc:

#!/bin/sh
#  xinitrc.xfce - modified to work around xfce4session bug
#                 https://bugzilla.xfce.org/show_bug.cgi?id=8841

xgamma -gamma 0.4
xbacklight -set 70

Similarly to the case of KDM, this approach does not work when using GDM either. So, after some searching, the solution I found is adding the above lines to /etc/gdm/Init/Default. I place them below the first two lines of the file, like this:

#!/bin/sh
# Stolen from the debian kdm setup, aren't I sneaky
# Plus a lot of fun stuff added
#  -George

PATH=/usr/bin:$PATH
OLD_IFS=$IFS

xgamma -gamma 0.4
xbacklight -set 70

Log off and the new brightness values are already set at the log in.


2 Comments on “gdm Init”

  1. It is nice to see someone who is not afraid of inittab. The though of editing inittab gives me serious concern.

  2. slackalaxy says:

    it is not that scary


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s