Using X in OpenBSD-6.4 and above

OpenBSD used to use X in the usual way. The default install provided the components, the user created their .xinit file and one could easily use startx to work with their preferred environment.

However, as of 6.5, this is no longer the case. For various reasons they have now changed the procedure for using X. Their faq page on X gives a fairly simple explanation but it wasn't clear to me at first.

During installation, you are asked if you want xenodm to startx with a default of no. Assuming you take the default, once you have logged in as your user, it is easily rectified.

First as root or with doas, you will enable the xenodm display manager using rcctl. In the example, we also start it, but that could wait.
doas rcctl enable xenodm
doas rcctl start xenodm

Rather than an .xinitrc files in your home directory, you will name the file .xsession. It will work the same way as an .xinitrc file.

Those are the only changes you should have to make. Some people prefer to use the .xinitrc and just link it to ~/.xsession but it shouldn't be necessary.

Once you have logged in, the window manager specified in your ~/.xsession file will open.

You may dislike the defaults. The two things that made it a bit hard to work with) for me were an xconsole in the lower right that just took up space, and the default coloring, which, to my aging eyes, made it hard to see what I was typing.

The xconsole can just be commented out in /etc/X11/xenodm/Xsetup_0. The default colors are in /etc/X11/Xresouces. For me, I don't much care, I just needed to be able to see what I was doing, so I changed the first xlogin*greetColor from its rgbcode to black. I did the same at xlogin*inpColor.

With those two set to black it was quite easy for me to read. I didn't bother with a hex code I just used the word black and all was well. The reader who wishes to further customize can find things all over the web. I haven't tried any of them. as said on The Good Place, I'm basic.

In OpenBSD-7.1, I didn't have to change the colors, I had no problem reading them, so I didn't change defaults.