Several years ago I worked a bit on a simple login panel which didn't use X11 directly; instead I tried to structure it in a modular fashion. The only useful module that I implemented used SDL to open a window. It's unfinished, but seems to work for basic login. My goal was to, eventually, draw a beautiful scene using OpenGL (which today may be easier than ever: see http://shadertoy.com/) to use for login.
It was inspired by SLiM, which was inspired by loginpanel.app (we're going in circles here, aren't we!). It was written before I discovered the beauty of Objective-C, so it's written in C++. http://sourceforge.net/projects/gldm/ I don't claim it's a beauty (in fact, I haven't looked at the code in quite a long time, and it's almost certainly a big mess) nor that it is easy to understand, but 'gldm.cpp' may be of interest. On Mon Dec 16 2013 at 2:54:37 PM, Moon Elf <[email protected]> wrote: > On 2013-05-22, Sebastian Reitenbach <[email protected]> wrote: > > Hi, > > > > working with Riccardo on GAPs loginpanel, made some progress, but ran > into trouble now. > > > > What I do is starting the X Server, before I then start the loginpanel > application. > > Then the loginpanel actually has an X server running, where it can > connect to. > > > > So far, that works well. I can login. When I logout, then I am killing > the X server, and > > want to restart it, and spawn the loginpanel again. > > > > First I tried in loginpanels main function: > > > > while (1) > > { > > [XManager startXServer]; > > putenv("DISPLAY=:0.0"); > > > > NSApplicationMain(argc, argv); > > > > } > > > > > > That probably was too naive from me thinking it might work ;) Reading up > NSApplication > > documentation, I see that everything after NSApplicationMain(argc, > argv); will not be > > exectuted, so the while loop will only runs once :( > > > > Anyways, then I tried to start the XServer again, after I teared it down. > > That works so far, but when the loginpanel wants to reset its window on > the X server, > > I see it crying on the console, that the connection to the XServer broke: > > > > X connection to :0.0 broken (explicit kill or server shutdown) > > > > Even if there is a new server spawned already on the same display. > > > > Is there a way to tell the application that the X Server disappeared, > and it > > should reconnect to the new one? Or tell it to kind of respawn itself? > > > > cheers, > > Sebastian > > > > > I think you better use the C interface to X, I've written a small > self-managed > window app which displays on an X server, the code is here : > http://sf.net/projects/jackassbotchx/ > > You can also try to read the Xlib programming manual. > > Then, when using while (1) { /**/ } try to use an interrupt such as an > XEvent > (see my tarballed code above) or custom items. > > ME > > -- > Member of the DR rogue circle. > Search and you will find. > _______________________________________________ > Discuss-gnustep mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/discuss-gnustep >
_______________________________________________ Discuss-gnustep mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnustep
