Personal tools
The Open Lighting Project has moved!

We've launched our new site at www.openlighting.org. This wiki will remain and be updated with more technical information.

Difference between revisions of "The Newbie Guide for OLA on Ubuntu"

From wiki.openlighting.org

Jump to: navigation, search
m (added link, removed uneccesary header)
m (Installing OLA)
Line 89: Line 89:
 
Good now that you have all the dependancies you can install OLA. There are several ways to do this. [http://www.opendmx.net/index.php/OLA_on_Linux#Checkout_or_Download_an_Archive]
 
Good now that you have all the dependancies you can install OLA. There are several ways to do this. [http://www.opendmx.net/index.php/OLA_on_Linux#Checkout_or_Download_an_Archive]
  
The way I did this was to download the Ubuntu packages from (http://imaginux.com/lighting/packages/) or (http://www.opendmx.net/index.php/Download_%26_Install_OLA#Linux) for updated Ubuntu options.  
+
The way I did this was to download the Ubuntu packages from (http://imaginux.com/lighting/packages/) or (http://www.opendmx.net/index.php/Download_%26_Install_OLA#Linux).  
 
Ubuntu 12.04 uses the ‘precise’ packages. Download the appropriate packages and extract the files.  
 
Ubuntu 12.04 uses the ‘precise’ packages. Download the appropriate packages and extract the files.  
  
Line 113: Line 113:
  
 
If the OLA web gui opens it works.
 
If the OLA web gui opens it works.
 
  
 
==Device Setup==
 
==Device Setup==

Revision as of 20:00, 19 July 2012

Written by Karsten Wolf. 19/7/2012

This guide is written to recount the steps and lessons learned while I attempted to configure Ubuntu to as a stand alone ArtNet Node. This tutorial is split into two guides both tailored towards absolute linux beginners. The first covers installation and configuring of OLA on ubuntu, the second covers configuring of the system to run as a stand alone Artnet Node with a general overview of Plugins and OLA configuration and use.

Prior to this I had no practical linux experience and this guide is written for other users with no practical experience. I found the other information on the wiki either hard to find or over my head due to my inexperience. This guide was written for complete beginners, it incorporates information from almost all the other guides on this wiki, so credit where credit is due.

Also see the guide to configure OLA as a Artnet Node in Ubuntu for some more helpful hints. Configuring_OLA_as_a_Artnet_Node_in_Ubuntu


Some important newbie information

A quick rundown of how some things I learned the hard way.

  • ‘sudo’ stands for ‘super user’ and ‘do’. It runs a command with Super User Permission. Usually requires entry of a password.
  • If a folder name is preceeded by a ‘.’ such as ‘/.ola’ or ‘/.mozilla’. That file is hidden.
  • Ctrl + Alt + T opens a new Terminal.
  • Case Sensitivity is important.
  • In this How-to anything preceeded by ‘$’ needs to replaced to match your setup. So $USER is a stand in for your Ubuntu username. $IP, $FILENAME, $FILEPATH
  • ‘~’ means your home folder. So ‘~/Documents’ is the same as ‘/home/$USER/Documents’
  • If you are using lights to test output, be sure to make sure they’re connected properly :)

Installing Ubuntu

Your choice here, Pull the latest version from the ubuntu site and install however you like. This guide uses Ubuntu 12.04. Installation is very straight forward and there are plenty of sites out there with how-to’s on this. The most straightforward and simple way to do this is with a LiveCD or LiveUSB key. You should be safe putting ubuntu onto a 5-10gig partition if OLA is all the installation will be used for.

Installing OLA

Dependencies

The Easy Way

To run OLA you need certain bits of software, this command will pull all the needed software, you will need an internet connection. This is by far the easier route.

Enter this text into Terminal.

sudo apt-get install libcppunit-dev libcppunit-1.12-1 uuid-dev pkg-config libncurses5-dev git libtool autoconf automake  g++ libmicrohttpd-dev libmicrohttpd5 protobuf-c-compiler libprotobuf-lite6 python-protobuf libprotobuf-dev  zlib1g-dev bison flex make

Note: More recent distributions may offer libprotobuf-lite7 instead of libprotobuf-lite6, which is an acceptable substitution.

Dependancy Hell

You can also download and install the packages manually. (As I did, being unaware of the above command)


  1. Google for the package.
  2. Download the archive. ($FILENAME.tar.gz)
  3. Extract the contents. (Documents folder makes sense)
  4. Open Terminal. (Ctrl + Alt + T)
  5. Type "'cd $FILEPATH'" then hit ENTER. (Example: “cd /home/tux/Documents/bison-2.5”)
  6. Type "'./configure'" then hit ENTER. Wait for it to finish.
  7. Type "'make'" then hit ENTER. Wait for it to finish.
  8. Type "'make check'" then hit ENTER. Wait for it to finish.
  9. Type "'sudo make install'" then hit ENTER. Wait for it to finish.

Do this for all dependancies.

cppunit

uuid or ossp uuid

pkg-config

curses

lex (or flex)

yacc (or bison)

the protocol buffers library http://code.google.com/p/protobuf/ (version 2.3.0 or later)

microhttpd ftp://ftp.gnu.org/gnu/libmicrohttpd/ (if you want the web UI). You need version >= 0.4.0 of microhttpd


If you're building from git you'll also need the following:

libtool

automake

autoconf


After you’ve installed all the of the dependencies run ldconfig. This will make the new libraries usable.

sudo ldconfig

Installing OLA

Good now that you have all the dependancies you can install OLA. There are several ways to do this. [1]

The way I did this was to download the Ubuntu packages from (http://imaginux.com/lighting/packages/) or (http://www.opendmx.net/index.php/Download_%26_Install_OLA#Linux). Ubuntu 12.04 uses the ‘precise’ packages. Download the appropriate packages and extract the files.

  1. Open Terminal. (Ctrl + Alt + T)
  2. Go to the extracted files. Type "'cd $FILEPATH'". (Example: “cd /home/tux/Documents/ola-0.8.20”
  3. If this is the first time run "'autoreconf -i'", else run "'autoreconf'". Wait for it to finish.
  4. Type "'./configure'" then hit ENTER. There are additional options available through "'./configure --help'". Wait for it to finish.
  5. Type "'make'" then hit ENTER. Wait for it to finish.
  6. Type "'make check'" then hit ENTER. Wait for it to finish.
  7. Type "'sudo make install'" then hit ENTER. Wait for it to finish.
  8. Type "'sudo ldconfig'" then hit ENTER.

OLA should now be installed.

You can start it with the commands

cd
olad -l 3

Test it by opening up a web Browser and go to

http://localhost:9090

If the OLA web gui opens it works.

Device Setup

This is where the fun begins. These steps apply to Ubuntu 12.04, other versions may vary. Because OLA cannot run as root, it can not access the USB device on some systems. Two ways to do it, both methods take a different means to the same end. One route may be preferential to advanced users, but for a simple setup either way works.

Option 1

Suggested by RenZo

Add a udev rule (and it will work with hotplug):

sudo gedit /etc/udev/rules.d/my_dmx_usb.rules 

a blank page will appears, write this line:

KERNEL=="ttyUSB*", MODE="0666" 

Save and close the editor, then replug your usb device and it should work forever.

Option 2

Suggested by Simon Newton

Add the username to the permissions groups dialout and plugdev. In Ubuntu ‘plugdev’ should be a default group. Be sure to replace $USER with your username.

In terminal check what groups your user is part of already

cat /etc/group | grep $USER

If your user is not a part of plugdev or dialout run these commands

sudo adduser $USER dialout
sudo adduser $USER plugdev

This should give OLA access to the usb device.