Re: [dev] [dwm] X autologin and startup applications

From: Ethan Grammatikidis <>
Date: Mon, 14 May 2012 03:20:15 +0100

On Sun, 6 May 2012 22:49:17 -0700
Amit Uttamchandani <> wrote:

> So the questions are:
> 1. Is there a better way to accomplish X autologin? Preferrably without
> installing a login manager.

I don't know about "better", sanity in this situation is probably
completely incompatible with any remotely normal unix, but what I've got
is this:

/etc/inittab, one tty changed:

        c1:1235:respawn:/sbin/agetty -nl /bin/login-ethan 38400 tty1

I can't remember exactly why agetty is still there, but I remember
trying to do without it was Not Fun™. I would almost
rather deal with X.

/bin/login-ethan, new script:

        exec /bin/login -f ethan

Yes, that has to be a script, agetty won't pass args to the login
binary. Maybe some other getty would be better here.

/home/ethan/.profile has a little addition at the end:

        if [ ! -e /tmp/.X0-lock ] && (tty | grep -q tty1) ; then

As for maximizing surf, maximizing is a window manager feature. It's
possible the xrandr line you have there is the right thing for dwm, but
I am wondering why you don't run xrandr (and if necessary a short
sleep) before starting dwm.

hash is a shell feature. bash and others cache the path - all the
names - and sometimes when you've installed something since starting
the shell, the shell won't find it. I think it only happens when you've
removed it from one $PATH dir and installed it to another, in bash at
least. Using hash in a just-started shell like the one
running .xinintrc is pointless. :)
Received on Mon May 14 2012 - 04:20:15 CEST

This archive was generated by hypermail 2.3.0 : Mon May 14 2012 - 04:24:08 CEST