Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Possible Duplicate:
How can I play a song in the background via my command line?

I used the command setsid mplayer strayheart.mp3 in a terminal, but then I couldn't stop it and I couldn't work on something else with that terminal instance. What I want is to be able to play music in background in the same terminal and get to write some commands while it is playing. Is it possible or not? If yes, how do I do that?

share|improve this question

marked as duplicate by Mik, Alvin Row, devav2, fossfreedom Nov 16 '12 at 21:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

You could use screen. It allows you to to open multiple terminals encapsulated in virtual terminal. After you've installed it (sudo apt-get install screen), you can start it simply with screen. You can start your music and then hold Ctrl and press A and D consecutively to detach the screen. Then you can continue working in the terminal you started screen from. If you want the screen terminal back, just run screen -r. This works only if you have only one screen session open otherwise you have to provide the id of the screen.

You can do a lot more with screen but for starters this information should help you solve your problem.

PS: Consider that the screen session keeps running even if you close the terminal you started it from. Very useful if you want to start long jobs via ssh

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.