Skip to content

User services

66 works the same for an unprivileged user as for root. You run the same commands, without sudo, and they act on your own trees and services:

$ 66 -z tree status
$ 66 enable --start dbus
$ 66 status dbus

What has to exist first is a supervision directory for your account, created when you log in and torn down when you log out. That is what this page sets up.

Prompts

# is a root command, $ is a user command. Obarun's base metapackage does not include sudo, so root commands here assume a root shell.

66-userd, the session tracker

Since 66 0.9.1.0, user sessions are handled by 66-userd, a daemon that tracks logins and drives each user's services on the first login and the last logout. It does not use D-Bus for any of it.

boot-user@ and scandir@ are obsolete

The old approach, a boot-user@<user> module on top of a scandir@<user> service, is no longer used and no longer maintained. If you are coming from it, see Migrating from boot-user@ at the bottom of this page.

Set it up

Install and enable the daemon, as root. It pulls seatd in with it:

# pacman -S 66-userd-66serv
# 66 enable --start 66-userd

Wire the PAM module

The daemon is inert until PAM tells it about logins. Add this line at the end of /etc/pam.d/system-login:

-session   optional   pam_userd.so

Without it nothing is tracked, no user services start, and 66-userctl list sessions stays empty on a machine you are obviously logged into.

Remove ConsoleKit

ConsoleKit conflicts with 66-userd: both want to own /run/user/<uid>. If you have it, remove it completely:

# 66 remove consolekit

Then delete any ConsoleKit line left in /etc/pam.d/system-login.

Hand the display over to your services

Your session has to pass DISPLAY and XAUTHORITY to your user services and to D-Bus. Without it, user services and anything D-Bus activates will not find the display.

The 66 package ships /etc/X11/xinit/xinitrc.d/66-env.sh for exactly that:

#!/usr/bin/sh

66 env import DISPLAY XAUTHORITY
dbus-update-activation-environment DISPLAY XAUTHORITY

Your ~/.xinitrc must source the xinitrc.d directory. This block is not optional:

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
  for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

## Select the session to start
jwm

Replace jwm by whatever starts your desktop, startxfce4 for instance.

~/.xsession can stay empty. Display managers normally read and execute /etc/X11/xinit/xinitrc.d/ themselves. If yours does not, add the same block to ~/.xsession.

Run the two commands at compositor startup, with exec_once or whatever your compositor provides:

66 env import XDG_CURRENT_DESKTOP XDG_SESSION_TYPE WAYLAND_DISPLAY
dbus-update-activation-environment XDG_CURRENT_DESKTOP XDG_SESSION_TYPE WAYLAND_DISPLAY

Check that it works

Log out completely and log back in, then:

$ 66-userctl list sessions
ID  UID   USER    SEAT   TTY/DISPLAY  STATE
1   1000  alice   seat0  tty1         online

An empty list on a machine you are logged into almost always means the pam_userd.so line is missing from the login stack.

66-userctl status shows one user or session in detail.

Your own services

Once sessions are tracked, everything behaves as it does for root. Create trees, enable services, put your own frontend files in ~/.66/service:

$ 66 tree create desktop
$ 66 tree enable desktop
$ 66 -t desktop enable pipewire

D-Bus for your session is a plain user service, not an instance:

$ 66 enable --start dbus

See Trees and Everyday commands.

Powering the machine off as a regular user

Add the account to the allow list, as root:

# 66-userctl access allow alice

This writes /etc/66/shutdown.allow. From then on that user can run:

$ 66-userctl poweroff

along with reboot, halt, suspend and hibernate.

Note

If /etc/66/shutdown.allow does not exist at all, there is no restriction. Creating it with a first access allow turns the allow list on, so the accounts you did not add lose the ability to power the machine off.

Migrating from boot-user@

If the machine still carries the old setup, remove it as the regular user. Removing scandir@<user> removes boot-user@<user> with it:

$ 66 remove scandir@alice

Then follow Set it up above. The user D-Bus service also changed: dbus@<user> became a plain dbus user service.

$ 66 remove dbus@alice
$ 66 enable --start dbus

Warning

That restarts D-Bus and your desktop will feel it. Do it from a console, outside your graphical session.

The full upgrade procedure is in the 66 0.9.1.0 announcement.

Package Provides
66-userd-66serv The session tracker service
66-tools The 66-userd and 66-userctl binaries
seatd-66serv The seat manager, pulled in by 66-userd-66serv
dbus-66serv The system and user D-Bus services
lightdm-66serv, lxdm-66serv, sddm-66serv, slim-66serv Display managers

Search for others with:

$ pacman -Ss 66serv