# My xenodm setup OpenBSD uses the [`xenodm(1)`](https://man.openbsd.org/xenodm) display manager, which is a fork of xdm. Xenodm looks quite ugly by default, and after reading a couple[^1] of[^2] articles[^3] on themeing xenodm I've come up with my own setup. Before we get into the configs, here's what it actually looks like: [](/static/img/xenodm.png) _(The text might be small, click to view the image file)_ Clean and simple. Now that you've seen what it looks like you can close this tab if that's all you came here to see. If you want to see how this is accomplished then continue reading. ## Files xenodm uses multiple files for configuration. It's quite inconvenient, and I was very confused at first I admit. The files we'll have to deal with are: ``` /etc/X11/xenodm/Xresources /etc/X11/xenodm/Xsetup_0 /etc/X11/xenodm/Xsession ``` The last one is for an optional non-cosmetic change that I'll cover later. All these files require root access, so it'd be wise to `doas -s` before continuing on. ## Xresources If you've ever dabbled in trying to rice your Unix-like operating system there's a good change you've come across an [Xresources](https://wikipedia.org/wiki/X_resources) file before. The X window system uses a "resource database" as a 'unified' way to store configuration data. xenodm sources the Xresources file before loading. Using entries in the Xresources file we can configure what the login widget (the place we type our username + password) looks like. First off, I'd like to be able to see my password being entered as I type with little `*` as it so commonly is. ``` xlogin.Login.echoPasswd: true ``` Next I don't want to be 'greeted', and I want the message when I put my password in incorrectly to be `ya dun goofed`: ``` xlogin.Login.fail: ya dun goofed xlogin.Login.greeting: ``` Now I'll configure the dimensions and positioning of the login box: ``` xlogin.Login.height: 200 xlogin.Login.width: 400 xlogin.Login.y: 320 xlogin.Login.frameWidth: 10 xlogin.Login.innerFramesWidth: 0 ``` Add some colour (or lack thereof): ``` xlogin.Login.background: #000000 xlogin.Login.foreground: #eeeeee xlogin.Login.failColor: #b00035 xlogin.Login.inpColor: #000000 xlogin.Login.promptColor: #eeeeee xlogin.Login.hiColor: #000000 xlogin.Login.shdColor: #000000 ``` And finally let's use a nice bitmap font to complete the look: ``` xlogin.Login.face: Dina-11 xlogin.Login.failFace: Dina-11 xlogin.Login.promptFace: Dina-11 ``` Note that last step requires the Dina font to be installed (it does not come with OpenBSD). ## Xsetup_0 Next is the Xsetup file. Why is this called Xsetup_*0*? Because xenodm can be configured to run multiple X display servers, and the main one is 0, hence the 0 (check out `/etc/X11/xenodm/xenodm-config`). This file is fairly simple. It's a shell script that xenodm runs. That's it. Simple as that. Through this script we can run pretty much any program we like. In my case, a simple lemonbar script:
/etc/X11/xenodm/Xsetup_0: