Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hey I am trying to create startup and log-off sounds for Ubuntu 13.04. I have two mp3 files. I have sox and was wondering if I could create a .sh file (make it executable) and make it point to play a set .mp3. What I'm trying to do here is basically set up my Linux Box to be a mock up of HAL9000. With "Good morning Dave" and "Daisy... Daisy..." when it logs off. Any help would be appreciated.

share|improve this question

If You just want to have Your .mp3 played after logging in the easiest way is probably to put line like this to You 'Startup Applications' (you can find it in Bash).

mplayer <exact address to Your file - for example: /home/tom/Music/Good.mp3>

But before that You will need to have mplayer installed. To do so type this in the terminal:

sudo apt-get install mplayer

. If You would like to have few .mp3 files played one after another You will probably need to create .sh file with lines similar to this presented before, make it executable and put exact path to this .sh file to 'Sturtup Applications'.

More info about mplayer here: .

I've noticed that with MPlayer You can easily use playlists. To do that just create text file and in every new line paste a path to Your .mp3 file. Example below - let's say it's /home/tom/Music/StartupPlaylist.txt.

/home/tom/Music/EpicMusic/Just Another Epic Track.mp3
/home/tom/Desktop/Sounds of Desktop.mp3

After doing that Your one-line-script should look similar to this below.

mplayer -playlist <exact path to Your playlist file - for example: /home/tom/Music/StartupPlaylist.txt>
share|improve this answer
I actually got it working with sox and a bash executable file. It worked well. – DirtyDenimDan May 10 '13 at 1:10
That's great, Dan - can you provide a link/answer in your original question and mark it as such? I would also like to see an alternative method to doing this. – gravity May 14 '13 at 16:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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