eGott Linux Sound Server is a remote-controllable Linux daemon mp3 player. Remote-control is possible via proprietary TCP protocol. There is already GUI client written in Java available.
I wrote eGott, becouse I wanted to turn my home Linux server into some kind of jukebox. There are some other solutions, mainly controllable via some kind of Web interface. I always found this interface insufficient messy and not responsive enough. So emerged the idea of a standalone daemon with capablities such as managing it's own MP3s, indexing them, playing them. This daemon would have proprietary protocol running on the top of TCP that would be easy to implement in a client. The client should have GUI simmilar to most of the mp3 players and should behave in simillar fashion. There should be possibility of multiple GUI clients connected managing their playlists, etc...
eGott is a realization of the above idea. The first release does not contain all the features I planned to have there. But it contains whole hack of them. I personally use eGott at home as a jukebox without any problems of burden.
I wish eGott good luck in his jurney to the World and I hope eGott will be usefull to many people out there :)
Jakub
eGott is dependant on various other packages. You must install them before you compile and/or install eGott. These packages include:
id3lib is a library for reading and writing ID3v1 od ID3v2 tags. These tags are present in MP3 files and contain information about the song. eGott is tested with id3lib version 3.8.0. There is source code available for id3lib located at http://id3lib.sourceforge.net/ and there are even RPM packages available on RPMFind Website.
MySQL is used as a backend storage for information gathered from MP3 as well as storage of playlists and other information. I have a plan to store these information anywhere else (like db2 database), but for now, there is no other possibility than to install MySQL. eGott was teeste with MySQL version 3.23.49, but should work on most of present versions, since it doesn't exploit any special feature of MySQL.
MySQL is available in source code at http://www.mysql.org/ and MySQL comes prepackaged with every modern Linux distribution. Note, that for redhat you have to install more packages. Namely: mysql and mysql-server and you will have to install mysql-devel, if you are compiling eGott out of source-code or .src.rpm.
GLib2 is a generic library for various tasks. Contains implementation of widely-used datatypes, contains functions for manipulation with strings, files, directories, memory, etc, etc... I'm using this library for my programs, becouse it really easens my life :) You can grab glib2 at http://www.gtk.org/. There are also prepackaged RPMs available there. If compiling out of source-code, don't forget to install also glib2-devel package(!)
Libstdc++ library is required becouse of id3lib. id3lib is programmed in C++, so we have to have libstdc++ installed. libstdc++ is available in every distribution. If you are compiling out of source-code on RedHat, it is necessary to have also gcc-c++ package installed. On other distributions, there may be other packages necessary -- look for the one which provides /usr/lib/gcc-lib/.../libstdc++.so.
eGott is available on it's project page located at http://www.kubs.cz/egott or on SourceForge. eGott is distributed as .tar.gz and there are also source RPM and i386 RPM built for RedHat 7.3 available. Grab up-to-date version of eGott from one of the above locations.
Unpack the .tar.gz package. There should be egott-<version> directory. CD into it and type
./configure --with-mysql=/usr |
There should be long listing of features checked as usually when installing program created with autoconf. Most of the people who already compiled anything are familiar. There are couple of problems, that can emerge. Mostly becouse you don't have all the prerequisities packages installed. See Prerequisities.
After configure finishes, run
make |
This should compile eGott. This command does not (yet) modify your system, so it's pretty safe. You can run it as unprivileged user.
Last step of installation into system is
make install |
This should install all eGott package onto your system. There should be egott and egott-setup binaries available for execution right now. Follow to the section called Setting Up.
Installation of .rpm package involves merely running following command:
rpm -ivh egott-<version>-1.i386.rpm |
There are cases, when rpm complains about some dependencies missing. You should look through the Prerequisities section and make sure you have all the packages installed BEFORE you try to install eGott.
There are number of things to configure for eGott. There should be MySQL database prepared before it's first run, startup script prepared, so that eGott is run under appropriate username, there should be reasonable values in the eGott's MySQL database, etc...
Fortunatelly, there is egott-setup program included in the installation, which should be able to do most of these tasks for you. After performing one of the previous installation steps, you should now be able to run
egott-setup |
Note, that this application must be runned as root(!).
This is somewhat GUI application. The first screen should be used to enter properties of your installation. They are:
This value contains full path to the mysql command. It should be valid, since egott-setup tries to discover this value for you.
This is a full path to the schema.sql file provided with the installation. This file contains initial contents of the tables in MySQL. This path should be also autodiscovered by egott-setup and there should be no need to edit it.
This is usename of the administrator of MySQL. egott-setup uses this username along with password provided in the next item to create database, populate it with a schema, create users, etc... This name is usually set to root.
This is password of the database administrator. Note, that when you enter it, the password is not displayed at all, so don't be confused. Don't worry, if you write invalid password, egott-setup will sooner or later recognize it and will behave correctly asking you to provide valid one.
This is name of MySQL database, that will be created for eGott. This database is either created in case it doesn't exist, completelly deleted(!!) if it exists and "recreate whole database" option is set to Yes or just left alone otherwise.
This is name of MySQL user about to be created for eGott. This user will have only access to the database stated in the previous option. The access will be only that of data manipulation, not schema manipulation. In case this user already exists in the database, her's password will be changed to the value entered in the following option and her's rights will be set.
This is password, that the user mentioned in the previous option, will be assigned.
This is name of the user (UNIX Account), eGott will be running as.
eGott does NOT setuid() itself to this UID(!) nor does it check whether it is actually running under this UID! It is administrator's responsibility to ensure, that eGott will be running with this UID!! The RPM installation does this automatically in the /etc/init.d/egott script. For other people, there is scripts/egott.init file prepared, which should be able to do simmilar task after some modifications under other distributions or flavours of Linux. |
This user must exist prior to running egott-setup. There are no checks made as if the user actually exists, but nothing really serious happens if she doesn't.
RPM package creates a user called egott for you automatically, so you don't have to create her manually. |
See Setting up MP3 Stores section
If this setting is set to YES, than all the database in MySQL will be deleted and recreated from scratch. Otherwise, there will be only updates to the database. You can run egott-setup after some time of using eGott just to for example add mp3 stores. In this case, put NO in this setting, otherwise you would loose your play-lists.
After you are sure every value here is correctly entered, you can run the run configuration option.
MP3 stores are simply directories, where eGott should look for MP3 files. Contents of these directories are scanned for new files from time to time (this timeout is configurable). eGott makes no changes to the directories apart from adding new MP3s in case it is allowed to.
Every store has it's name, path and flags. Name is just an ordinary name by which this store will be presented to users. Path is ABSOLUTE pathname of the root of the store. Flags is a list of letters with specific meaning. Right now, there is only one flag defined for a store, represented by letter W, which means, this store is writable and that users are allowed to upload new MP3s into this store.
In case you have writable store and writing still doesn't work, make sure the user, under which eGott is running has proper access to the store! |
There can be any number of stores in the eGott system.
eGott reads it's configuration from the file /etc/egott.conf. This file is commented in extensive way so you should be able to modify it yourself. If not, see the section Configuration File.
eGott uses mpg123 as a player. But mpg123 itself is runned under the same user as eGott is. So it has to have access to the sound device. Sound device under Linux is usually named /dev/dsp. There are cases where not (when you have multiple soundcards installed), but they are out of scope of this document. eGott itself accesses mixer device to change volume of playback. Mixer device is usually named /dev/mixer.
Both of these devices should be writable by eGott. The easiest way to do this is to change owner of these devices by specifying:
chown <username> /dev/dsp chown <username> /dev/mixer |
Where <username> stands for name of the user eGott will be running as.
In most modern distributions, however, owner of these devices changes as somebody logs in to the console. This functionality is hidden in file named /etc/security/console.perms. The very purpose of this file is outside the scope of this document. But to prevent Linux from changing owner of the sound devices, look for the line
<console> 0600 <sound> 0600 root |
and comment it out by prepending hash "#" to this line.
As mentioned in the previous section, eGott is not ment to run as a privileged user. There are various ways how to run eGott when logged in as root:
There is script installed into /etc/init.d, which does all the burden of running eGott appropriatelly, when eGott is installed from RPM. Running
/etc/init.d/egott start |
should do all the job for you. Unfortunatelly this is only tested under RedHat 7.3 linux.
There is a file called scripts/egott.init provided with the distribution, which is a script, that should go to /etc/init.d directory under RedHat Linux. This script should do all the work for you.
There is egott-run script distributed with egott, which should run eGott under appropriate user for you. Just type
egott-run |
as root.
eGott is heavily multithreaded so don't be alarmed, when there are more egott programs running. They are just more threads of one program.
Everybody wants to quick start using new program and don't think of many things at first. Anyway, you should have read the Getting Started chapted and have installed eGott. You should have specified one MP3 store, path pointing to directory with a couple of testing MP3s.
Run eGott by one of the methods described in Running eGott section.
Ensure, that eGott is running by listing processes. Write something like:
ps -e | grep egott | grep -v grep |
there should be a couple of processes with name egott running.
Now, you will require JRE 1.4.0 at least, to run your prepackaged client. You can grab it free of charge at http://java.sun.com/j2se/downloads.html. Unfortunatelly by the time of writing this document, there is no other client available.
After you have installed JRE, you are now able to run the client software. Run your X server, start Xterm, cd to the eGott's distribution directory httproot and run
java -jar eGottClient.jar |
There should appear a login dialog. Fill up Server name with "localhost", Username with "admin" and Password with "admin" too and click Login button. This should login you to your local eGott server. And end up with a screen like this:
There is no song in the queue, no song playing, player is stopped and there are no playlists defined. Now, click on the SongList button on the top of the window. There should be another window opening with list of your stores and a tree, that represents filesystem structure in the stores. In case you had any MP3 in any of your store, you should see them in the right table after clicking on a directory in the left tree. Your store got automatically reindexed after you runned eGott.
Point on to any of the songs in the table and drag it and drop it on the Play button. This is the point, when eGott should start playing. If not, than there is something rotten in the state of Danmark.