5

I am locally on a machine without root rights. X forwarding is disabled.

Remotely I am running a process on a machine without a screen, using the Xvfb virtual framebuffer which simulates an X server but discards any image displayed. This works reasonably well.

Now, some things are not working, and I need to debug by looking at the X screen. I did take a screenshot in Xvfb with xwd -display :99 -root -out /tmp/screenshot.xwdump but it is quite complicated to look at many of them in a sequence.

Is there a way to connect with from my client to the server, and then connect to the framebuffer in order to display the remote X window locally?

This could be a second ssh channel. The X program should ideally keep on running after disconnecting and I would like to be able to start it before the second connection if possible (think spice).

I only have outgoing connections to the server, and only to port 22. On neither machine root rights are available.

PS: This question is similar to Running programs over ssh but my requirement is that no program can be installed as root on client or server which seems to rule out xpra (the answer given there) unless I find an easy way to use it.

6
  • 1
    Possible duplicate of Running programs over ssh May 5, 2018 at 16:49
  • @StephenKitt Well, in a way, yes, as @mviereck's answer points out. I am, however, hoping for an easier solution as xpra seems very difficult to install as non-root from src (which needs libraries that are not installed).
    – Ned64
    May 5, 2018 at 17:37
  • ffmpeg can create a video from your desktop: trac.ffmpeg.org/wiki/Capture/Desktop
    – mviereck
    May 5, 2018 at 19:19
  • Maybe I’m misunderstanding the problem. Is your local machine an X server? Do you know about setting DISPLAY or using --display? If so, what happens when you do so? May 5, 2018 at 22:58
  • There are alternatives to Xpra like VNC/RDP with an X server, but they also require compiling/installation of a non-trivial amount of stuff. As you need to compile/install something X server related, I don't think there's a way to avoid this. Alternative: Make the X clients on your remote machine not connect to Xvfb, but set DISPLAY so they connect to some X server on your local machine (which you can simply install with root rights).
    – dirkt
    May 6, 2018 at 6:18

1 Answer 1

5

xpra is your friend: http://xpra.org/. Install xpra on server and client.

Start xpra server over ssh with

xpra start-desktop ssh:user@server:XVFBDISPLAY --use-display --start-via-proxy=no

Alternatively: If you are already logged in to the server, you can start xpra server with

xpra start-desktop :XVFBDISPLAY --use-display --start-via-proxy=no

Start xpra on client with

xpra attach ssh:server:XVFBDISPLAY

You can detach and reattach later again:

xpra detach ssh:server:XVFBDISPLAY

(Replace XVFBDISPLAY with the display number of Xvfb.)

6
  • Thanks, that could be it. However, I was hoping to have something easier to install without root rights. Looks like it even needs libraries which is always a pain in user space.
    – Ned64
    May 5, 2018 at 17:34
  • You are talking about Xvfb's screen. Does that mean I run both Xfvb and xpra?
    – Ned64
    May 5, 2018 at 17:38
  • 1
    @Ned64 Yes, xpra attaches to the already running Xvfb display. Without option --use-display it would set up Xvfb (or Xdummy) on itself.
    – mviereck
    May 5, 2018 at 17:40
  • @Ned64 Maybe it is possible to compile xpra with statically linked libraries? Though, it may become a colossal binary. You can ask for this at xpra.org, the developer is quite helful.
    – mviereck
    May 5, 2018 at 17:43
  • Thanks. I will vote your answer up because it very likely solves the problem technically even if I cannot test it very soon due to the complexity involved.
    – Ned64
    May 5, 2018 at 17:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .