Default X session, please

8 06 2008

Judging from Google it seems like this is quite a common annoyance but nobody really knows how to get around it: If you use KDM as your login manager and temporarily login with a different X session than your default one, KDM will remember this and the next login will use your “previous” session.

That’s a nice feature per se, but annoying if you combine it with auto-login and a heavyweight session type like my dedicated VirtualBox session (more on that another day).

There’s a simple workaround though: Your previous session, is stored in the file ~/.dmrc. Just remove replace (if you remove it, login will fail) the Session option with Session=default in there and make it read-only:

sed -i -e '/\[Desktop\]/I,/\($\|^\[\)/{/^Session=/Is/=.*$/=default/}’ ~/.dmrc
chmod -w ~/.dmrc

From now on you’ll always be logged in with the system default.


Actions

Informations

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>