Wed May 08, 2013 5:46 am

Code: Select all apt-get update && apt-get dist-upgrade

Code: Select all apt-get install openssh-server

Code: Select all modprobe snd_bcm2835 amixer cset numid=3 1

Code: Select all 1:2345:respawn:/sbin/getty --noclear 38400 tty1

Code: Select all #1:2345:respawn:/sbin/getty --noclear 38400 tty1

Code: Select all 1:2345:respawn:/bin/login -f root tty1 </dev/tty1 >/dev/tty1 2>&1

Code: Select all apt-get install moc

Code: Select all apt-get install moc-ffmpeg-plugin

Code: Select all mocp

Code: Select all mocp -x

Code: Select all cd ~/.moc && cp /usr/share/doc/moc/examples/config.example.gz ./ && gunzip config.example.gz && mv config.example config

Code: Select all #!/bin/sh shutdown -h now

Code: Select all #!/bin/sh mocp -x shutdown -h now

Code: Select all chmod +x /root/Shutdown.sh

Code: Select all MusicDir = "root/music" StartInMusicDir = yes ExecCommand10 = "/root/Shutdown.sh"

Code: Select all Keymap = /root/.moc/keymap

Warning!

Code: Select all FATAL_ERROR: Parse error at the end of the config file (need end of line?)!

Code: Select all exec_command10 = ESCAPE

Code: Select all if [ -z "$DISPLAY" ] && [ $(tty) = /dev/tty1 ]; then mocp -S mocp -c -a -p /root/playlist.m3u mocp fi

( May 17th )Here's my humble attempt at getting the Raspberry Pi up and running as a headless internet radio and audio player. I'm fairly new to Linux, some approches may look cumbersome one bit but oh well .....I'm using Moebius Linux ( http://goo.gl/U6HgN Reboot.Out of the box, ssh is enabled by default (Dropbear). But if we want to access the Raspberry Pi via SFTP, we need to install openssh-client or plain simple, remove Dropbear and install openssh-server.Reboot.No need for alsa-utils, as the package is already there.Run the following though:RebootOpen the file /etc/inittab and scroll down to:.. and comment the line this way:... right below this line, add the following one:....is the login username.Save and exit.You may want to install the ffmpeg plugin as well:Launch MOCExit MOCNow, we need a config file for MOC, run the following command:Right, now you can adjust the settings to your liking ( self-explaining really )I'm using this one ( http://goo.gl/a46i5 ) as it acts as if it was a simple USB HID keyboard.First, I want to be able to shutdown the Raspberry Pi using the "esc" key on the remote control.Create a file called "Shutdown.sh" ( without quotes) in /root and enter the following:Let's exit MOC properly first ....Save and exit... thenCreate a file called .profile in /root and add the following line:Save and exit.These are the changes I've made:Now, go to the bottom of MOC's config file and add the following line ( if it isn't there already )Before exiting MOC's config file, add an empty line, otherwise you'll get an error:Save and exit.We need to remap a couple of keys to make it possible to control MOC with the USB IR Remote Control.Go to /root/.moc/ and create a file called "keymap" (without quotes)You may use this one as well ( http://goo.gl/gWpEq This is what I did:Save and exit.Use nano or log in usingorand create a file called ".bash_profile" in /root... and add the following if you want to start a playlist containing several internet radio streams right away on boot ( provided the playlist.m3u file is located in /root )Save and exit.starts MOC's serverclears the playlistadds the file *.m3u in ~/.moc to the playliststarts playing the first entry in the file *.m3ustarts the console player. This is needed in order to be able to use the remote control device.Out of the box, using the TAB key on the remote control allows you to switch from playlist browsing tofilesystem browsing.Granted, the is not the "perfect" or the most "convenient" way but it worksFeel free to comment or make suggestions.Bigger pictures: