2

I'm trying to add a login sound to Raspbian, but I have no idea how to do it. Just so you know, when I mean login sound I mean after you type you user name and password. Anyone got any suggestions.


If it helps, I have a:

Brand: Raspberry Pi

Model: B

Operating System: Raspbian "Wheezy"

Size: 8 Gigabytes

2

If you mean the virtual console login, you could add a command to your .bashrc file to play a sound file. This will be played anytime you login or create a new terminal emulator window.

An example would be mplayer login.ogg &. You'll need a sound from somewhere.

Is there a reason for this, though? Something else may be more fitting.

  • what would the command be and were should I add it – Daniel Jun 3 '13 at 23:14
  • Open .bashrc in your home folder with a text editor and add mplayer /path/to/sound.ogg to the very end (if the file exists. If it didn't already exist, creating a new .bashrc is fine). Remember you need a sound file already. – Torvero Jun 3 '13 at 23:16
  • does it have to be .ogg? I also noticed that "mplayer" doesn't seem to be a real command. – Daniel Jun 3 '13 at 23:22
  • Sorry I'm a bit late! mplayer is not installed on most distros be default. Install it with sudo apt-get install mplayer. Anyway, did you find another solution or use mplayer? If this was how you solved your problem, please mark it as the answer! ;) – Torvero Jun 4 '13 at 18:14
  • Possibly use aplay which is pre installed in raspbian – James Young Apr 28 '17 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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