I decided to write my own DE using these instructions here it worked and I can login however I didn't use a panel so I don't have a logout button or a session manager.
I've decided to write my own session manager (instead of using established ones) so I can quit the session and return to the lightdm login screen. I've been reading and get the basic idea of what a session manager is but I don't understand how to actually log out and shutdown.
So how does that option work with a custom session manager? If that's too broad, how—after starting a session with a python script—do I return control to lightdm after shutting down all of my desktop applications, file manager, etc?
And for shutdown how do I properly shutdown a graphical desktop.