0

I'm succeeding in running remote applications in local windows when the remote server is on the same LAN as the ssh client. However, when I attempt to accomplished this on remote servers that are outside of my LAN, the X11 forwarding performance is extremely slow.

For example, I played Solitaire (in a local window) from a remote server like this:

ssh -X [email protected] sol

I was expecting this to be as performant as RDP protocol (for example), but apparently RDP is way more efficient than X11 forwarding (unless I'm doing it wrong).

When I move a card, from one side of the screen to the other and drop it. Instead of X11 forwarding skipping unnecessary frames, it slowly lags so that all of that card travel is displayed pixel by pixel (delaying my game play).

In RDP, there are settings where I can tell it to just show me the latest frame, and to skip any transitory effects.

Are there some arguments or settings that I can change, so that X11 forwarding will do this same type of optimization? Instead of getting behind on what happens graphically, I'm only interested in how the application looks "right now" at any given time, and I'm totally OK with it skipping frames in order to show me how things look as real-time as possible.

Please advise.

muru
  • 69,900
  • 13
  • 192
  • 292
Lonnie Best
  • 4,895
  • 6
  • 27
  • 42
  • One thing I tried, to increase performance, was specifying compression `-C` for the ssh connection: `ssh -XC [email protected] sol`. This helps some, but the biggest issue is that X11 forwarding tries to show too many frames, instead of skipping frames like I want. – Lonnie Best Oct 10 '22 at 20:38
  • 1
    Hargh… to late!. OK I Condidering your comment I delete my answer. Did you try using other compression algos via the -c option ? – MC68020 Oct 10 '22 at 20:59
  • @MC68020 No, I haven't tried that yet. I wonder if one of the algorithms would achieve the frame skipping I'm hoping for. You see, if could get it to just show me the latest frame every second or so, that would be very performant (even on lower bandwidth connections, like I'm dealing with as I test this). For RDP, I use `GFX AVC444 (32 bpp)`. Maybe something similar is possible for ssh. – Lonnie Best Oct 10 '22 at 21:13
  • Stephen Kitt recommended Xpra [here](https://unix.stackexchange.com/a/468450/40149). It looks promising. – Lonnie Best Oct 11 '22 at 19:55

1 Answers1

0

You should look at dxpc (https://linux.die.net/man/1/dxpc) which is a dynamic X11 protocol compressor.

It does a better job of reducing traffic over your network link because it uses intrinsic knowledge of the protocol to cache op codes on each side. This is very analogous to VJ compression (https://en.wikipedia.org/wiki/Van_Jacobson_TCP/IP_Header_Compression).

It results in just sending a reference into a table to re-use repeated data and is more efficient than using a generic compression algorithm on your traffic.

brunson
  • 179
  • 5
  • Seems promising, but I haven't yet figured out how to install it. `sudo apt install dxpc` yields `E: Unable to locate package dxpc` in both Debian and Ubuntu. This [article](https://laramatic.com/install-dxpc-on-a-debian-ubuntu-fedora-and-raspbian/) claims it should be there. Also `apt-cache search "dxpc"` returns nothing despite several articles advising that dxpc should be in the repository. How do you install it? – Lonnie Best Oct 11 '22 at 01:17
  • 3
    That site is a lot of automatically-generated rubbish. dxpc [was removed from Debian](https://bugs.debian.org/783894) a while ago because [it doesn’t support widely-used X11 extensions](https://bugs.debian.org/764276). – Stephen Kitt Oct 11 '22 at 04:43
  • @StephenKitt Good to know, thanks. – brunson Oct 11 '22 at 15:40
  • @brunson you’re welcome! To be clear, the site I was referring to is the site linked in Lonnie Best’s comment, not those in your answer. – Stephen Kitt Oct 11 '22 at 16:38
  • @StephenKitt Thanks for the information. It's a shame that x11 forwarding hasn't evolved to become an efficient way to run remote applications in local windows. I'm in love with the idea of it, but its practically unusable at ADSL internet speeds (while RDP works just fine, even on dial up internet speeds). The latency I'm experiencing at [2.7mb](http://www.lonniebest.com/DataUnitConverter/#2.7Mbit) down and [0.5](http://www.lonniebest.com/DataUnitConverter/#0.5Mbit) up is way more than I'd imagine for a technology that's been around as long as this. – Lonnie Best Oct 11 '22 at 17:43