On Sat, 17 Jul 2021 15:04:16 +0000, MrSpud_Ccq3_3_r wrote:
> On Fri, 16 Jul 2021 15:33:23 -0000 (UTC)
> Lew Pitcher <
lew.p...@digitalfreehold.ca> wrote:
>>On Fri, 16 Jul 2021 09:33:11 +0000, MrSpud_8nnwe wrote:
>>
>>> On Thu, 15 Jul 2021 14:59:08 -0000 (UTC)
>>> Lew Pitcher <
lew.p...@digitalfreehold.ca> wrote:
>>>>I quickly found that Xlib alone wasn't conducive to effective programming; I
>>>>need
>>>>a widget set or toolkit. But, I haven't abandoned Xlib; I'm simply putting
>>>>together,
>>>>from scratch, the sort of widgets I need to make things work.
>>>
>>> It depends how much you want your WM to do.
>>
>>Sorry, but I must make a correction here: I have no interest (at this time)
>>in writing a Window Manager (WM) client for X11. The O'Reilly X11 Xlib book
>>discusses WMs in detail, and includes the code for a rudementary WM implemented
>>
>>in Xlib.
>>
>>My interest lies elsewhere: specifically, in writing a Display Manager (DM)
>>client for X11 in Xlib. A DM provides "a graphical login manager which starts
>>a login session on an X server from the same or another computer." For this,
>>I can find no basic example, nor any reasonably complete and simple "howto",
>>so it gives me a reasonable challenge to learn X11 Xlib programming with.
>
> I should imagine most display managers are little more than a window that
> accepts password credentials which does credential checking and if ok simply
> exec's the required WM or enviroment.
Not really. To satisfy a purely local login, you need a minimum of two input
edit fields: a Username that echoes typed characters and a password that doesn't.
If you add XDMCP into the mix (which I intend to do), you need an additional
field that allows you to pick the host to connect to from a list of eligible
hostnames. These three fields may require just one window, but more likely
require more. In my experimentation, I have 7 windows just to handle this
(a window for the Hostname, a window for the ScrollUp button, a window for
the ScrollDown button, a window to frame the ScrollUp/Hostname/ScrollDown
set, a window for the Username, a window for the Password, and a window to
frame the whole set).
Add to this a window for a localtime clock, a window for a terminal identification,
and a window for a DM identifier, and all the miscellaneous windows
needed to frame these presentation windows, and you have quite a number
of windows to manage.
Then, of course, there's the actual activities that the windows themselves
present. I have a clock, so I must format and present the time and date.
I have two text inputs, so I must write text editing code. I have a scrollable
selection window, so I must write logic to update the selection, and to handle
the ScrollUp and ScrollDown buttons.
And, then there's other, non-window logic, such as the logic to start the X
server (if necessary), the logic to validate usernames and passwords (both
locally and remotely), and the logic to start the user's WM of choice.
All in all, this project will teach me a great deal about writing X11 Xlib
application code, and about X11 in general. And that's the primary goal.
>>for one of the heritage toolkits (Athena, Motif, etc.) and have a very, shall
>>we
>>say, "antique" UI, or for one of the few modern toolkits that offer C
>>bindings,
>
> Personally I'd go for Motif if you can still find libraries that'll work on
> modern systems.
Pish, tush.
I have, at my fingertips, the Athena widget set (both Xaw and Xaw3d), and Motif,
supplied as part of the Slackware Linux distribution I work in. I also have GTK+,
GTK+2, and GTK+3. Also QT and FLTK, should I want to work in C++.