mirror of
https://github.com/systemd/systemd.git
synced 2024-11-05 06:52:22 +03:00
3abcb6aced
While most folks will be using the derivative from user-session-units, I'm updating this one to reflect some of the fixes and things to note about user sessions: - cgroup should be set with "%u" - username instead of %I - set dbus path with %U explicitly too - hint to folks that wish to use MEM_CG features in user sessions - allow unit to be enabled for instances with systemctl enable
24 lines
703 B
SYSTEMD
24 lines
703 B
SYSTEMD
# This file is part of systemd.
|
|
#
|
|
# systemd is free software; you can redistribute it and/or modify it
|
|
# under the terms of the GNU Lesser General Public License as published by
|
|
# the Free Software Foundation; either version 2.1 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
[Unit]
|
|
Description=User Manager for %u
|
|
After=systemd-user-sessions.service
|
|
|
|
[Service]
|
|
User=%I
|
|
PAMName=systemd-shared
|
|
# in order to allow MEM_CG features to work, add "memory:/" here
|
|
ControlGroup=%R/user/%u/shared cpu:/
|
|
ControlGroupModify=yes
|
|
Type=notify
|
|
ExecStart=-@rootlibexecdir@/systemd --user
|
|
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%U/dbus/user_bus_socket
|
|
|
|
[Install]
|
|
Alias=user@%i.service
|