1   Remote Access

Sometimes you may want to test only a slight change in your code, so it would be more convenient to do this remotely. Therefore we provide you with an access to the WindRiver Workbench that is running on university computers.

There are two possibilities how to work remotely with GUI applications:

  • Xpra-based access, which works over slower networks and from all operating systems. Additionally, it allows to reconnect to the running application when your computer disconnects for whatever reason.
  • X11 forwarding via SSH, which requires fast and low-latency network connection and is well supported only on Unix-based systems.

2   Server Ritchie

An instance of WindRiver Workbench is accessible on server Ritchie, that is located in Dejvice. It supports only connections using Xpra.

Xpra is an open-source multi-platform persistent remote display server and client for forwarding applications and desktop screens. It gives you remote access to individual applications or full desktops. It is available for Windows / Mac OS X / Linux.

To connect to the server, open up xpra_launcher and use these settings:

Mode: SSH
Server: <username>@ritchie.ciirc.cvut.cz:22
Server Password: <CVUT password>

Alternatively, you can use a oneliner from your terminal:

xpra attach ssh://<username>@ritchie.ciirc.cvut.cz

3   Labs

Usually, WindRiver Workbench can be accessed from computers in the lab KN:E-2. However, Workbench is also installed on computers in the lab KN:E-23, which can be easily reached remotely. On this page, you will learn how.

3.1   Powering on (and connecting to) the lab computer

Independently of the used method, you have to power-on a lab computer:

  1. Open a SSH connection to server postel (using terminal or using a 3rd party application like PuTTY):

    $ ssh -X student@postel.felk.cvut.cz
    

    Parameter -X is used for forwarding X-server, and name student is used as a gateway into the network. The password is xxx.

  2. When asked, reply the server with your CVUT login. (It is also used as a simple authentication.)

  3. After verifying your name, server responds with list of available laboratories. Select KN:E-23.

  4. The server selects one of the computers and it asks for confirmation (press y<Enter>) to power this computer on (in case it is turned off). After this, a 60-second delay follows up, leaving enough time for the computer to fully boot up.

  5. Access to the lab computer is finalized by supplying your CVUT password.

Note

At this point the default shell is accessible on the lab computer. Within your terminal you will see a line similar to this:

sojkam1@k23-178:~$

This is <username>@<computer_name>:~$. You will use the computer name when connecting to the computer via methods written below.

3.2   Using Xpra

Xpra is an open-source multi-platform persistent remote display server and client for forwarding applications and desktop screens. It gives you remote access to individual applications or full desktops. It is available for Windows / Mac OS X / Linux.

3.2.1   Connecting to Xpra server

At first, turn on the computer using the instructions above. Then, start the Xpra client on your computer and connect to the server on the lab computer using these settings:

Mode: SSH -> SSH
Proxy: <username>@postel.felk.cvut.cz:22
Proxy Password: <CVUT password>
Server: <username>@<computer_name>:22:<blank>
Server Password: <CVUT password>

Target server name <computer_name> is visible in the terminal after the turning on of the lab computer is successful. The display number is left blank. The Xpra server is started automatically on the target computer. An example of these settings can be seen on this screenshot:

xpralauncher

3.2.2   Closing the Xpra session

When finishing your work on the lab computer, close your session using Log Out button, which is located in the menu in the top-right corner.

3.2.3   Advanced usage of Xpra

Warning

This section is left here in case you will encouter some issues with the method described above. Refer to it only if the connection with unspecified display number fails, which is most likely caused by running multiple instances of Xpra on a single lab computer (as a one user).

First, power on and connect to the lab computer over SSH (below, in X11 forwarding over SSH). When using Xpra, you do not have to use the -X option in the ssh command. Also, omit the last argument when running the command. (Otherwise the Workbench is launched and the shell is not available to you.)

On the lab computer start xpra with this command:

$ remote-desktop start xpra

At this point the computer responds with multiple lines of output. The only interesting part for you is (where <display_number> is an integer):

Actual display used: :<display_number>

Currently active sessions can be tracked using:

$ remote-desktop list

Both commands print out the number of X11 display used for remote desktop. You need to supply this number to your Xpra client.

To turn off the Xpra session use the following command:

$ remote-desktop stop <display_number>

In order to show help for the remote-desktop command, run it without the arguments:

$ remote-desktop

3.3   X11 forwarding over SSH

The most straightforward method to work with Workbench remotely is using X11 forwarding over SSH. First, you have to find available computer (and power it on as described above).

3.3.1   Starting up the WindRiver Workbench

Workbench can be started using the following command:

$ /opt/WindRiver/startWorkbench.sh

3.3.2   Oneliner to run the Windriver Workbench

After you have powered on a computer, you can use following command to start the Workbench in one command:

$ ssh -X -J <username>@postel.felk.cvut.cz <username>@<computer_name> /opt/WindRiver/startWorkbench.sh

For example:

$ ssh -X -J sojkam1@postel.felk.cvut.cz sojkam1@k23-192 /opt/WindRiver/startWorkbench.sh

In case that you have older OpenSSH (which does not support -J), this command can be used instead:

$ ssh -X -o ProxyCommand="ssh -W %h:%p <username>@postel.felk.cvut.cz" <username>@<computer_name> /opt/WindRiver/startWorkbench.sh

3.4   Using Xspice

As an alternative to xpra, Xspice (that is available for Linux / Windows / OS X / Android) can be used. You can download it here: https://www.spice-space.org/download.html.

3.4.1   Starting the server part

Starting the server is almost the same as for xpra.

On the lab computer start xspice using this command:

$ remote-desktop start xspice

When asked, supply some unused and not personal password. Currently active sessions can be tracked using:

$ remote-desktop list full

This commands outputs the display number (:N at the beginning) and also Xspice port. Port is used for the connection.

3.4.2   Connecting to server

Open the terminal and open a ssh connection to the lab computer:

$ ssh -fN -L <random_port>:<computer_name>:<Xspice_port> <username>@postel.felk.cvut.cz

Where <random_port> is any unused number above 1024. Start the Xspice using:

$ spicy -h localhost -p <random_port> -w <Xspice_password>