From e237f798315a56134a7b91df508ffc7f217645eb Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Sat, 26 Sep 2020 14:12:01 +0100 Subject: [PATCH] systemd: add SyslogIdentifier for /bin/sh processes These units appear in the journal with the identifier `sh` so set a sensible identifier for them to aid in log readability Signed-off-by: Joe Groocock --- systemd/user/gphoto-ffmpeg@.service | 1 + systemd/user/wallpaper.service | 3 ++- systemd/user/xprofile.service | 1 + systemd/user/xsettingsd.service | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/systemd/user/gphoto-ffmpeg@.service b/systemd/user/gphoto-ffmpeg@.service index 978ff2d..489d67c 100644 --- a/systemd/user/gphoto-ffmpeg@.service +++ b/systemd/user/gphoto-ffmpeg@.service @@ -9,6 +9,7 @@ ExecStop=/bin/kill $MAINPID ExecStop=-/usr/bin/gphoto2 --set-config viewfinder=0 Restart=always RestartSec=5 +SyslogIdentifier=gphoto-ffmpeg Slice=app.slice [Install] diff --git a/systemd/user/wallpaper.service b/systemd/user/wallpaper.service index 6569966..7e5a5ef 100644 --- a/systemd/user/wallpaper.service +++ b/systemd/user/wallpaper.service @@ -6,9 +6,10 @@ After=graphical-session.target [Service] Environment=FEH_OPTIONS="--no-fehbg --no-xinerama" Environment=WALLPAPER=/home/frebib/pictures/lakesidesunrise.jpg -ExecStartPre=feh $FEH_OPTIONS --bg-fill $WALLPAPER +ExecStartPre=/bin/sh -c "exec feh $FEH_OPTIONS --bg-fill $WALLPAPER" ExecStart=/bin/sh -c "xev -root -event randr 2>&1 | while awk -v RS=\\n\\n '{exit;}'; do echo 'Applying wallpaper'; feh $FEH_OPTIONS --bg-fill $WALLPAPER; done" Restart=always +SyslogIdentifier=wallpaper Slice=session.slice [Install] diff --git a/systemd/user/xprofile.service b/systemd/user/xprofile.service index ed26dd9..a39dc72 100644 --- a/systemd/user/xprofile.service +++ b/systemd/user/xprofile.service @@ -7,6 +7,7 @@ After=xorg.target Type=oneshot RemainAfterExit=yes ExecStart=/bin/sh -c '. $XDG_CONFIG_HOME/X11/xprofile; systemctl --user import-environment' +SyslogIdentifier=xprofile Slice=session.slice [Install] diff --git a/systemd/user/xsettingsd.service b/systemd/user/xsettingsd.service index 2ddba04..292e3f1 100644 --- a/systemd/user/xsettingsd.service +++ b/systemd/user/xsettingsd.service @@ -6,6 +6,7 @@ After=xorg.target [Service] ExecStart=/bin/sh -c 'xsettingsd -c $XDG_CONFIG_HOME/xsettingsd/xsettingsd.local' ExecReload=/bin/kill -s HUP $MAINPID +SyslogIdentifier=xsettingsd Restart=always Slice=session.slice