ltsp_phpSiCafe - Installation Intro: Here is a package I put together to allow fellow who use LTSP for Internet Cafe. I created a simple python for client side and enter the bills to a MySQL database. For displaying all workstations status and all reports, i use phpSiCafe with a litle modifications. I hope you enjoy. There still are some bugs since I quickly packaged them together. Requirement: - php 3 or higher [I use php4.0.6 and i don't know if other version will work since i don't know much about php :-)=- ] - MySQL server, MySQL module for python and php. - python 2.0 or higher [ i use v 2.1.1] - wxpython and wxpython-gl (the version is deppends on your python version) - wxGTK and wxGTK-gl (the version is deppends on your python version) - LTSP v2.08 or higher [Any version of LTSP should work i think] - slay - xmessage (optional) to display message How to install: [1] Extract the package tar -zxvf ltsp_phpSiCafe-.tar.gz [2] Create MySQL database (for example: phpsicafe). Ask your database administrator. The tables structure is include in the distribution and you can use it with mysql command. Example: 'mysql -u dbuser dbname < ltsp_phpsicafe.sql'. [3] Open the file inc-config.php in billing/ with your favourite editor and change the values for any variables to fit your environment (don't forget the MySQL varibles!). [4] Copy billing/ dir to somewhere in your webserver directory Example: 'cp -R billing/ /var/www/html/'. [5] Open http://localhost/your-installation-dir/ (step 4) on your browser. Enter your Admin password (you've set in inc-config.php) then Sign-in. Add your workstations manually. [6] Edit user.py inside "EDIT YOUR OWN CONFIGURATIONS HERE" section. Change the variables that suit to your configurations (esp MySQL) Edit 'path2python' and 'path2message' variable at shutdown class. path2python = "/home/.user.py" path2message = "/home/.message.txt" [7] Copy user.py to somewhere which everybody can't access it. Example: 'cp user.py /your/private/dir/'. where the dir mod is 700. It's dangerous if someone can read user.py since there's your MySQL configuration in it. [8] Make user.py executed everytime user login from xDM. I use GDM, here's what i do: - Add these lines into /path/to/gdm/PreSession/Default : xhost + su -l $USER -c "python /home/users/.user.py &" xhost - So only the system can access and read the file. For anyone use XDM add the line into /etc/X11/xdm/GiveConsole I don't know any other xDM, please read the doc to do similar thing. How it works: [1] User can login from xDM, and it will display the billing system. [2] When user wants to finish his session, click "finish" button. [3] The admin, who monitor the billing, should set the workstation status to 'Idle' from the browser. If it is 'Stopped', user cannot login to the workstation. Installation notes: o) Make sure all workstations status are 'Idle' before it is used and after a user end his session. o) Some system can give display manager to ws although the ws isn't on /etc/hosts. So make sure /etc/hosts contains all workstations' IPs and aliases. This is important of getting ws information. o) In case you have problems with php, try replacing /etc/php.ini with the one included within this distribution. Yes, you need to back-up the original file first. Also, you need to restart httpd to get it work