Install Ubuntu

From emergent
Jump to: navigation, search
Emergent Logo
Installing and Building Emergent
  • Build from source (expert)

Installing, Starting, Upgrading and Uninstalling Emergent

Installing

You can install emergent on Ubuntu using apt-get but first you need to add our repository. To do that first become root by entering this into your terminal followed by your password:
sudo su
Next make sure you are using the bash shell:
bash

Add the public key to your keyring. We sign our packages so you can be sure that you are getting emergent and not malicious software. You can install without the key but it is easy to be safe.

apt-key adv --keyserver pgp.mit.edu --recv-key 6CD895FFA313E824

Next add emergent's repository to your system. This will update any previous entry you had for emergent, so if you have upgraded your version of Ubuntu you should run this code again. Highlight the following code, right click, and select copy. Then right click on your terminal, select paste and finally press enter.

sed -i 's/deb .*grey.colorado.edu.*$//' /etc/apt/sources.list
cat>>/etc/apt/sources.list<<Emergent
deb https://grey.colorado.edu/ubuntu $(grep CODENAME /etc/lsb-release | cut -f2 -d=) main
Emergent

You're now ready to install emergent. Just run these commands:

apt-get update
apt-get install emergent
Lastly, you should exit the root user. Just enter
exit

Note for Linux Mint Users: Replace the Mint release name in sources.list with the codename of Ubuntu that your Mint release is based on.

Starting

From the command line just type
emergent

NOTE: On Ubuntu 12.4 (Precise) you will see an error when you start emergent: "Unable to load library icui18n" -- this is due to a bug in Qt 4.8.1 and may be safely ignored.

Upgrading

First become root by entering this into your terminal followed by your password:
sudo su

Finally update your package cache and install emergent:

apt-get update
apt-get install emergent

If you run into any problems, first uninstall emergent, and then try reinstalling it. If that doesn't fix it for you please e-mail the emergent-users mailing list.

Uninstalling

Run this code in your terminal followed by your password:
sudo apt-get remove emergent

Optional steps

Ensure you have the correct video driver

Follow these instructions on the Ubuntu community wiki in order to ensure you have the most advanced, up to date drivers for your particular video card.

Software OpenGL (mesa)

If you have an old video card or are running emergent on a computer without a video card you can still get it to work using a software implementation of OpenGL. It will be slower since it uses the CPU to render but it will work. First become root:

Note: As of Lucid Lynx these instructions are no longer required - it happens correctly and automatically. However, if you are running Karmic or earlier they are necessary.

sudo su

Next paste the following code into your terminal to install mesa:

cd /tmp
apt-get download libgl1-mesa-swx11
dpkg -x libgl1-mesa-swx11*deb libgl1-mesa-swx11
cp -r libgl1-mesa-swx11/usr/lib/* /usr/local/lib/

To complete this process, you will also need to change your library path as indicated in the section below. Before you do that, exit the root user.

exit

Change Your Library Path

If you are using the mesa drivers or are building from source, you will need to permanently change your path to look in /usr/local/lib before /usr/lib so that newer libraries are used.

Then paste this code into your terminal to update your library path in your ~/.bashrc file.

cat >>~/.bashrc<<Emergent
export LD_LIBRARY_PATH=/usr/local/lib:/lib:/usr/lib
Emergent

Finally, you will need to run this command to update your shell environment:

source ~/.bashrc

You may need to repeat these steps after upgrading your version of Ubuntu.

Add an Emergent Icon to the Startup Menu

First become root:
sudo su

Next paste this into your terminal:

echo Creating /usr/share/applications/Emergent.desktop K menu item
cat > /usr/share/applications/Emergent.desktop <<Emergent

[Desktop Entry]
Categories=Education;
Exec=env LD_LIBRARY_PATH=/usr/lib /usr/bin/emergent %f
GenericName=Neural Network Simulation Software
Hidden=false
Icon=/usr/share/Emergent/images/emergent_32x32.png
Icon[en_US]=/usr/share/Emergent/images/emergent_32x32.png
Name=Emergent
Name[en_US]=Emergent
StartupNotify=true
Terminal=false
Type=Application
X-KDE-SubstituteUID=false
Comment[en_US]=Neural Network Simulation Software
Comment=Neural Network Simulation Software

Emergent

echo Creating /etc/xdg/menus/emergent.menu for application menu item
cat > /etc/xdg/menus/emergent.menu <<Emergent

<Menu>
 <Menu>
  <Name>Education</Name>
  <Layout>
   <Merge type="files" />
   <Filename>Emergent.desktop</Filename>
  </Layout>
  <Include>
   <Filename>Emergent.desktop</Filename>
  </Include>
 </Menu>
</Menu>

Emergent

In KDE, you can now navigate to K Menu > Edutainment > Miscellaneous > Emergent and drag that to your panel if you like. On Gnome it shows up in Menu > Education > Emergent.

Crash in svn operation within emergent: remove kwallet integration with svn

If svn-based operations within emergent crash, try this, to disable the kwallet integration of SVN: set the following config option in your .svn/config file:

password-stores = gnome-keyring

i.e. remove kwallet from the list of password-stores

Debugging Crashes and Known Issues

Conflict with Qt4

Emergent will crash if you build it against Qt version 5 and then somehow it ends up linking Qt4 libraries at runtime. Do:

 lldd `which emergent`

to see which libraries emergent is linking against -- if you see libQt*.4 then this is the source of the problem.

Most likely culprit is the quarter library. Currently investigating how to fix.