Skip to content

Instantly share code, notes, and snippets.

@einarjh
Last active November 12, 2020 16:01
Show Gist options
  • Save einarjh/7a66d015c244010200bec685eb94d018 to your computer and use it in GitHub Desktop.
Save einarjh/7a66d015c244010200bec685eb94d018 to your computer and use it in GitHub Desktop.
SystemD user service for launching weechat in a screen on boot
# Save as ~/.config/systemd/user/weechat.service
# Remember that you need to allow background processes to keep running
# even when there are no interactive sessions:
# sudo loginctl enable-linger username
# And then:
# systemctl --user daemon-reload && systemctl --user --now enable weechat.service
[Unit]
Description=weechat session
After=bitlbee.service
[Service]
Type=forking
ExecStart=/usr/bin/screen -U -d -m -s /bin/bash -S weechat -T screen-256color /usr/bin/weechat
Restart=always
[Install]
WantedBy=default.target
@einarjh
Copy link
Author

einarjh commented Oct 7, 2020

irssi variant:

[Unit]
Description=irssi session
After=bitlbee.service

[Service]
Type=forking
ExecStart=/usr/bin/screen -d -m -s /bin/bash -S irssi /usr/bin/irssi -c efnet
Restart=always

[Install]
WantedBy=default.target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment