In Car WebBook
My old WebBook is on it's last legs, I had to open it up the other day to clean it out and that's when I found out the keyboard was held in place with double sided tape. The tape was quite sticky and the keyboard didn't go back properly afterwards. Apart from that the machine is really a bit underpowered now and generally sits in a corner doing nothing.
Going back a but further, I purchased a Sony car stereo which has a USB connector, great i thought. This means I can put a load of singles on a memory stick and put the player on random and having quite a bit of variety as I have around 2,000 tracks. The problem is that the stereo only sees 512 of them and the shuffle option doesn't really work that well.
So, i decided to use the WebBook minus it's screen and keyboard in the car, with the headphone out connected to the stereo auxilliary in. I messed around a bit with different operating systems, the wireless in any version of WIndows seemed to give me problems and so I decied to install PCLinuxOS once agin but this time use the xfce version. As I had removed the screen, I had to do the initial setup using an external monitor, once installed I set the ssh server to run on boot and then install VNC Server so that I could work on the thing remotely if I wanted.
Once the install had completed, I ran through the wireless network setup and created a connection with a fixed IP of 192.168.1.253, called the WebBook rover as that is the type of car it is going to work in and ensured that the wireless would connect on boot.
The next problem was how would I get the music to start and of course introduce a random play option. At this moment in time, I have'nt even considered adding an external monitor to it but one I'm happy with the way it works I may look into that.
Getting music onto it is the wasy bit, my server at home also runs an ftp server, so I created a media user with the home folder pointing to the directory where I store all my music and on the WebBook I installed one of my favourite command line apps, mirrordir.
With the WebBook now in the car, connected up with a 12v to 19v DC adaptor that I found in a junk pile, I connected to the car via ssh and then ran the following command to copy the music from my server onto the car.
mirrordir -v ftp://username@servername/Music -p password /home/username/Music
I should point out that all my pictures, music and video live in a folder at /mnt/Media on my server, the ftp user account has it's home directory set to /mnt/Media so when you log in you get access only to those files.
The above command copied all my music over which means that not only could I play everything I have but I also have a backup of all my music with me wherever I am. But I only wanted to play the singles folder so my next issue was how do I do that and how to I get the machine to start playing when it's turned on and of course how do I turn it off. The turning off is easy actually, just press the power button and the WebBook goes through a shutdown process so that was that bit sorted.
Now came the media player, Linux has a nice little one called xmms2, this was again installed via command line apt-get install xmms2, once installed I made up a script that runs on startup called runxmms.sh.
Ths contents of the script are shown below:
# Clear the existing playlist
xmms2 clear
# Add all the single including new ones into a playlist
xmms2 add /home/username/Music/Singles/*.mp3
# Shuffle the playlist
xmms2 shuffle
# Start playing
xmms2 play
There's an option in the xfce sessions manager to add programmes on startup so this was added using the command sh runxmms2 and now whenever yo upower on the machine after a few minutes it starts playing the music in that folder randomly. Or it would have done except that of course you have to loing for this to happen.
So having established a vnc connection to the machine, I ran gdmsetup as root and on the security tab, set my user to login automatically after 5 seconds and it now seems to work quite well.
Of course the next bit is working out how to get a remote display which shows the track numer and way of controlling the player remotely.
Once I've figured that bit out I'll add some more info here.






.jpg)





