summaryrefslogtreecommitdiffstats
path: root/units/user
diff options
context:
space:
mode:
Diffstat (limited to 'units/user')
-rw-r--r--units/user/app.slice15
-rw-r--r--units/user/background.slice15
-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.build33
-rw-r--r--units/user/paths.target12
-rw-r--r--units/user/printer.target13
-rw-r--r--units/user/session.slice15
-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.service20
-rw-r--r--units/user/systemd-tmpfiles-clean.service22
-rw-r--r--units/user/systemd-tmpfiles-clean.timer19
-rw-r--r--units/user/systemd-tmpfiles-setup.service25
-rw-r--r--units/user/timers.target15
-rw-r--r--units/user/xdg-desktop-autostart.target14
22 files changed, 359 insertions, 0 deletions
diff --git a/units/user/app.slice b/units/user/app.slice
new file mode 100644
index 0000000..eac5064
--- /dev/null
+++ b/units/user/app.slice
@@ -0,0 +1,15 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# 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 Application Slice
+Documentation=man:systemd.special(7)
+
+[Slice]
+CPUWeight=100
diff --git a/units/user/background.slice b/units/user/background.slice
new file mode 100644
index 0000000..a976775
--- /dev/null
+++ b/units/user/background.slice
@@ -0,0 +1,15 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# 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 Background Tasks Slice
+Documentation=man:systemd.special(7)
+
+[Slice]
+CPUWeight=30
diff --git a/units/user/basic.target b/units/user/basic.target
new file mode 100644
index 0000000..6c79304
--- /dev/null
+++ b/units/user/basic.target
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# 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..8333c23
--- /dev/null
+++ b/units/user/bluetooth.target
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# 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..b182431
--- /dev/null
+++ b/units/user/default.target
@@ -0,0 +1,15 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# 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=Main User Target
+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..ec2dde2
--- /dev/null
+++ b/units/user/exit.target
@@ -0,0 +1,16 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# 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..4b9e3dc
--- /dev/null
+++ b/units/user/graphical-session-pre.target
@@ -0,0 +1,16 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# 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..1f8fafc
--- /dev/null
+++ b/units/user/graphical-session.target
@@ -0,0 +1,15 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# 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..850ac2c
--- /dev/null
+++ b/units/user/meson.build
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+units = [
+ 'app.slice',
+ 'background.slice',
+ 'basic.target',
+ 'bluetooth.target',
+ 'default.target',
+ 'exit.target',
+ 'graphical-session-pre.target',
+ 'graphical-session.target',
+ 'paths.target',
+ 'printer.target',
+ 'session.slice',
+ 'shutdown.target',
+ 'smartcard.target',
+ 'sockets.target',
+ 'sound.target',
+ 'systemd-exit.service',
+ 'systemd-tmpfiles-clean.service',
+ 'systemd-tmpfiles-clean.timer',
+ 'systemd-tmpfiles-setup.service',
+ 'timers.target',
+]
+
+if conf.get('ENABLE_XDG_AUTOSTART') == 1
+ units += 'xdg-desktop-autostart.target'
+endif
+
+foreach file : units
+ install_data(file,
+ install_dir : userunitdir)
+endforeach
diff --git a/units/user/paths.target b/units/user/paths.target
new file mode 100644
index 0000000..1bec148
--- /dev/null
+++ b/units/user/paths.target
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# 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..c695669
--- /dev/null
+++ b/units/user/printer.target
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# 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/session.slice b/units/user/session.slice
new file mode 100644
index 0000000..aa12b7d
--- /dev/null
+++ b/units/user/session.slice
@@ -0,0 +1,15 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# 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 Core Session Slice
+Documentation=man:systemd.special(7)
+
+[Slice]
+CPUWeight=100
diff --git a/units/user/shutdown.target b/units/user/shutdown.target
new file mode 100644
index 0000000..582ae6b
--- /dev/null
+++ b/units/user/shutdown.target
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# 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..0c3fe72
--- /dev/null
+++ b/units/user/smartcard.target
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# 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..c6e20d7
--- /dev/null
+++ b/units/user/sockets.target
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# 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..99e68af
--- /dev/null
+++ b/units/user/sound.target
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# 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..1872525
--- /dev/null
+++ b/units/user/systemd-exit.service
@@ -0,0 +1,20 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# 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
+
+[Service]
+# Place into the root slice to not keep another slice unit alive
+Slice=-.slice
diff --git a/units/user/systemd-tmpfiles-clean.service b/units/user/systemd-tmpfiles-clean.service
new file mode 100644
index 0000000..6a93707
--- /dev/null
+++ b/units/user/systemd-tmpfiles-clean.service
@@ -0,0 +1,22 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# 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=systemd-tmpfiles --user --clean
+SuccessExitStatus=DATAERR
+IOSchedulingClass=idle
+Slice=background.slice
diff --git a/units/user/systemd-tmpfiles-clean.timer b/units/user/systemd-tmpfiles-clean.timer
new file mode 100644
index 0000000..f8f6ef4
--- /dev/null
+++ b/units/user/systemd-tmpfiles-clean.timer
@@ -0,0 +1,19 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# 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 b/units/user/systemd-tmpfiles-setup.service
new file mode 100644
index 0000000..156689e
--- /dev/null
+++ b/units/user/systemd-tmpfiles-setup.service
@@ -0,0 +1,25 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# 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=systemd-tmpfiles --user --create --remove --boot
+SuccessExitStatus=DATAERR
+
+[Install]
+WantedBy=basic.target
diff --git a/units/user/timers.target b/units/user/timers.target
new file mode 100644
index 0000000..99f82e3
--- /dev/null
+++ b/units/user/timers.target
@@ -0,0 +1,15 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# 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/xdg-desktop-autostart.target b/units/user/xdg-desktop-autostart.target
new file mode 100644
index 0000000..1be7c4b
--- /dev/null
+++ b/units/user/xdg-desktop-autostart.target
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# 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=Startup of XDG autostart applications
+Documentation=man:systemd.special(7)
+RefuseManualStart=yes
+StopWhenUnneeded=yes