Xenodm

xenodm

xenodm is the fork on OpenBSD of xdm. It provides a nice interface and a customizable greeter for xorg session.
xenodm is installed directly on installation/upgrade as part of xorg (xenocara) and could be upgraded
or reinstalled via sysupgrade or ports. It is a really nice, minimalistic, login/session manager and it is fully
configurable. To start xorg at boot, the user should perform:

$ doas rcctl enable xenodm

and to launch it:

$ doas rcctl restart xenodm

if no errors showed up, you're ready to go with the standard OpenBSD (tested on 7.3) login greeter.

The case.

This article was created with the intent of provide an easy way to choose a video output at boot for
xenodm. The test case was set up on an ASUSTeK COMPUTER INC. Q87T motherboard with integrated Intel graphics:
Intel Corporation 4th Generation Core Processor Family Integrated Graphics Controller (rev. 06)
which provide two video output:
eDP-1
HDMI-2
this system is fitted with an Intel Core i3 (socket 1150) 3 GHz CPU and 4 GB DDR3 SODDIM RAM.
The OS is OpenBSD 7.3 (upgraded from 7.2). The machine is working as firewall/router and
asterisk server connecting the home LAN to a CISCO 887VA modem. Initially xorg choose HDMI-2
as primary output even after the upgrade to 7.2, until some time ago when, after a reboot,
it choose eDP-1 leaving the 1680x1050 lcd monitor connected to HDMI-2 as secondary display.
To choose a video output without add or modify the xorg configuration files, it is suffice
to instruct xenodm to execute xrandr at startup. Based on original /etc/X11/xenodm/Xsetup_0 file
we can modify as follows:

Attach:Xsetup_0