DH_INSTALLSYSTEMDUSER(1)
β¨ DH_INSTALLSYSTEMDUSER(1) β¨
okay bestie, gather round π this is the dh_installsystemduser page from the Debhelper manual, and it's literally the girl who handles your systemd user unit files. no cap. let's get into it π«Ά
πΈ NAME πΈ
dh_installsystemduser β she installs systemd unit files. that's the whole job description, she's booked and busy π
π SYNOPSIS π
dh_installsystemduser [debhelper options] [--no-enable] [--name=name]
[unit file ...]
π¦ DESCRIPTION π¦
so here's the tea, bestie β dh_installsystemduser goes looking for the systemd user instance service files that a package installed, and then she generates preinst, postinst, and prerm code blocks for enabling, disabling, starting, stopping, and restarting the matching systemd user instance services β for when the package gets installed, updated, or removed. those little snippets get added into the maintainer scripts by dh_installdeb(1). iconic delegation, honestly π
and the way deb-systemd-helper(1) is the one doing the actual enabling and disabling of the systemd units? that means the machine doesn't even have to be running systemd at package installation time β the enabling happens on all machines regardless. so nobody gets left out, it's giving inclusivity π
dh_installsystemduser operates on all user instance unit files installed by a package. but if you only want blocks generated for specific unit files, just pass them as arguments. and if you wanna exclude specific unit files from processing, you use the -X common debhelper(1) option. options on options, she contains multitudes π
π FILES π
debian/package.user.pathdebian/package@.user.pathdebian/package.user.servicedebian/package@.user.servicedebian/package.user.socketdebian/package@.user.socketdebian/package.user.targetdebian/package@.user.targetdebian/package.user.timerdebian/package@.user.timer
if any of those files exist, they get installed into usr/lib/systemd/user/ in the package build directory β and the .user part of the filename gets stripped off on the way in. cute little glow-up, honestly β¨
π OPTIONS π
--name=nameβ install the service file asname.serviceinstead of the default filenamepackage.service. when you use this,dh_installsystemdgoes looking for and installs files nameddebian/package.name.user.serviceinstead of the usualdebian/package.user.service. and on top of that, maintainer scripts are only generated for units that match the given name. specific. focused. main character energy π--no-enableβ disable the service(s) on purge, but do not enable them on install. that's it, that's the option π
π NOTES π
bestie. listen. this command is not idempotent. π
dh_prep(1) should be called between invocations of this command (with the same arguments). otherwise? it may cause multiple instances of the same text to be added to maintainer scripts. yeah. copy-paste city. a mess. don't do it fr fr π
β SEE ALSO β
π AUTHORS π
pkg-systemd-maintainers@lists.alioth.debian.org
okay that's the whole page bestie, you ate that π«Ά this was version 14.5ubuntu1, dated 2026-09-21, straight outta the Debhelper manual β go forth and install your user units, periodt πβ¨
π¦ where this page comes from
- ubuntu stonking: debhelper 14.5ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms