Installing on fedora

From Tuxisalive

Jump to: navigation, search

This articles applies to : Software Suite v3

This How-to is intended for : Fedora users


English  • Français



This article describes step-by-step how to install the Software Suite version 2 on fedora (10).

Contents

Base installation

Satisfying the dependencies

Before installing the main package, please ensure that all these dependencies are satisfied. The following software or libraries are used by the Tux Droid software.

  • java-1.6.0-openjdk
  • python-setuptools
  • python-devel
  • PyXML
  • python-ctypes
  • compat-libstdc++-33
  • sox
  • lame
  • mplayer

Notes : 64 bits users must install the ia32 compatibility libraries. These libraries are usually available in your distribution repositories.

The following command will install all the dependencies :

su
yum install java-1.6.0-openjdk python-setuptools python-devel PyXML python-ctypes compat-libstdc++-33 sox lame mplayer
exit

Note :

  • Please update this section if the package names are incorrect.

Downloading the main package

The first step is downloading the software package.

The download server is organized as following :

Root folder for the installers
 `- Version of the installers
     `- Language of the installers
         `- Installation packages

You will find several packages :

  • tuxbox-language-version-amd64
  • tuxbox-language-version-i386
  • tuxbox-language-TTS-version-amd64
  • tuxbox-language-TTS-version-i386

The packages with TTS are bigger, because they contain the voice engines. It's strongly recommended to use these packages, even when you want to update your current installation.

Please be careful to select the right architecture for your system. Packages containing i386 have been made for 32 bits OS. Packages containing amd64 are for 64 bits OS.

To be sure to download the latest package, you can use the direct links :


Installing the main package

Unpack the package, and go to ./tuxbox-LANGUAGE-(TTS)-ARCH

To install all the software, simply type :

./install # As root

The script will copy the files onto your system. You'll find all the applications in /usr/share/tuxdroid. The APIs sources are installed in /usr/lib/tuxdroid and the python API is installed in /usr/lib/python2.x/site-packages/tuxisalive


Registering the server in the runlevels

A node of the software layer is a HTTP server. If this server is not running, you won't be able to communicate with your Tux Droid. This server also loads the driver, and the TTS library.

The best way to never forget to start the server is by installing it in the runlevels. This will start the server at boot time. To do this, you have to install a special script.


#!/bin/sh
 
# chkconfig: 345 56 50
# description: This startup script launches Tuxdroid HTTP Server
 
### BEGIN INIT INFO
# Provides: tuxhttpserver
# Required-Start: 
# Required-Stop: 
# Default-Start: 345
# Short-Description: Tuxdroid HTTP Server
# Description: This startup script launches Tuxdroid HTTP Server
### END INIT INFO
 
PATH=/usr/sbin:/usr/bin:/sbin:/bin
DESC="HTTP server for Tuxdroid"
NAME=tuxhttpserver
PROCESS=$NAME
DAEMON="/usr/bin/tuxhttpserver"
DAEMON_ARGS=""
PIDFILE=/var/run/$NAME.pid
 
# Source function library.
. /etc/init.d/functions
 
case "$1" in
  start)
    if [ -f $PIDFILE ] ; then
      echo "$NAME is already started"
      exit 3
    fi
    printf "Starting $NAME"
    $DAEMON --start
    echo
    ;;
 
  stop)
    if ! [ -f $PIDFILE ] ; then
      echo "$NAME is already stopped"
      exit 3
    fi
    printf "Stopping $NAME"
    $DAEMON --stop
    rm -rf $PIDFILE
    echo
    exit 3
    ;;
 
  restart|force-reload)
    $0 stop
    sleep 1
    $0 start
    ;;
esac
exit 0

Create a new empty file called 'tuxhttpserver', and copy the above script in it, and save the file.

Once the script is done, you can install it on your system :

chmod +x tuxhttpserver
su
cp tuxhttpserver /etc/init.d
chkconfig --add tuxhttpserver
exit

Now the init script is installed. The server will starts each time your system boots. If you want to start, stop or restart the server manually, here is how you do it:

su
/etc/init.d/tuxhttpserver stop # Will stops the server
# or
/etc/init.d/tuxhttpserver start # Will starts the server
# or
/etc/init.d/tuxhttpserver restart # Will restart the server
exit

Turning down SELinux

Fedora uses SELinux to control the security. Unfortunately, a library uses the text_reloc, and SELinux doesn't like that ! So, we have to register theses libraries to prevent SELinux warnings.

chcon -t textrel_shlib_t '/usr/share/tuxdroid/tuxhttpserver/util/osl/libtuxosl.so'
semanage fcontext -a -t textrel_shlib_t '/usr/share/tuxdroid/tuxhttpserver/util/osl/libtuxosl.so'
chcon -t textrel_shlib_t '/usr/lib/tuxdroid/acapela/libacatts.so'
semanage fcontext -a -t textrel_shlib_t '/usr/lib/tuxdroid/acapela/libacatts.so'
chcon -t textrel_shlib_t '/opt/Acapela/TelecomTTS/babtts/bin/BrightSpeech.so'
semanage fcontext -a -t textrel_shlib_t '/opt/Acapela/TelecomTTS/babtts/bin/BrightSpeech.so'

Once these specific rules are configured on SELinux, you'll be able to start the server correctly , with the command :

tuxhttpserver --restart

Testing your installation

Now, the base installation is finished. You will be able to test your Tux Droid !

Please make sure your dongle is plugged in and Tux is turned on. The LED's in both the dongle and Tux should be lit, indicating they are both connected to each other.

The first time, the server must be started manually. To do it, type the following command :

$ tuxhttpserver --start #as normal user

or use the launcher located on "Applications / Accessories / Tux Box2.0

A very quick test that can be done to test Tux, is by sending some commands with the Python API. From a terminal, type the command tuxsh. This will open a Tux Droid shell.

tuxsh
>>> tux.eyes.on(2) # Will blink the eyes
True
>>> tux.flippers.on(2) # Will flap the wings
True
>>> exit()

If the commands return False instead of True, it means that your installation has a problem.

Please see this article to know how to fix the problem : Troubleshooting


If the installation seems OK, you can now start the graphical interface. The new graphical interface is web-based, so is accessible from a web browser such as Firefox.

To start the graphical interface, open a web browser and go to http://127.0.0.1:54321 .


Installing the Text-To-Speech (TTS) (optional)

If you have installed TuxBox without the TTS voices, please read the below titles to know how to install the voices manually. If you have chosen the complete TuxBox package with the TTS engine included, your installation is done.

Downloading the language file

The TTS will allow your Tux Droid to speak. This functionality is optional, but is used for the majority of the Tux Droid software.

The Acapela license allows to install two different languages. The available languages are :


Installing the language file

All the packages contain a script named WIZARD. Once the archive is unpacked, go in the directory, and type the following commands :

./WIZARD # You need to be root to do that


The languages are installed in /opt/Acapela/TelecomTTS/babtts/engines/. By browsing this directory, you can see the installed languages.

After installing a new language, you have to restart the server.

/etc/init.d/tuxhttpserver restart  # as root


Testing the voices

The easiest way to test the voices are with the python API.

Once again, we will use tuxsh :

tuxsh
>>> tux.tts.getVoices()
['Heather', 'Ryan', 'Bruno', 'Julie'] # The english and french male / female voices
>>> tux.tts.setLocutor("Bruno")
>>> tux.tts.speak("Bonjour, je test mon installation de Tux")
True
>>> tux.tts.setLocutor("Ryan")
>>> tux.tts.speak("Hello, I'm testing my Tux Droid installation")
True
>>> exit()

If the voice list is empty, or if the commands return False, something is not installed correctly.

Please see this article to know how to fix the problem : Troubleshooting


The high level software

TODO : Control Center introduction on Linux.

Personal tools
information strucure
development tools
miscellaneous