LXDM: the wannabe Login Manager

I love the idea behind LXDM: provide a lightweight, NOT freakingly bloated (in terms of dependencies, == doesn’t pull in half GNOME) Login Manager.
If it only worked properly. Until yesterday night at least.

Besides we all know that LXDM (the LXDE Login Manager) is in its early stage of development (kudos to its devs), it doesn’t mean that XDG specifications don’t deserve proper attention, and implementation.

Until yesterday, in Sabayon land, LXDM wasn’t able to load Desktop Environments correctly, for this reason (lxdm.c): the lxdm_do_login() is in charge of reading user configuration ($HOME/.dmrc or whatever) and fork() the DE loader away.

Little problem: .dmrc is a tiny file inside your home directory that contains the lastly selected DE session. This is a “vital” file for your favourite Login Manager (like LXDM is). For Fluxbox, the file contains something like this:


Telling the login manager to use the session file related to fluxbox, which in turn must translate in reading /usr/share/xsessions/fluxbox.desktop configuration, in particular the Exec= value, which evaluates to /usr/bin/startfluxbox for Fluxbox.
The problem is that to lxdm_get_session_info(), called from inside lxdm_do_login(), is given (always for fluxbox) the string “fluxbox”. So far so good you may think, this is what is read from .dmrc. Nope. Here is the problem.

lxdm_get_session_info() check if char *session ends with “.desktop”, which is not (perhaps the same function is used to parse full .desktop file paths, anyway…). In our case, the “else” branch is evaluated and  “char *exec” doesn’t get set (it remains = NULL). So, the fallback condition at the end of the function kicks in: “if (name && !exec)” and of course, both Fluxbox and E17 DEs are not listed there (yeah, that stuff is hardcoded). Resulting in using “fluxbox” as “char *exec” value. Which is totally wrong, since Fluxbox must be started using (a) the content of its .desktop file in the xsessions dir, (b) “startfluxbox”, otherwise ~/.fluxbox/startup is not executed (among other things).

So, the missing piece here is that, whenever “char *session” is passed as just a “session name”, LXDM should look for a .desktop file inside /usr/share/xsessions and read Exec= and Name= values from there.

This patch made the trick. Go Go LXDM!


About lxnay

the creator of Sabayon Linux, Entropy Package Manager {Eit, Equo, Rigo}, Molecule release media buildsystem, Matter Portage buildbot/tinderbox and only God knows what else...

6 responses to “LXDM: the wannabe Login Manager

  1. Thanks for the patch. I assume the same problem occurs with openbox as well. Any thoughts of notifying gentoo devs ( open a bug or apply it yourself or something ) to include your patch on the lxdm ebuild?

  2. Feel free to do it yourself. Victor and I are the sole maintainers of lxde 😉

  3. Ok cool.
    I also mailed upstream directly (just taken the mails from the AUTHORS file).
    Don’t know if you have a better channel.

  4. i really like slim, it is extremely light, but I will try LXDM chance

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 )

Google+ photo

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

Twitter picture

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

Facebook photo

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


Connecting to %s

hello, twitter

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 583 other followers


%d bloggers like this: