# vim: set ft=systemd : [Unit] Description=Run btop on tty1 After=systemd-user-sessions.service Conflicts=getty@tty1.service [Service] RuntimeDirectory=%N LogsDirectory=%N Environment=XDG_CONFIG_HOME=%t Environment=LANG=en_US.UTF-8 # btop *requires* write access to its configuration file, or it won't # even read it. Thus, we copy the file from /etc to /run and tell # btop to use the ephemeral, writable copy. ExecStartPre=-/bin/cp %E/%N/btop.conf %t/%N/btop.conf ExecStartPre=-/bin/ln -s %L/%N/btop.log %t/%N/btop.log ExecStart=/usr/bin/btop StandardInput=tty StandardOutput=tty StandardError=journal+console TTYPath=/dev/tty1 Restart=always CapabilityBoundingSet= ProtectSystem=strict DeviceAllow=/dev/tty1 DevicePolicy=closed ProtectKernelTunables=yes ProtectKernelModules=true ProtectControlGroups=yes NoNewPrivileges=yes [Install] WantedBy=multi-user.target