Version 17 (modified by ajaworski, 13 years ago) (diff)

--

SAGE installation and usage

Installation

Prerequisities

These packages are required to compile SAGE on Ubuntu:

  • build-essential
  • mesa-utils
  • python-wxtools
  • libmagickwand-dev
  • libreadline6-dev
  • libsdl-dev
  • libxmu-dev
  • libxi-dev
  • freeglut3-dev
  • libglew1.5-dev

Optionally, these packages are helpful in monitoring the system:

  • ethtool
  • iftop

Before compiling SAGE make sure that the OpenGL library is linked properly in /usr/lib - some GPU drivers tend to break the links.

Compilation

To compile SAGE simple make and sudo make install is required. There is a configure script distributed with SAGE sources, but all it does is echo "DONE", so you don't have to run it.

Environment setup

After installation SAGE there is some environment setup required.

  1. Environmental variables
    You need to setup environmental variables even if you don't start an interactive session but just run a command using ssh. To achieve this you have to:
    • change one of the first lines in .bashrc from:
        [ -z "$PS1" ] && return 
      
      to:
        [ -z "$PS1" ] && . /etc/profile.d/sage.sh && return
      
  2. Libraries location
    Some applications using SAGE may not find SAGE libraries if you run an amd64 system. All you have to do is:
    • enter SAGE installation directory (/usr/local/sage by default)
    • make a symlink (ln -s) to lib64 folder and name it lib (sudo ln -s lib64 lib)
    • check whether file /etc/ld.so.conf.d/sage.conf exists; if not - create it and enter /usr/local/sage/lib
    • run sudo ldconfig
  3. Install openssh-server (sudo apt-get install openssh-server)
  4. Disable SSH strict host key checking (in /etc/ssh/ssh_config line StrictHostKeyChecking no)
  5. Setup static IP addresses for interfaces used to communicate between wall and access machine (using /etc/network/interfaces file)

Access machine

Previous steps are all required on both tile an access machines. On access machine, however, there is some more action to perform.

  1. To operate the wall using Wiimote you need to have a Bluetooth adapter and these libraries installed in the system:
  2. Setup SSH login to all tile computers using rsa key (without password)
  3. Edit SAGE configuration files to suit your needs (fsManager.conf and tile*.conf in ~/.sageConfig or /usr/local/sage/sageConfig); configuration files for wall at PSNC can be found in repo

Tile machines

Also on tile machines there is one thing that you need to do after finishing the environmet setup, which is Xorg server setup. More information can be found in XorgSetup article.

Additional software

VLC

VLC is the best movie player for SAGE. Information about it and downloads can be found at  developer site. To use VLC you have to:

  1. Unpack the archive
  2. Run ./configure and install any required library
  3. Change few lines in modules/video_output/sage.cpp file (according to SAGE forum  topic)
    For the colors: you have to swap the bit masks for the RV16 format (WORDS_BIGENDIAN),
    line 185 in sage.cpp. After that, it should put the right colors in the right bits. 
    (I dont remember using 16-bit colors)
    
  4. If you have any problems during compilation, on the bottom of  developer site there are most common issues and solutions.
  5. Create configuration files for SAGE:
    • go to ~/.sageConfig/applications directory
    • make 2 copies of any configuration file you have already used and name it vlc.conf and cvlc.conf
  6. Run vlc (with user interface) or cvlc (without user interface) with the syntax:
    {vlc|cvlc} --vout sage [--no-video-title-show] [--loop] filename
    

mplayer

Mplayer is slightly less effective than VLC when displaying videos on SAGE wall, but is still a very nice player. To use you have to:

  1. Download the package from  developer site
  2. Unpack the archive
  3. Run ./configure
  4. make and sudo make install
  5. Create configuration files for SAGE:
    • go to ~/.sageConfig/applications directory
    • make a copy of any configuration file you have already used and name it mplayer.conf
  6. Run mplayer with the syntax:
    mplayer -vo sage [-loop 1] filename
    

qshare

Qshare is a dedicated application to share your desktop on SAGE wall. It is bundled with SAGE sources, but needs to be compiled seperately. It prooved to be a bit quicker than standard VNC client with SAGE plugin. To use qshare all you have to do is:

  1. Enter apps/qshare directory
  2. Run GO script to make and install the application
  3. Run qshare to start sharing your desktop

DecklinkCapture

DecklinkCapture allows to send stream grabbed with Blackmagic Decklink cards to SAGE wall. To use it you have to:

  1. Download drivers from  Blackmagic page and install them according to instructions given
  2. Enter apps/DecklinkCapture directory
  3. make and make install
  4. Run decklinkcapture -l to see supported cards, video modes and video inputs
  5. Run decklinkcapture with following syntax:
    decklinkcapture -i [video_mode] [video_input]
    
    where video_mode and video_input are numbers read in previous step

OpenGL wrapper

OpenGL wrapper lets you send your OpenGL applications to wall without any changes in code. It is simply a library which overrides standard glutSwapBuffer implementation. To use it you have to:

  1. Enter app/gl directory
  2. Change name (or copy) desired Makefile.* to Makefile (according to architecture)
  3. make and sudo make install
  4. To run your application, enter:
    GO* your_application
    
    where GO* is one of GO scripts in gl directory

Usage

Start SAGE

  1. Power on all computers
  2. Run Xorg on all tile machines (runxall script on access machine)
  3. Run sage on access machine
  4. Click start

Movies

See VLC or mplayer

Pictures

To display pictures you can use imageviewer, which is part of FileViewer application bundled with SAGE. It is compiled alongside SAGE, so you don't have to do anything to get it working. Imageviewer can show images "as is", which means sending a lot of data through network, or perform DXT compression to limit it. DXT is done only on first display of specific image - the compressed version is saved in the same place the original image is located. During next displays, first a check is performed whether .dxt file exists, an when it does it is immediately sent to the wall.

OpenGL

See OpenGL Wrapper

Own desktop

See qshare

Playstation 3

See DecklinkCapture
Unfortunatelly, Playstation 3 sends an HDCP signal over HDMI port, which Blackmagic cards can not grab due to legal issues. The only possible method to show PS3 screen on the wall is to use Composite or Component adapter. Component adapter is prefered due to better video quality than Composite.

Wiimote

You can control windows displayed on the wall using Wiimote controller. To do this you have to install proper libraries first (see Access machine). You also need a simple circuit containing IR LEDs. Instructions for building such circuit can be found on the Internet by searching for Wii Sensorbar. If SAGE was compiled with required libraries and you have your circuit in place, you have to set wiimote capture to start with SAGE. To do this you have to:

  • Run sage
  • Click Advanced mode
  • Click Settings in the SAGE section (first from the top)
  • In ON SAGE STARTUP enter:
    python ../dim/dim.py
    python ../dim/hwcapture/wiimote.py localhost
    
    If any line containing dim.py already exists, delete it.
  • Comment line:
    python ../dim/hwcapture/localPointer.py localhost
    
    using #:
    #python ../dim/hwcapture/localPointer.py localhost
    
  • Confirm by clicking OK in the window
  • Turn on Wiimote in discovery mode (1+2 button press)
  • Start SAGE with START button

Now you can control windows on the wall using Wiimote controller. To select a window just point to it. Then you can perform following actions:

  • move windows (A button)
  • resize window (B button)
  • rotate window (Left and Right buttons)
  • move window to front or send to back (Up and Down buttons)
  • maximize a window (Home button)