LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 05-07-2022, 01:30 AM   #1
kaza
Member
 
Registered: Apr 2010
Distribution: FC17
Posts: 343

Rep: Reputation: 2
Fedora 35+KDE, autostart: can't "pw-play" WAV file, from terminal - OK.


Hello!

After installing Fedora 35 I attempted to add in the "autostart" actions
the command "pw-play /path_to_file/startup_sound.wav" but for some reason, it doesn't
play at startup. If I issue the same command in a konsole - it plays OK.

What's the difference between using "pw-play" as autostart program to run
and using it in a normal command line way?

TIA!
 
Old 05-07-2022, 08:12 AM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
until you get a better reply, autoplay sound for me works in IceWM on debian, without a sleep as I use alsa only

please post the full contents of your autostart file.

Leaping ahead....you may need a sleep command if you pulseaudio is involved in setting up your sound.

If you have some kind of if-then needing bash, change sh to bash, but I do not use KDE so not sure what format you need

also aplay is capable of wav playbacks so try that, it might be that simple?


eg
Quote:
!#/bin/sh
SNIP

/bin/sleep 5 &
aplay /home/myname/mp3/samples/sample.wav &

SNIP

Last edited by aus9; 05-07-2022 at 08:16 AM.
 
Old 05-07-2022, 01:15 PM   #3
kaza
Member
 
Registered: Apr 2010
Distribution: FC17
Posts: 343

Original Poster
Rep: Reputation: 2
Hi aus9, thanks for the reply.

I changed "pw-play" to "aplay", with or without "sleep 5" - same thing.

Here're the contents of that particular autostart file:

Code:
<fedora>.../autostart>pwd
/home/user/.config/autostart
<fedora>.../autostart>cat aplay.desktop
[Desktop Entry]
Comment[en_US]=
Comment=
Exec=sleep 5; /usr/bin/aplay /home/user/sounds/jet8.wav
GenericName[en_US]=
GenericName=
Icon=
MimeType=
Name[en_US]=pw-play
Name=pw-play
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=
TIA,
kaza.
 
Old 05-07-2022, 01:35 PM   #4
kaza
Member
 
Registered: Apr 2010
Distribution: FC17
Posts: 343

Original Poster
Rep: Reputation: 2
Just tried with sleep 10 - same result.

While reading about similar problems, someone noticed that his KDE speaker icon came "muted" and after few seconds became "unmuted".
After reading this I re-booted while looked at the speaker icon - on my KDE too, it first came "muted" and after 1-2 seconds became "unmuted".

So, here's some more info for those who understand (me not among them, at least now).

TIA,
kaza.
 
Old 05-08-2022, 01:26 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Please delete all empty entries from your .desktop file.
Not sure it matters, but I've never seen it like that, and it's pointless.
Also I'm not sure you can put shell commands in your Exec line like that; better create a mini script and Exec that.
 
Old 05-11-2022, 11:55 AM   #6
kaza
Member
 
Registered: Apr 2010
Distribution: FC17
Posts: 343

Original Poster
Rep: Reputation: 2
Solved!

If the "sleep" and "aplay" commands will become a shell command with an argument of starting a command
then this command can contain the two parts of "sleep" and "aplay". Currently the "sleep" is 15 seconds
and the sound appears about 2-3 seconds after the speaker icon changes from "mute" to "normal",
which means: F35+KDW+Xwayland takes about 12-13 seconds to start everything and to enable the sound.

Thanks for all the replies!
 
Old 05-11-2022, 07:40 PM   #7
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
well you may be happy, but maybe you should try a different desktop?

if you choose something non-KDE you will not have Phonon possible interference

try Xfce if you have not yet tried it.


Sheesh 15 seconds
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to convert Ogg Vorbis .WAV file to normal .WAV file? *Dark Dragon* Linux - Software 8 11-16-2014 12:45 PM
ALSA: appls play .wav well, but play .mp3 disastrously. stf92 Slackware 2 09-26-2011 10:30 PM
KDE 4 Autostart Program Bash Script to Write Autostart Bash Scripts for You! jdmcdaniel3 SUSE / openSUSE 1 05-03-2010 06:17 AM
tomboy autostart in xfce, though not on autostart list zlya Linux - Desktop 2 11-10-2009 10:49 AM
Windoze .wav vs. Linux .wav Raskall Linux - General 6 01-15-2003 06:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 05:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration