To be able to run any course related tools and packages (for example TSim) you need to first run the following command:
$ setup_course tda381
Note that the old course code TDA381 is used here.
You are strongly encouraged to test your lab solutions on a multi-processor or
multi-core machine, for example remote11.chalmers.se
or remote12.chalmers.se
.
Windows computers (for Java exercises/labs)
Although it is a little complicated, it is possible to run the tools needed for the Java-related exercises and assignments used in the course. It relies on having Cygwin installed. Cygwin is a set of tools which makes your Windows machine more unix like.
Installing Cygwin
Go to the cygwin homepage and follow the instructions
At some point, Cygwin will show you a big meny of additional things to install. You need to install the following things:
- Under the menu X11 you need to install xorg-server and xinit.
- Under the menu Net you need to install openssh Click Next and the Finish and you're done installing!
Erlang
To download Erlang/OTP, simply go to this webpage and choose the version to install depending on your machine operating system.
Some GNU/Linux distributions have packages for Erlang which have removed the support for the graphical interface that you will need for the labs (e.g., Ubuntu). Therefore, we recommend you to use the link given above and fetch the package for your distro there.
Update: it is possible to use a 64-bit version of Erlang/OTP for CCHAT in Ubuntu
To use it in Ubuntu you need these packages to be installed: libwxbase2.8-0 libwxgtk2.8-dev libqt4-opengl-dev libgtk2.0-dev
. For example you can install them by running:
# apt-get install libwxbase2.8-0 libwxgtk2.8-dev libqt4-opengl-dev libgtk2.0-dev
This was tested with Ubuntu 14.04.
Remotely running the course tool
In this section we are going to describe how to run the course tools from a server on Chalmers but having the windows displayed on your local Windows computer.
Click on the Windows start menu and choose Cygwin-X and then XWin Server. A window with a shell will open.
In the new window type
ssh -Y USERNAME@remote11.chalmers.se
(orremote12
). WhereUSERNAME
is your username on Chalmers computers. You might get questions about RSA fingerprints and you can just answer yes to that question. Then you will be prompted about your password.You are now logged into Chalmers with the additional benefit that you can have windows show up on your screen. You probably want to start and editor first. You can do that as follows:
emacs Lab1.java
A window should appear on your screen running Emacs. Running the train simulator is as simple as writing:
tsim bana &
Getting started with lab 1 in your own machine (Only Linux and OSX)
Go to the downloads section of lab1 and download the example, the map, the TSim interface, the simulator source code and the source code.
Install development libraries for the simulator's dependencies: Xaw, Xt, Xmu, X11 and Xext.
- On Ubuntu, Mint, anything else Debian:
sudo apt-get install libxaw7-dev libxt-dev libxmu-dev libx11-dev libxext-dev
- On Fedora, RHEL, OpenSUSE:
sudo yum install libXaw-devel libXt-devel libXmu-devel libX11-devel libXext-devel
- On Arch:
sudo pacman -S libxaw libxt libxmu libx11 libxext
- On OSX: install XQuartz from http://xquartz.macosforge.org/landing/
- On Ubuntu, Mint, anything else Debian:
Unpack the tsim source code:
tar -xzf tsim-0.84.tar.gz
Build and install tsim:
cd tsim-0.84 && ./configure && make && sudo make install && cd ..