keeping remote X11 applications during remote client (i.e. Xserver) computer sleeps/hibernate/suspend

6,062

Solution 1

Try xpra, it should work in a similar way to screen – it also gives some performance improvements over plain x11-over-ssh.

Solution 2

Probably you should try using vnc instead of X11 forwarding. This way your remote session will keep open as long as you like. You'll even have the benefit of using a whole desktop environment instead of just a single application window.

Using this approach you only have to start vncserver on the remote machine. Forwarding whatever local port you like to use to the port used on the remote machine (ssh -Llocal-port:localhost:remote-port) and only allowing local connections on the remote machine there shouldn't be any security penalty in comparison to X11 forwarding.

Share:
6,062

Related videos on Youtube

gcb
Author by

gcb

Updated on September 18, 2022

Comments

  • gcb
    gcb over 1 year

    i'm using using slow but portable computers (asus eeepc, vivobook, etc) and do all my development on a remote server.

    most of the time i just ssh to the server, start a screen session, if anything happens (e.g. client sleep, connection is interrupted, etc) i just connect again and resume my screen session.

    But recently i've been running X applications as part of my development, notability the android emulator. And everytime i put my laptop to sleep and try to resume work, all my X applications died with something similar to:

    XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server "localhost:10.0"
          after 356 requests (356 known processed) with 0 events remaining.
    

    Is there anyway i can have that sort of remote workflow that I have with console applications but with X applications?

  • gcb
    gcb about 11 years
    ouch, vnc versus remote X is very painful. granted, it keeps the state. but the performance/usability penalty is horrendous.
  • mikyra
    mikyra about 11 years
    I've been using it constantly for the purpose you described - working on a much faster machine from a portable. Running in fullscreen mode there isn't any difference in usability to working locally. With plain old core protocol X11 forwarding had some advantage in the past, but today the sides have changed as e.g. extensions like XRender used in font rendering continuously pushing glyph data from client to server make it extremely painful in terms of performance to still use X forwarding. It sure had it's pros int the past, but those days have passed by long long ago. Asked me it's ouch X !
  • gcb
    gcb about 11 years
    all true. i will probably give it a try if xpra does not work out. I just rather have the full colours and local window manager. but in the end, not keeping the session during network down is something that trumps all other things...
  • Angela Ferrell
    Angela Ferrell over 8 years
    +1, I found these instructions helpful: wiki.archlinux.org/index.php/Xpra to start a remote GUI on my linux server, forwarded to my linux client, reboot my linux client, and resume the display of the remote server: server:xpra start :100; DISPLAY=:100 screen; ./myApp client:xpra attach ssh:user@server:100 ... reboot ... xpra attach ssh:user@server:100