summaryrefslogtreecommitdiffstats
path: root/units/user
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--units/user-.slice.d/10-defaults.conf17
-rw-r--r--units/user-runtime-dir@.service.in22
-rw-r--r--units/user.slice13
-rw-r--r--units/user/basic.target14
-rw-r--r--units/user/bluetooth.target13
-rw-r--r--units/user/default.target15
-rw-r--r--units/user/exit.target16
-rw-r--r--units/user/graphical-session-pre.target16
-rw-r--r--units/user/graphical-session.target15
-rw-r--r--units/user/meson.build38
-rw-r--r--units/user/paths.target12
-rw-r--r--units/user/printer.target13
-rw-r--r--units/user/shutdown.target14
-rw-r--r--units/user/smartcard.target13
-rw-r--r--units/user/sockets.target12
-rw-r--r--units/user/sound.target13
-rw-r--r--units/user/systemd-exit.service16
-rw-r--r--units/user/systemd-tmpfiles-clean.service.in21
-rw-r--r--units/user/systemd-tmpfiles-clean.timer19
-rw-r--r--units/user/systemd-tmpfiles-setup.service.in25
-rw-r--r--units/user/timers.target15
-rw-r--r--units/user@.service.in26
22 files changed, 378 insertions, 0 deletions
diff --git a/units/user-.slice.d/10-defaults.conf b/units/user-.slice.d/10-defaults.conf
new file mode 100644
index 0000000..c81a00e
--- /dev/null
+++ b/units/user-.slice.d/10-defaults.conf
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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 Slice of UID %j
+Documentation=man:user@.service(5)
+After=systemd-user-sessions.service
+StopWhenUnneeded=yes
+
+[Slice]
+TasksMax=33%
diff --git a/units/user-runtime-dir@.service.in b/units/user-runtime-dir@.service.in
new file mode 100644
index 0000000..c168b89
--- /dev/null
+++ b/units/user-runtime-dir@.service.in
@@ -0,0 +1,22 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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 Runtime Directory /run/user/%i
+Documentation=man:user@.service(5)
+After=systemd-user-sessions.service dbus.service
+StopWhenUnneeded=yes
+IgnoreOnIsolate=yes
+
+[Service]
+ExecStart=@rootlibexecdir@/systemd-user-runtime-dir start %i
+ExecStop=@rootlibexecdir@/systemd-user-runtime-dir stop %i
+Type=oneshot
+RemainAfterExit=yes
+Slice=user-%i.slice
diff --git a/units/user.slice b/units/user.slice
new file mode 100644
index 0000000..3f2d98f
--- /dev/null
+++ b/units/user.slice
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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 and Session Slice
+Documentation=man:systemd.special(7)
+Before=slices.target
diff --git a/units/user/basic.target b/units/user/basic.target
new file mode 100644
index 0000000..1ae8275
--- /dev/null
+++ b/units/user/basic.target
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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=Basic System
+Documentation=man:systemd.special(7)
+Wants=sockets.target timers.target paths.target
+After=sockets.target timers.target paths.target
diff --git a/units/user/bluetooth.target b/units/user/bluetooth.target
new file mode 100644
index 0000000..62407d3
--- /dev/null
+++ b/units/user/bluetooth.target
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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=Bluetooth
+Documentation=man:systemd.special(7)
+StopWhenUnneeded=yes
diff --git a/units/user/default.target b/units/user/default.target
new file mode 100644
index 0000000..da319ce
--- /dev/null
+++ b/units/user/default.target
@@ -0,0 +1,15 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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=Default
+Documentation=man:systemd.special(7)
+Requires=basic.target
+After=basic.target
+AllowIsolate=yes
diff --git a/units/user/exit.target b/units/user/exit.target
new file mode 100644
index 0000000..11a6f8e
--- /dev/null
+++ b/units/user/exit.target
@@ -0,0 +1,16 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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=Exit the Session
+Documentation=man:systemd.special(7)
+DefaultDependencies=no
+Requires=systemd-exit.service
+After=systemd-exit.service
+AllowIsolate=yes
diff --git a/units/user/graphical-session-pre.target b/units/user/graphical-session-pre.target
new file mode 100644
index 0000000..3adfc5a
--- /dev/null
+++ b/units/user/graphical-session-pre.target
@@ -0,0 +1,16 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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=Session services which should run early before the graphical session is brought up
+Documentation=man:systemd.special(7)
+Requires=basic.target
+Before=graphical-session.target
+RefuseManualStart=yes
+StopWhenUnneeded=yes
diff --git a/units/user/graphical-session.target b/units/user/graphical-session.target
new file mode 100644
index 0000000..a38eaab
--- /dev/null
+++ b/units/user/graphical-session.target
@@ -0,0 +1,15 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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=Current graphical user session
+Documentation=man:systemd.special(7)
+Requires=basic.target
+RefuseManualStart=yes
+StopWhenUnneeded=yes
diff --git a/units/user/meson.build b/units/user/meson.build
new file mode 100644
index 0000000..36341a4
--- /dev/null
+++ b/units/user/meson.build
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: LGPL-2.1+
+
+units = [
+ 'basic.target',
+ 'bluetooth.target',
+ 'default.target',
+ 'exit.target',
+ 'graphical-session-pre.target',
+ 'graphical-session.target',
+ 'paths.target',
+ 'printer.target',
+ 'shutdown.target',
+ 'smartcard.target',
+ 'sockets.target',
+ 'sound.target',
+ 'timers.target',
+ 'systemd-exit.service',
+ 'systemd-tmpfiles-clean.timer',
+]
+
+foreach file : units
+ install_data(file,
+ install_dir : userunitdir)
+endforeach
+
+in_units = [
+ 'systemd-tmpfiles-clean.service',
+ 'systemd-tmpfiles-setup.service',
+]
+
+foreach file : in_units
+ gen = configure_file(
+ input : file + '.in',
+ output : file,
+ configuration : substs)
+ install_data(gen,
+ install_dir : userunitdir)
+endforeach
diff --git a/units/user/paths.target b/units/user/paths.target
new file mode 100644
index 0000000..9b6ed1c
--- /dev/null
+++ b/units/user/paths.target
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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=Paths
+Documentation=man:systemd.special(7)
diff --git a/units/user/printer.target b/units/user/printer.target
new file mode 100644
index 0000000..e1fb0d4
--- /dev/null
+++ b/units/user/printer.target
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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=Printer
+Documentation=man:systemd.special(7)
+StopWhenUnneeded=yes
diff --git a/units/user/shutdown.target b/units/user/shutdown.target
new file mode 100644
index 0000000..d48e6d6
--- /dev/null
+++ b/units/user/shutdown.target
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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=Shutdown
+Documentation=man:systemd.special(7)
+DefaultDependencies=no
+RefuseManualStart=yes
diff --git a/units/user/smartcard.target b/units/user/smartcard.target
new file mode 100644
index 0000000..717ea23
--- /dev/null
+++ b/units/user/smartcard.target
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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=Smart Card
+Documentation=man:systemd.special(7)
+StopWhenUnneeded=yes
diff --git a/units/user/sockets.target b/units/user/sockets.target
new file mode 100644
index 0000000..9af67fd
--- /dev/null
+++ b/units/user/sockets.target
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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=Sockets
+Documentation=man:systemd.special(7)
diff --git a/units/user/sound.target b/units/user/sound.target
new file mode 100644
index 0000000..19afc2a
--- /dev/null
+++ b/units/user/sound.target
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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=Sound Card
+Documentation=man:systemd.special(7)
+StopWhenUnneeded=yes
diff --git a/units/user/systemd-exit.service b/units/user/systemd-exit.service
new file mode 100644
index 0000000..1d3b61e
--- /dev/null
+++ b/units/user/systemd-exit.service
@@ -0,0 +1,16 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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=Exit the Session
+Documentation=man:systemd.special(7)
+DefaultDependencies=no
+Requires=shutdown.target
+After=shutdown.target
+SuccessAction=exit-force
diff --git a/units/user/systemd-tmpfiles-clean.service.in b/units/user/systemd-tmpfiles-clean.service.in
new file mode 100644
index 0000000..9cd1972
--- /dev/null
+++ b/units/user/systemd-tmpfiles-clean.service.in
@@ -0,0 +1,21 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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=Cleanup of User's Temporary Files and Directories
+Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
+DefaultDependencies=no
+Conflicts=shutdown.target
+Before=basic.target shutdown.target
+
+[Service]
+Type=oneshot
+ExecStart=@rootbindir@/systemd-tmpfiles --user --clean
+SuccessExitStatus=65
+IOSchedulingClass=idle
diff --git a/units/user/systemd-tmpfiles-clean.timer b/units/user/systemd-tmpfiles-clean.timer
new file mode 100644
index 0000000..d1dbad9
--- /dev/null
+++ b/units/user/systemd-tmpfiles-clean.timer
@@ -0,0 +1,19 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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=Daily Cleanup of User's Temporary Directories
+Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
+
+[Timer]
+OnStartupSec=5min
+OnUnitActiveSec=1d
+
+[Install]
+WantedBy=timers.target
diff --git a/units/user/systemd-tmpfiles-setup.service.in b/units/user/systemd-tmpfiles-setup.service.in
new file mode 100644
index 0000000..6467dab
--- /dev/null
+++ b/units/user/systemd-tmpfiles-setup.service.in
@@ -0,0 +1,25 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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=Create User's Volatile Files and Directories
+Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
+DefaultDependencies=no
+Conflicts=shutdown.target
+Before=basic.target shutdown.target
+RefuseManualStop=yes
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@rootbindir@/systemd-tmpfiles --user --create --remove --boot
+SuccessExitStatus=65
+
+[Install]
+WantedBy=basic.target
diff --git a/units/user/timers.target b/units/user/timers.target
new file mode 100644
index 0000000..b1aa8c7
--- /dev/null
+++ b/units/user/timers.target
@@ -0,0 +1,15 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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=Timers
+Documentation=man:systemd.special(7)
+
+DefaultDependencies=no
+Conflicts=shutdown.target
diff --git a/units/user@.service.in b/units/user@.service.in
new file mode 100644
index 0000000..ca98c05
--- /dev/null
+++ b/units/user@.service.in
@@ -0,0 +1,26 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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 UID %i
+Documentation=man:user@.service(5)
+After=systemd-user-sessions.service user-runtime-dir@%i.service dbus.service
+Requires=user-runtime-dir@%i.service
+IgnoreOnIsolate=yes
+
+[Service]
+User=%i
+PAMName=systemd-user
+Type=notify
+ExecStart=-@rootlibexecdir@/systemd --user
+Slice=user-%i.slice
+KillMode=mixed
+Delegate=pids memory
+TasksMax=infinity
+TimeoutStopSec=120s