Looking for a new way to run a startup script (login sound) with pipewire

Well–I went & did the pipewire change. Overall pleased, seems to work well…but there was one casualty—my Gnome login sound is MIA. Looked around a bit & it looks like a per user systemd startup would be the “best” answer–I’ve tried a couple of ways (looked on youtube & found an answer that will not work with pipewire ( How to enable Startup/Login sound in Arch linux - YouTube ) & went to Arch Wiki to look at other answers… Long story-so far no luck. (I really miss my Star Trek “LOGON COMPLETE” sound) :vulcan_salute: :grinning:

Anyone have experience with systemd per user scripts?
So far this is what I’ve got in my .config/systemd/user

[Unit]
Decription=startup sound

[Service]
ExecStart=~./startupsound.sh

[Install]
WantedBy=default.target

My startup script:

#!/usr/bin/bash

mplayer /home/dean/.sounds/startup-sound.wav

Should be simple, yes??? What the blank am I not getting?

Script works as expected–I’m just not getting how to do the systemd setup.

Why not just add the command to your startup applications? (You don’t even need a script, just the mplayer… command.)

1 Like

Duh… As Usual, I’m overthinking things…Thanks.

Well–it was even easier…I just needed to change the player in my original .desktop
Substituted the pulse-based player for mplayer & it works great.

[Desktop Entry]
Type=Application
Exec=mplayer /home/dean/.sounds/startup-sound.wav
Hidden=false
X-GNOME-Autostart-enabled=true
Name[en_US]=Gnome Login Sound
Name=Gnome Login Sound
Comment[en_US]=Play a sound at login
Comment=Play a sound at login

I’m still interested in systemd scripting–really want to know more about setting that stuff up.

2 Likes