cisTEM detaching and re-attaching sessions


Albert Xu








In cisTEM when you close the main window, all running jobs are terminated. Xpra is a window server that saves the state of graphical applications so that you can detach from your cisTEM session and have it run in the background. “Xpra is an open-source multi-platform persistent remote display server and client for forwarding applications and desktop screens. … it allows you to run programs, usually on a remote host, direct their display to your local machine, and then to disconnect from these programs and reconnect from the same or another machine, without losing any state.”

Installing Xpra on Linux

1. Download the Xpra repository information into your system’s package manager folder.

For our Centos 7 system,

sudo bash -c "curl > /etc/yum.repos.d/xpra.repo"

Xpra also supports Fedora, Debian, and Ubuntu. For Debian and Ubuntu, the package manager folder is /etc/apt/sources.list.d

  1. Install

For Centos and Fedora,

sudo yum install xpra

For Debian and Ubuntu,

sudo apt install xpra

Usage Examples

  1. Log into the cisTEM computer from your remote computer. You will need less strict X forwarding with the -Y option.

ssh -Y username@ipaddress
  1. Start a cisTEM process using xpra. You will need to choose a sessionID number. I arbitrarily chose 100.

xpra start :100 --start-child=cisTEM

Hit enter one more time, and now the session has been created in the background. You will have to attach to it.

  1. Attach to the session. From the cisTEM computer,

xpra attach :100

and the cisTEM window should open. If there is only one session, you don’t need the :100

4. Detach from the session. From the command line, hit Ctrl-C and the window will disappear.


when re-attaching: Usually remote connections from outside the local network are laggy. Fortunately, Xpra has compressions to lessen the amount of bandwidth. To enable compression when reattaching, do

xpra attach --encoding=rgb --compress=1

This is the recommended way from