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!