You are not logged in.
So, I have added the audio I want to play at startup at ~/.config/lxsession/LXDE and this is what I have at autostart (~/.config/lxsession/LXDE/autostart):
#@lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
@xscreensaver -no-splash
@xfce4-panel
@volumeicon
@sleep 5 && amixer -D pulse sset Master 30% && paplay ./startup.mp3 &
Even with the script enabled on autostart, the last part of the script "paplay ./startup.mp3" doesn't play the audio
If needed to know, I am using Pipewire and it's services are enabled
Last edited by miguel04685 (2024-10-06 21:11:48)
Offline
1. don't "&&", if any step fails, the chain won't continue - just use ";"
2. you're passing a relative path to paplay - whether or nor startup.mp3 exists depend on the $PWD, try (I guess) "$HOME/startup.mp3"
3. idk about paplay but some players don't like not having an active terminal, don't fork the call - also b/c of the context, have you tried eg. mpg123?
4. "paplay $HOME/startup.mp3" generally works a expected?
Offline
Still doesn't play the audio file.
[miguel@archmiguel ~]$ cat /home/miguel/.config/lxsession/LXDE/autostart
#@lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
@xscreensaver -no-splash
@xfce4-panel
@volumeicon
@sleep 5 ; amixer -D pulse sset Master 40% ; mpg123 $HOME/startup.mp3
[miguel@archmiguel ~]$
Offline
Since https://wiki.archlinux.org/title/LXDE#Autostart makes a point about not trying to fork the commands, I wonder whether shell syntax is supported here at all - what if you wrap that chain in an executable script and seize that opportunity to add a marker of it's invocation?
~/bin/startmeup.sh
#!/bin/sh
touch /tmp/yeahscriptran
sleep 5
amixer -D pulse sset Master 40%
mpg123 $HOME/startup.mp3
chmod +x ~/bin/startmeup.sh
/home/miguel/.config/lxsession/LXDE/autostart
#@lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
@xscreensaver -no-splash
@xfce4-panel
@volumeicon
@/home/miguel/bin/startmeup.sh
Offline
This has just solved my problem. Thank you so much, @seth!
Last edited by miguel04685 (2024-10-06 21:11:19)
Offline