I tried to autostart a screen session with systemd on Linux Mint 21.1:
Code: Select all
[Unit]
Description=powercontrol service
[Service]
Type=simple
ExecStart=/bin/sh /etc/powercontrol.local
Restart=always
RestartSec=30
User=pathaa
[Install]
WantedBy=network-online.target
Code: Select all
#!/bin/sh
sleep 10
cd /home/pathaa/powercontrol
screen -d -m -c screenconfig
Code: Select all
There is a screen on:
1448..NUC8i3BEK-Server (23.03.2023 12:10:13) (Dead ???)
Remove dead screens with 'screen -wipe'.
1 Socket in /run/screen/S-pathaa.
I dont know what to do to heal it.