LightDM – How to Use LightDM for User-Defined Sessions

lightdm

If I unterstand it correctly, LightDM has replaced GDM per default. I wonder if it's possible to make it run the things I put in my .xinitrc file … what I need is an option below "Unity" and "Unity 2D" which says "Run a user-defined session".

Is that possible? Should be the easiest thing, but I did not get a clue so far. I export and define and run a lot of things in this file, so it's pretty important for me to have control over that.

What I do NOT want is a custom session in /usr/some/where, I only want it to run the stuff from each user's xinitrc (or similar).

Best Answer

Create a new file /usr/share/xsessions/custom.desktop with:

[Desktop Entry]
Name=Xsession
Exec=/etc/X11/Xsession

You should now have a new session option during login, Xsession will load the user's ~/.xinitrc.