To run course-related tools and packages (for example the simulator tsim
) on a laboratory computer, execute the following command in a shell prompt:
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
.
Although it is a little complicated, it is possible to run the tools needed for the Java exercises and labs used in the course on computers running Windows. You can do that using Cygwin — a set of tools which runs Unix utilities and libraries on Windows machine.
Go to the cygwin homepage and follow the instructions
X11
you need to install xorg-server
and xinit
Net
you need to install openssh
Click Next
and then Finish
and wait for the installation to complete.
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 (using Cygwin).
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
(or remote12
). Where USERNAME
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. For example you can use:
bash emacs Lab1.java
A window should appear on your screen running the Emacs editor. Running the train simulator is as simple as writing:
bash tsim bana &
If you have a Unix-like operating system (GNU/Linux or macOS) on your computer, you can run all the software for labs 1 and 2 locally.
Start by downloading the tsim
simulator source code and unpack it (e.g., tar -xzf tsim-0.84.tgz
).
Tip: If you do not want to contaminate your file system you could pass --prefix=$PWD/world
or something similar to ./configure
, then everything will end up in $PWD/world
and no root privileges are needed to install the simulator. But make sure to add the bin folder to your $PATH
afterwards.
Install the development libraries for the simulator’s dependencies: Xaw
, Xt
, Xmu
, X11
, and Xext
.
apt-get install libxaw7-dev libxt-dev libxmu-dev libx11-dev libxext-dev
yum install libXaw-devel libXt-devel libXmu-devel libX11-devel libXext-devel
pacman -S libxaw libxt libxmu libx11 libxext
Build and install: cd tsim && ./configure && make && sudo make install && cd ..
Install brew, and then run brew cask install xquartz
and brew install argp-standalone
.
After this step the installation is the same as for Linux, except that you need to pass a few extra flags to ./configure
:
./configure LIBS="-largp" CPPFLAGS="-I/opt/X11/include -I/usr/local/include" \
LDFLAGS="-L/opt/X11/lib -L/usr/local/lib"
When starting tsim
, make sure that XQuartz is running and $DISPLAY
has a reasonable value in the shell you are starting the simulator from (e.g. see echo $DISPLAY
in any XQuartz xterm terminal).
To download Erlang/OTP, go to this webpage and choose the version to install depending on your operating system.
Some operating systems have packages for Erlang, but they often have no support for the GUI libraries that you will need for the labs. Therefore, we recommend you to use the link given above and fetch the right package to install.
An exception are recent (from 14.04 LTS) 64-bit versions Ubuntu, which package Erlang/OTP in a way that is suitable for the labs. To use it, install packges libwxbase2.8-0
, libwxgtk2.8-dev
, libqt4-opengl-dev
, and libgtk2.0-dev
. You can install them, together with Erlang/OTP, by running:
apt-get install libwxbase2.8-0 libwxgtk2.8-dev libqt4-opengl-dev libgtk2.0-dev erlang
Another exception is Mac (using brew):
brew install erlang