2

I have installed kde4 (via running # pkg_add kde4) on my OpenBSD 6.0 VM and I would like to automatically boot KDM on startup. I have followed the most applicable guide Google found me, but it didn't work. Specifically adding:

kdm_flags=""

if [ "X${kdm_flags}" != X"NO" ]; then
   /usr/local/bin/kdm ${kdm_flags} ;
   echo -n 'kdm '
fi

to my /etc/rc.conf does not cause KDM to start on boot for me. Any ideas? My full /etc/rc.conf (which besides the above modification I have not changed since I installed OpenBSD) file can be found here. If it is relevant running startkde4 starts KDE without a problem. /usr/local/bin/kdm does exist.

  • What does the system do on boot? Does it boot to the console, or something else? – thrig Nov 3 '16 at 14:49
  • Boots to console. – BH2017 Nov 3 '16 at 14:59
  • Did you pick the "enable X11" thing during the install? openbsd.org/faq/faq11.html#ConfigX – thrig Nov 3 '16 at 16:14
  • Can't recall, although if I didn't wouldn't I be unable to start KDE at all? As I have been able to with the startkde4 command. – BH2017 Nov 3 '16 at 16:43
  • My present machdep.allowaperture value in /etc/sysctl.conf is non-zero if that indicates that I did choose an X server. – BH2017 Nov 3 '16 at 16:53
2

Leave /etc/rc.conf as is. It even has a prominent header saying DO NOT EDIT THIS FILE!!, twice. Instead, modify /etc/rc.conf.local. But you don't need to do even that:

Tested on OpenBSD 6.1-stable (amd64) running in a VirtualBox VM (this installs kde4-4.14.3 and enables KDM):

$ doas pkg_add kde4
$ doas rcctl enable kdm
$ doas reboot

KDM will start upon reboot. KDM will start the KDE desktop environment when you log in.

You may also start KDM through doas rcctl start kdm without rebooting.

If you already have xenodm(1) (previously known as xdm) running, stop it and disable it first, before starting KDM:

$ doas rcctl stop xenodm
$ doas rcctl disable xenodm
$ doas rcctl enable kdm

See also rcctl(8).


Regarding /etc/doas.conf (from comments):

This is my /etc/doas.conf on my OpenBSD 6.1-stable system:

permit nopass keepenv root as root
permit persist :trusted

It allows root to use doas without password and without resetting the environment (this line is taken straight out of doas.conf(5)), and it allows members of the group trusted (a special group on my system) to use doas with password.

To grant usage of doas to a single user myuser, I'd probably use something like

permit persist myuser

as a bare minimum, or

permit setenv { -ENV PS1=$DOAS_PS1 SSH_AUTH_SOCK } :wheel 

as suggested by doas.conf(5) (and then add the user to the wheel group).

The persist option allows for passwordless doas invocations during five minutes after a successful doas invocation has been done. This option was added in OpenBSD 6.1.

  • My /etc/doas.conf file is empty. Is there a way to automatically create a basic conf file without knowing its format? I saw the man page man.openbsd.org/doas.conf.5 but honestly it's not that helpful. I created the file with no contents (in case it just needs to exist, regardless of contents) and running doas pkg_add kde4 returns: doas: Operation not permitted. – BH2017 Jun 14 '17 at 9:59
  • 1
    @BrentonHorne See updated answer. – Kusalananda Jun 14 '17 at 10:11
  • This is odd now (with your doas.conf file) doas pkg_add kde4 is returning: doas: syntax error at line 2 and doas: syntax error at line 3. – BH2017 Jun 14 '17 at 10:15
  • 1
    @BrentonHorne Ah, you're still on OpenBSD 6.0? Skip the persist option then. – Kusalananda Jun 14 '17 at 10:15
  • Followed the upgrade guide so I thought it was 6.1, but it could still be at 6.0. – BH2017 Jun 14 '17 at 10:16
1

Hi you can check under OpenBSD specific KDE readme files under:

/usr/local/share/doc/pkg-readmes/

you can find more about KDE OpenBSD related

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.