Installing on gentoo

From Tuxisalive

Jump to: navigation, search

This articles applies to : Software Suite v3

This How-to is intended for : Gentoo users


English  • Français



Contents

Base installation

Satisfying the dependencies

You have to install these ebuilds:

dev-java/sun-jdk
dev-python/setuptools
dev-python/pyxml
dev-python/ctypes
media-libs/portaudio
media-sound/lame
media-sound/sox
sys-libs/libstdc++-v3
mplayer

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

Activate some options in kernel

You have to activate some options in your kernel in order to use your Tux.

Device Drivers --->
   Sound --->
      Advanced Linux Sound Architecture --->
          USB devices  --->
              <*> USB Audio/MIDI driver
   HID Devices --->
      <*>   USB Human Interface Device (full HID) support
      [*]     /dev/hiddev raw HID device support

Next, recompile your kernel and reboot.

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

The tarball method

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


Ebuild

There are currently no ebuild for tuxdroid.

Init script

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.

Note : This script must be updated. kokotchy ?

#!/sbin/runscript
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
 
depend() {
	need alsasound
}
 
start() {
	ebegin "Starting Tux HTTP Server"
	start-stop-daemon --start -p /var/run/tuxhttpserver.pid --exec /usr/share/tuxdroid/tuxhttpserver/tuxhttpserver.py --name python
	eend $?
}
 
stop() {
	ebegin "Stopping Tux HTTP Server"
	start-stop-daemon --stop --quiet -p /var/run/tuxhttpserver.pid 
	eend $?
}

For now, the init script isn't in the package so you have to copy it into /etc/init.d/tuxhttpserver

You can start the server with

/etc/init.d/tuxhttpserver start

To launch the server at startup, add it to the default runlevel:

rc-update add tuxhttpserver default

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've 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