Testing and Finishing the Installation. Now it's time to give it a try. Change to the SlimServer directory and start the software: "cd /mnt/slimserver" and then "./slimserver.pl --daemon --prefsfile /mnt/slim-data/slimserver.pref --cachedir /mnt/slim-data". The second command tells the LinkStation to run the program called slimserver.pl in daemon mode (i.e., it runs in the background), using /mnt/slim-data/slimserver.pref as the settings file and /mnt/slim-data as the directory for the database cache.
For Windows users, the "./" at the start of the command tells the LinkStation to look for the command in the current directory. Unlike DOS, Linux does not include the current directory in its search path (this is for security reasons). So if you want to run a program in the current directory, and the current directory is not already in the path variable, then you must precede it with "./".
After a delay, you should be back at the command prompt. If you type "ps -A" (which lists all processes currently running on the machine), you should see a slimserver.pl process, as below.
root@LINKSTATION:/mnt/slimserver# ./slimserver.pl --daemon --prefsfile /mnt/slim-data/slimserver.pref root@LINKSTATION:/mnt/slimserver# ps -A PID TTY TIME CMD 1 ? 00:00:04 init 2 ? 00:00:00 keventd 3 ? 00:00:00 ksoftirqd_CPU0 4 ? 00:00:00 kswapd [deleted many lines of output] 360 pts/4 00:00:00 bash 372 ? 00:00:06 slimserver.pl 373 pts/4 00:00:00 ps
Your SqueezeBox should now be able to connect to your LinkStation, so reboot your SqueezeBox (press and hold the power key on the remote), enter its configuration mode, and give it your LinkStation's IP address as the address for the SlimServer. Also make sure you can connect to the SlimServer web interface by entering "http://IP-address-of-your-LinkStation:9000" in your browser. Some web pages will load fairly slowly, because the LinkStation is not a powerhouse (on the other hand, menus on the SqueezeBox should work quickly). If you do not yet have a SqueezeBox, you can test your SlimServer installation using the SoftSqueeze application, a software version of SqueezeBox. It is automatically installed with SlimServer. To access it, click the "SoftSqueeze" link on the home page of the SlimServer web interface and follow the instructions. Alternatively, once you have added some music files to your LinkStation (see the next paragraph), you can try streaming music to your favorite software media player by following the instructions you will find if you click on the "Remote Streaming" link on the home page of the SlimServer web interface.
If all is well, now is a good time to copy some music over to your LinkStation. You can keep your music files anywhere you want on the LinkStation, space permitting. I keep mine in the LinkStation's network share for easy access from anywhere on my network. That way, if I rip a CD on any PC on the network, I can just copy the music files to the LinkStation, and they will be indexed the next time the LinkStation scans the music folder. If you do this too, you will want to enter /mnt/name-of-network-share/name-of-music-directory as your music folder when you configure SlimServer from its web interface.
Once your music is on your LinkStation and you have configured SlimServer with your Music's location, SlimServer will need to scan your music directory to create a database cataloging your music files. SlimServer will automatically scan your music the next time it is started, so you do not need to do anything to make this happen. Just be aware that SlimServer will run very slowly until the scan is complete (and if you have a large music collection, the scan can take a few hours). Sluggish performance during the scan is normal behavior, even on a traditional PC, so don't let it worry you.
One more housekeeping item that may or may not be necessary depending on how you set up your LinkStation. If you used a static IP address, you will need to tell your LinkStation the IP address of your ISP's DNS in order for Internet radio and RSS to work (the DNS, domain name server, is the computer that takes a domain name such as yahoo.com and tells your PC its IP address; the reason you must add this information manually is that the LinkStation web configuration pages do not ask for this information). You will need to telnet into your LinkStation and use vi to create a file called /etc/resolv.conf: "vi /etc/resolv.conf". The contents of the file should be as below, but substitute your ISP's DNS addresses with those below.
nameserver 126.96.36.199 nameserver 188.8.131.52
Now you can test Internet radio on your SqueezeBox (or SoftSqueeze) and make sure it works. If it does not work, check the Default Gateway Address in the LinkStation's IP Address Settings web configuration page. For a typical home network, you should enter the IP address of the router attached to your cable or DSL modem (usually 192.168.1.1 or 192.168.0.1).
Running SlimServer each time the LinkStation boots. You are just about there. The only task remaining is to make sure the SlimServer starts up every time you reboot the LinkStation. This step is not absolutely required, but it is a good idea because it will save you the hassle of having to start SlimServer manually (via telnet) after each reboot. To do this, you need to install a startup script in the /etc/rc.d/rc2.d directory on the LinkStation. Actually, you should install the script in your /mnt/slim-data directory (for the reasons I mentioned above in the discussion of why I chose to put files in /mnt) and create a link from /etc/rc.d/rc2.d to your script.
Why do you place the link in /etc/rc.d/rc2.d? Because the LinkStation will run the scripts found in this directory on startup. Startup scripts need to begin with S and a number. S indicates that the file is a startup script, and the number determines the order in which the scripts are run. You can call the link to your script S95slimserver (I will give you more instructions below). There are a number of tutorials on the web detailing the Linux startup process, if you're interested in learning more.
I use the startup script that's here: http://fieldnetworks.com/slim/start-slim.sh. It is, admittedly, a bit of a hack in that it does not provide nearly all the functionality of a typical Linux startup script (namely, it does not have facilities to stop, restart, or provide the status of the slimserver.pl process). On the other hand, it is very simple and does meet my only requirement: it starts the SlimServer software. (For those familiar with Linux, the startup script provided with the RPM version of SlimServer will not work on the LinkStation). You can download my script (or create your own), copy it to your LinkStation network share from your PC, and then telnet into your LinkStation and move the file to /mnt/slim-data: "mv /mnt/name-of-network-share/start-slim.sh /mnt/slim-data". You then need to make sure the script is executable: "chmod +x /mnt/slim-data/start-slim.sh". Finally, create the link: "ln -s /mnt/slim-data/start-slim.sh /etc/rc.d/rc2.d/S95slimserver". You can verify that it worked by rebooting your LinkStation (type "reboot" at the command prompt). Give it a few minutes, and your SqueezeBox should reconnect to the SlimServer.
That's it! Now you are really done. Enjoy!
If you have any comments, improvements, or corrections for this article, please let me know by e-mail: articles at fieldnetworks dot com. Thanks to the folks in the LinkStation_General Yahoo! group (http://groups.yahoo.com/group/LinkStation_General/) for all the great information (especially the root password hack, without which none of this would have been possible). If you run into any trouble installing SlimServer on your LinkStation, the LinkStation_General Yahoo! group or the SlimDevices discussion forums are great places to go for help.
Copyright © 2005-2006 Marc D. Field. Third party brands and marks are the property of their respective owners.