LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 12-17-2008, 12:17 AM   #1
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,027

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-17-2008 at 12:31 AM.
 
Old 12-17-2008, 12:52 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
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, 01:00 AM   #3
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,027

Original Poster
Rep: Reputation: 69
sleep rox, thanks
 
  


Reply


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 08:26 PM
how do I get XMMS, XMMS-Liveice, and icecast to play together oldweasel Linux - Software 0 04-13-2007 01:38 PM
No sound - xmms or K's CD - I just want to play a CD! chucker8 Linux - Software 10 06-19-2006 03:41 PM
xmms won't play sound trawler Linux - Software 3 10-15-2005 02:14 PM
XMMS won't play any sound chutsu Linux - Software 1 09-12-2004 11:38 AM


All times are GMT -5. The time now is 08:52 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration