wiki:Workshops/SigComm2022/RemoteGraphics

Methods for running graphical applications remotely

Because SSH is a text-based interface, we need additional tools to run graphical applications such as gnuradio companion or mininet on the machines in the testbed. There are several options available: X forwarding, chrome remote desktop, and vnc over an ssh tunnel (we will not discuss this option here, but anyone who is familiar with this method should feel free to use it).

X Forwarding

X11 is the default windowing system on linux systems. Graphical applications on linux are X11 clients which communicate with the X server software, which is what renders the clients onto the screen and handles requests from the clients for user input. The communication between client applications and an X server can be forwarded over an ssh session, which is how X forwarding displays remote applications— the application runs on the remote machine, but uses the ssh session to communicate with an X server on your local machine.

Linux

If you are using linux, you shouldn't need to install anything to use X forwarding, because you're already running an X server on your local machine. You simply have to run your ssh session using the -Y flag on the command line:

ssh -Y -t cosmos-user@sb.cosmos-lab.org

Keep in mind that you will have to use the flag for each ssh command you use, so if you ssh to a console and then from the console to the node, you will have to use the flag in both ssh commands in order to forward the applications all the way back to your local machine.


Windows

In addition to ssh client, remote X11 access on Windows requires installation of X11 Server. There are a number of open source or free servers available including:

  1. VcXsrv
  2. Xming
  3. mobaXterm (includes ssh client)

As an illustration, we will use configuration based on Putty and VcXsrv and connect with remote graphics capability to the node1-1.sb1:

  • Install Putty and make sure you can log into ORBIT gateway or console
  • Install VcXsrv and make sure it is running say on display 1 (without any applications)
  • Start Putty and load the appropriate session
  • Configure X11 forwarding under "Connection→SSH→X11":
    • Check mark on "Enable X11 forwarding"
    • Set "X display location" to: 127.0.0.1:1 (note matching display number)
  • Save the session
  • Open the session to SB1 i.e. connect to the console.sb1.orbit-lab.org
  • On the console execute
      ssX -Y -t root@node1-1
    

and connect to the node.


Mac

Mac users will need to install and run the XQuartz X server application. Then you will run your ssh commands with the -Y flag to enable X forwarding:

ssh -Y -t cosmos-user@sb.cosmos-lab.org


Chrome Remote Desktop

Chrome Remote Desktop is a remote desktop software from Google which allows you to interact with a desktop session on a remote machine from your browser. Note that using this method will link the remote desktop sessions to your google account. You'll never need to provide information about your account to the remote machine, but you'll only be able to connect to it with remote desktop by using the client in your browser while you are signed in to your google account.

  1. Go to this link https://remotedesktop.google.com/headless/ and click begin. You can skip downloading and installing remote desktop to your node— it will already be installed. Follow the steps until you reach the command to start the remote desktop session.
  2. In your ssh session, type su sigcomm to switch to operating as the sigcomm user. Chrome remote desktop will not work if run by the root user.
  3. Copy the command to start the remote desktop session and paste it into your ssh session. You will be prompted to enter a pin.
  4. Go to https://remotedesktop.google.com/access/. You should see the machine you just set up. When you open a session to it, you will have to enter the pin you created in the previous step.
Last modified 2 years ago Last modified on Aug 19, 2022, 10:21:45 PM
Note: See TracWiki for help on using the wiki.