XDMSHELL(8)

πŸ“¦ version 1.1.17, in fedora 43, fedora 44

XDMSHELL(8) πŸ’–

okay bestie, so this is xdmshell from the System Manager's Manual, section 8 β€” yes, the big scary admin section, but don't worry, I got you 🫢


✨ NAME ✨

xdmshell β€” the little shell that starts up xdm for you when you log in πŸŽ€


🌸 SYNOPSIS 🌸

/usr/bin/xdmshell

πŸ’… DESCRIPTION πŸ’…

So Xdmshell is for the girlies running systems that are set up to boot a console in text mode by default, but who still want the X display manager to happen. The trick? You log in as a special user whose shell is literally set to the xdmshell program. That's the whole bit. That's the move. ✨


now here's the messy part and honestly it's giving cursed 😭. A lot of servers set the keyboard to do non-blocking I/O, because they're assuming they're the only program even trying to read from the keyboard. Rude assumption, but okay. The problem is that some versions of getty(8) will immediately see a continuous stream of zero-length reads and be like "oh this is an end-of-file indicator bestie" β€” which it is NOT πŸ’€. And then eventually init(8) just disables logins on that line entirely until somebody types the following as root:

heads up! The original page just says "until somebody types the following as root:" and then… shows nothing. No command. That's it. That's the sentence. We are all just sitting here. πŸ™ˆ (I'm not making one up for you β€” no invented commands on my watch, periodt.)

On some platforms, one alternative is to disable logins on the console and just always run xdm(8) from /etc/inittab. Simple. Iconic. Chef's kiss πŸ‘‘

Another approach β€” and this is the main character one β€” is to set up an account whose shell is the xdmshell program found in the xdm distribution. Now, important: this program is not installed by default, specifically so that site administrators will actually look at it and decide if it meets their needs. Read before you run, bestie, it's the law 🫢

So here's what xdmshell actually does, step by step, no cap:

  1. makes sure it's being run from the appropriate type of terminal 🌈
  2. starts xdm
  3. waits for it to finish
  4. then resets the console if necessary πŸ’«

And if the xdm resources file (the one specified by the DisplayManager*resources entry in the xdm-config file) contains a binding to the abort-display action, something like this:

xlogin*login.translations: #override  Ctrl<Key>R: abort-display()

…then the console can be restored by pressing the indicated key (Control-R in the above example) inside the xdm login window. Slay πŸ’…


The xdmshell program is usually installed setuid to root but executable only by members of a special group β€” and the only member of that group is the account that has xdmshell as its shell. Look at the receipts:

%  grep xdm /etc/passwd
x::101:51:Account for starting up X:/tmp:/usr/bin/xdmshell
%  grep 51 /etc/group
xdmgrp:*:51:
%  ls -lg /usr/bin/xdmshell
-rws--x---   1 root     xdmgrp     20338 Nov  1 01:32 /usr/bin/xdmshell

see how tidy that is? -rws--x--- … the s is right there doing its little setuid moment πŸŽ€

real talk warning: if the xdm resources have not been configured to have a key bound to the abort-display() action, then there will be no way for general users to log in to the console directly. Whether or not that's a desirable thing depends entirely on the particular site. So like… decide on purpose, okay? Don't just vibe into it 😭

πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole page, bestie!! πŸ’–βœ¨πŸŒΈ

This was brought to you by X Version 11, xdm 1.1.17 β€” no date on the footer, so we're just gonna say it's timeless, like all the best things πŸ’œ go forth and log in responsibly πŸ«ΆπŸ‘‘

πŸ“¦ where this page comes from