System Installation

From Ndiyo

Jump to: navigation, search

Contents

[edit] System Requirements

Please read System Background if you haven't already!

[edit] Hardware

Here's a checklist of the bits you'll need:

  • One LCD screen, keyboard and mouse per user. Note that the current Nivo has PS/2-style connectors, so if the keyboards and mice are USB-based you'll need adaptors. Most will come with these included. Make sure you have a VGA lead to connect the monitor to the Nivo if it doesn't come with one attached.
  • One Nivo per user, unless you're connecting one user directly to the PC, in which case you'll need one less Nivo. Make sure you have the right power adaptors for the Nivos. We normally supply them with US or UK power supplies, so you may need plug converters if you have different sockets.
  • One PC running a recent Ubuntu Linux. The faster the better, and make sure it has a reasonable amount of RAM. We'd normally recommend around 256M per user. It also needs an ethernet interface, and if you're attaching more than about four nivos, we'd recommend that it be gigabit ethernet.
  • An ethernet network switch unless you have one already. Make it a gigabit-capable switch if your PC can take advantage of it. Make sure it has enough free ports for the PC, all the nivos, and any connections to the outside world.
  • Ethernet cables. Enough to connect everything up. That will probably be at least one per user, one for the PC, and often one to connect everything to the outside world.
  • Mains power adaptors. It's very easy to run out of power sockets!
  • UPS/surge protector. If you're in an area where the electricity supply is unreliable, you may wish to plug the PC into an uninterruptible power supply or surge protector.

In the unlikely event that you have the older Nivo 1 hardware (in the oval aluminim case), please make sure you read the Nivo 1 page so you understand the differences.

[edit] Software

[edit] Using the Ndiyo Live CD

If you purchased the Ndiyo Starter Kit you will have received a customised version of an Ubuntu Live CD, which can be used to boot a PC and test your Ndiyo system, and also to install Ubuntu if wanted. See Using the Live CD for more information.

Note that the LiveCD is based on a version of Ubuntu which is now a couple of years out of date, so we now recommend that instead of installing from the LiveCD, you build a system yourself using a more recent Ubuntu distribution. We'll explain how to do that below.

[edit] Getting Ubuntu

Ubuntu Linux is freely available for download from the Ubuntu site. The download is large, so if you don't have a good internet connection you may want to get CDs or DVDs from here or find somebody who can make a copy for you. Ubuntu variants, such as Edubuntu, Kubuntu or Xubuntu should also be fine.

If you need help with getting the PC up and running and connected to the internet, have a look at the Ubuntu documentation and then come back here when it's installed, and we'll set about turning your Ubuntu PC into a multi-user Ubuntu PC.

[edit] Installing the software

There are a huge number of extra packages which can be installed on Ubuntu to augment a standard installation for essay writing. The easiest way to do this is with the Synaptic Package Manager, which can be found on the System>Administration menu.

For some of these packages you'll need to configure your system to search for user-contributed packages as well as standard system ones. These live in the 'Universe' repository, which can be enabled as described in the relevant section of the Ubuntu docs.

Once the Universe repository is enabled, you'll probably want to add at least the following packages for a typical Ndiyo system:

  • xfs - provides fonts for the Nivo displays
  • dhcp3-server - if you don't have a DHCP server on your network. Even if you do have one, you may still wish to run a DHCP server in certain circumstances. See Two-Interface System for an example.

You should be able to find these packages easily in Synaptic using the search facility.

Alternatively you can install them from the Terminal prompt using:

 $ sudo apt-get update
 $ sudo apt-get install xfs 

and if needed

 $ sudo apt-get install dhcp3-server

You will also need the vnc4server package, but unfortunately the version in recent Ubuntu releases has a bug that hasn't been fixed. We therefore reecommend installing the tightvnc variant alongside it - and we'll modify the ndiyo scripts to use that.

 $ sudo apt-get install vnc4server tightvncserver

[edit] Overview of the installation process

Basically there are two steps in setting up an Ndiyo system from scratch.

  • Connecting up the hardware (PC, screens, Nivos, keyboards, mice, Ethernet switch and Internet connection for the PC)
  • Installing the necessary software on the PC.


[edit] Connecting up the Hardware

It's possible you may have an old version of the Nivo hardware which looks like this:

Image:Panther-labels.jpg‎

If your system is using the really old Nivo 1 hardware, things will be slightly different, and you should read the Nivo 1 page. But more probably you have the newer black nivo, which has labelled connections.


When you connect everything up and turn it on, the display connected to the Nivo will show the following things:

  • A coloured square in the top-left corner. This will normally be blue, but will be red if the ethernet is not connected.
  • The ethernet MAC address of the Nivo. This looks something like 00:0F:9D:12:34:56 and is a unique serial number for that device.
  • If you have a DHCP server on the network and the Nivo has successfully been allocated an IP address, that will be shown on the screen below the MAC address. If nothing appears after a few seconds, you may need to set up a DHCP server on the PC.

[edit] How the Ndiyo software works

Linux applications normally display things on your screen using a piece of software called an X Windows Server. This knows about your graphics card, your monitor, your keyboard and mouse, so that individual applications don't need to - they just understand how to talk to the X server.

With an Ndiyo system, we use a modified X server which sends pixels over the network instead of drawing them on a graphics card. Eventually, it will do this directly, but at present we have a two-stage process; a modified X server called Xvnc outputs the pixels using the VNC protocol and Ndiyo's converter program takes this, converts it to Nivo protocol, and sends it to the Nivo you specify.

Image:pixelpipeline.png

If this sounds complicated, we apologise! We will simplify it as soon as we can, not least because the Nivo performance will improve dramatically when we do so.

[edit] Installing the Ndiyo software on the PC

Once your Nivos are connected up and displaying an IP address as described above, you can move on to installing the Ndiyo software. First of all, make sure you've installed any packages mentioned in the Software section of the System Requirements above.

Once you've done that...

The current version of the Ndiyo software is available here:

Select the version appropriate to whether you're running 32 bit or 64 bit version of the Linux OS:

The software comes as a Debian package which will install the necessary tools and configuration files onto the Ubuntu system. The package filename will be of the form 'Ndiyo_0.2-14_i386.deb'. You can install the package by using a GUI tool or on the command line.

To install the package at the command line use the following command (altering the filename as necessary):

$ sudo dpkg -i Ndiyo_0.2-14_i386.deb

To remove the package issue the following command (note you don't use the original filename here):

$ sudo dpkg -r ndiyo

The package will install various files including the nivo2vnc convertor. This has an option which can list the Nivos it can see on your local network.

 $ nivo2vnc -locate

If all has gone well so far this should list the IP addresses of any Nivos on your network.

 $ nivo2vnc -test -nivo <address>

This should draw a coloured box on the screen attached to the specified Nivo.

[edit] Setting up multiple desktops

Each Nivo is going to have a separate view of a 'desktop', almost as if it were a separate computer. We need to configure the PC to create multiple desktop views and send them to the appropriate Nivos.

First of all we need to enable multiple graphical login prompts.

[edit] Enabling XDMCP

We need to enable a system called XDMCP to allow the machine to create multiple login prompts. You can do this using the System > Administration > Login Window menu. In the 'Remote' tab set the style of remote logins to be 'Same as local'.

If you have more than a few Nivos you may also need to click the Configure XDMCP... button and increase the Maximum remote sessions and, especially, Displays per host to something larger than your maximum expected number of Nivos plus local screens. It may be worth increasing the Maximum pending requests settings as well.

(If you don't want to use the Login Window menu item to do this for some reason you can find these settings in gdm.conf and gdm.conf-custom, which normally live in the /etc/gdm directory.)

You'll need to restart a program called gdm after this, and, frankly, unless you're a guru, the easiest way to do it is probably to reboot your PC. Once that's done we can setup the desktops.

[edit] Creating the desktops

Under recent versions of Ubuntu, services are managed using a facility called Upstart, which will start and stop them in response to certain system events. We use Upstart to launch the Xvnc program (or, nowadays, the Xtightvnc alternative) that creates a desktop and the nivo2vnc program that connects it to a physical Nivo.

For each Nivo terminal we will place two Upstart scripts in /etc/event.d, one for each of these programs. These scripts will run when the PC starts up and will ensure that the programs are relaunched automatically in the event that a nivo is unplugged and re-plugged, or if the desktop session goes away. Users on other Linux variants can create something similar with inittab or init.d scripts.

The good news on Ubuntu is that there's a utility called ndiyoadmin which can do most of the work for you. It can create & remove the necessary Upstart scripts and can stop and start the Nivo desktops en masse. You can still handle the Upstart scripts yourself if wanted but for many situations ndiyoadmin should be sufficient. It just needs a single configuration file, called /etc/ndiyo/ndiyo.conf, and it can even generate a sample one of those for you!

We don't make everything completely automatic because there may be many Nivos on your local network, some used by other machines or for other things, and we can't assume that we can just take control of them all. The ndiyo.conf file therefore lists the Nivos that you wish to use for desktop sessions and you can edit it to include or exclude particular Nivos.

[edit] Updating ndiyoadmin

We're about to learn the ndiyoadmin utility, but for more recent versions of Ubuntu (anything after about version 8) we need to make a slight change to it so it uses the TightVNC server.

So, edit /usr/bin/ndiyoadmin (or make your own copy of it), and look for the definition of XVNC_UPSTART_TEMPLATE_0_3. Somewhere probably around line 60 you want to change the lines that say:

 exec /usr/bin/Xvnc -geometry %s -depth 24 -pixelformat rgb888 \
   -SecurityTypes none -once \
   -fp unix/:7100  -query localhost :%s

into

 exec /usr/bin/Xtightvnc -geometry %s -depth 24 -pixelformat rgb888 \
   -once \
   -fp unix/:7100  -query localhost :%s

OK - sorry about that. We'll update the distribution soon so you won't need to do that!

[edit] Using ndiyoadmin

Here are some example ndiyoadmin commands to get you started:

 $ ndiyoadmin sampleconfig

This will display a sample ndiyo.conf file, based on the Nivos that the machine can currently see on your network. Typical output might look like this:

 # Nivo display configuration
 # Uncomment the lines you want to use
 # 00:0f:9d:00:00:0f  30 
 # 00:0f:9d:00:00:66  31
 # 00:0f:9d:00:00:8b  32
 # 00:0f:9d:00:00:b1  33

The MAC address of each Nivo is given, along with a number from 30 upwards, which will be the Xvnc session (display) number. (The choice of 30 as a starting point is somewhat arbitrary, but each Nivo needs a different number and it's unlikely that other things will be using numbers in this range.) Note that anything after a # symbol is a comment and will be ignored. In this sample output all lines begin with a # and so if you put it in place as /etc/ndiyo/ndiyo.conf, it will do precisely nothing unless you uncomment some of the lines. On big busy networks it can be useful to start with nothing and then add in the Nivos you actually want to use with this machine.

Let's assume, though, that you're on a network where you wish to use all available Nivos as terminals for this machine.

 $ sudo ndiyoadmin installconfig

This creates a config file as above but with all of the Nivos enabled, and puts it in position as /etc/ndiyo/ndiyo.conf. You can edit it if wanted, but you often won't need to.

One thing you may wish to specify, though, is the resolution of the monitor attached to a particular Nivo. Edit the appropriate line to include, for example:

 00:0f:9d:00:00:0f  30  1280x1024

Now we can use this configuration to create Upstart files for all of the Nivos listed.

 $ sudo ndiyoadmin createsessions

This reads the ndiyo.conf file and creates two Upstart scripts in the /etc/event.d directory for each Nivo. They will typically have names like vncsession30 and nivosession30. If you want to, at this point, you can start the services by hand and you should see a login screen on the Nivos concerned. For example:

 $ sudo start vncsession30
 $ sudo start nivosession30

You may not even need that second line - the nivosession scripts should watch for the vncsession ones starting and fire up automatically.

More conveniently, you can start all of the Ndiyo-related sessions in /etc/event.d using:

 $ sudo ndiyoadmin startsessions

and stop them using

 $ sudo ndiyoadmin stopsessions

Stopping a session may not clear the Nivo's display - it will become inactive but it may continue to show the last screen image from the previous session.

You can stop and remove all sessions using:

 $ sudo ndiyoadmin removesessions

And, of course, you can recreate them again from the information in /etc/ndiyo/ndiyo.conf and start them up using:

 $ sudo ndiyoadmin createsessions
 $ sudo ndiyoadmin startsessions

Once created, the sessions should be run automatically by Upstart when the PC boots up.

[edit] Up and running

If all has gone well thus far, you should now have a multi-screen Ndiyo system. If you haven't, then please check the Troubleshooting and FAQ pages, or contact us and we'll try to help.

We hope you enjoy using your Ndiyo system!

Personal tools
wiki navigation
ndiyo project