Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-16-2008, 11:17 PM   #1
Senior Member
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Rep: Reputation: 69
How to play sound file using xmms and then having xmms quit...

I know that the line

xmms /usr/share/sounds/sound.ogg works, it opens xmms and plays the sound. What command line would have it play the sound and then close xmms right after?

I tried

xmms /usr/share/sounds/sound.ogg ; sudo killall xmms

but that doesn't shut xmms down right after the sound.

Last edited by trist007; 12-16-2008 at 11:31 PM.
Old 12-16-2008, 11:52 PM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
You could use ogg123 instead.

You could run xmms in the background, and in the foreground, sleep long enough for the program to run. Then kill it.
The problems is that if a program doesn't return, the next program won't run. So the second part of your oneliner won't be reached. You could maybe use ogginfo to get the playlength of the oggfile and use that to determine how long to sleep.
Old 12-17-2008, 12:00 AM   #3
Senior Member
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Original Poster
Rep: Reputation: 69
sleep rox, thanks


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
No surround sound, mic not working, XMMS wont play (others give sound) Virtuality Linux - Hardware 2 03-26-2012 07:26 PM
how do I get XMMS, XMMS-Liveice, and icecast to play together oldweasel Linux - Software 0 04-13-2007 12:38 PM
No sound - xmms or K's CD - I just want to play a CD! chucker8 Linux - Software 10 06-19-2006 02:41 PM
xmms won't play sound trawler Linux - Software 3 10-15-2005 01:14 PM
XMMS won't play any sound chutsu Linux - Software 1 09-12-2004 10:38 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:24 AM.

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