Run a GUI in screen or tmux (or alternative)

11,149

Solution 1

There are two aspects to this - the first is having the gui process owned by a process that does not terminate. There are any number of ways to achieve this, but having tmux own the process is "good enough" if it is how you currently work.

The second is having the gui output somewhere. If you want the gui output to both go to the screen of the server the process is running on, and also be able to access it remotely, then x11vnc is a good option and is present in most distributions. All you need is an X11 session, so not a full desktop, just enough of X to display the gui, and x11vnc.

This exposes the X session it is run under as a VNC session, so it can be accessed remotely. Ideally you would do this over ssh, as vnc does not provide much in the way of security.

Solution 2

Look into Xpra, which allows to remote X applications and interrupt the connection. It's very much like "tmux for X".

http://xpra.org/

Share:
11,149

Related videos on Youtube

Robin Alvarenga
Author by

Robin Alvarenga

I'm a Belgian security consultant living in Singapore, I'm here to learn and help others out. Opinions are my own. Advice provided with no warranty. Find me on http://cloud101.eu Sometimes you can have a craving only hands can satisfy!

Updated on September 18, 2022

Comments

  • Robin Alvarenga
    Robin Alvarenga over 1 year

    I have an application that's gui only that constantly needs to run. The problem is that I can't install a full desktop just for this application (my OS is debian and ubuntu cli).

    So I was wondering if there is a way to run this application on the server in something like screen or tmux? So that I can just forward X and continue working with it.

    • Paul
      Paul almost 12 years
      Yes you can do this. Where are you stuck? It will stop working if it loses contact with the Xserver it is forwarding to, is that suitable?
    • Robin Alvarenga
      Robin Alvarenga almost 12 years
      That's my problem actually, I don't want it to stop when I close my local x session. I want it to keep running so I can just 'resume' it later. The app needs to continue running
    • Paul
      Paul almost 12 years
      You can't forward then, you'd need to run a local xserver and use something like x11vnc to access it via vnc (over ssh for security). You don't need a whole desktop, just x11.