Commands added on startup not running

Try wrap it in sh -c " "

how to do ,
i dont know how to make bash script file

sh -c "sleep 5s && pactl set-default-sink alsa_output.pci-0000_00_14.2.analog-stereo && pactl -- set-sink-volume 0 80% && paplay /home/milesdredd/Downloads/FROM\ FIREFOX/tune/robo.wav && pactl -- set-sink-volume 0 60%"
2 Likes

not working ,
also different audio device is selected

after running this commend , system should select "speaker-built-in audio"
but its not happening
at the boot its still selected as default to "analog output " which is not running

Was that not
/bin/bash -c
?

1 Like

sorry,?? i didn't get

just i copied ur given command to startup:-

I was talking about start up script.
I checked this script I wrote a while ago and compared it with Storm's script.

1 Like

You don't need to make a script file if you wrapped in sh -c " ". Just fill out in between.

Ah, I see.
Thanks for the explanation.

I now remembered what I did.

I made a separate python script and call it from the startup since I thought it was easier to edit this scrip for fine adjustments rather than touching the startup statement every time I wanted to make a change.

Paplay is known to barely work.

Recommend that you use canberra-gtk-play.
From your start up, you can put the command /usr/bin/canberra-gtk-play --id="desktop-login" --description="startup login" You can add the sound file to your system sounds directory.
(I had to look up the directory)
/usr/share/sounds/zorin/stereo

1 Like

any sound will work if selected device will work fine ,
here, at every boot , selected audio device is not working

to play any song or any media , i have to select "speaker" manually

Well, the above will get startup sound to work.

Getting Sounds to work with the Systemd modules mess of Alsa and Pulseaudio is a whole 'nother matter.
I usually pass that buck to Zaba or Swarf. :stuck_out_tongue:

ok, how to change default selected audio device?

For me, "settings" -> "sound" and select the output device.
It will stick as a default in my setup.

1 Like

No , its not working

And i think the set of command i added in startup are working , but my default selected audio output device is not working i cant able to hear the sound , how to change ? Default audio devices

Is this helpful?

1 Like

no,i have already used this,

but its not changing selected device on startup

and when i run this commad on terminal it works

1 Like

i got solution somehow,
now my speaker is working fine at startup
i dont know what workes for me , everything working fine as i wanted :heavy_heart_exclamation:
thanks to all

1 Like

That is PulseAudio in a nutshell. :expressionless:

2 Likes

Another coffee choking alert :coffee: :rofl:

3 Likes