xpra icon
Bug tracker and wiki

Opened 3 months ago

Last modified 6 days ago

#2193 assigned defect

proxy start should not set encodings

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 3.0
Component: core Version: 2.4.x
Keywords: Cc:

Description

As per #2180, the server start command includes the list of encodings that the client supports.
We should leave this empty unless the client specified them explicitly on the command line (distinguishing the two is the hard part) otherwise the server may start with a more restricted set of encodings and subsequent clients won't be able to use all encodings.

Change History (3)

comment:1 Changed 6 days ago by Antoine Martin

Status: newassigned

Easy to reproduce:

  • proxy:
    sudo python3 /usr/bin/xpra proxy --bind-tcp=0.0.0.0:10000 \
        --auth=allow --no-daemon -d proxy,exec --bind=/run/xpra/system --socket-permissions=666
    
  • start via proxy:
    xpra start --start=xterm --start-via-proxy=true
    

The resulting server process:

/usr/bin/python3 /usr/bin/xpra start \ --chdir=/home/antoine/projects/Xpra/trunk/src --attach=no \
    --encodings=h264,vp9,vp8,mpeg4,mpeg4+mp4,h264+mp4,vp8+webm,vp9+webm,png,png/P,png/L,webp,rgb,rgb24,rgb32,jpeg,h265,mpeg1,mpeg2 \
    --video-encoders=all --csc-modules=all --video-decoders=all \
    --compressors=lz4, lzo, zlib, brotli \
    --packet-encoders=rencode, bencode, yaml --start=xterm \
    --env=XPRA_PROXY_START_UUID=a62c7b8cfd884dbdb86ad17d6b966387 \
    --daemon=yes --systemd-run=no --uid=1000 --gid=1000 --displayfd=13

comment:2 Changed 6 days ago by Antoine Martin

The start-new-session dict sent to the proxy contains:

{
'mode': 'start', 'start-env': ["#avoid .. GTK_CSD=0'], 'encoding': 'auto', \
'encodings': ['h264', 'vp9', 'vp8', 'mpeg4', 'mpeg4+mp4', 'h264+mp4', 'vp8+webm', 'vp9+webm', 'png', 'png/P', 'png/L', 'webp', 'rgb', 'rgb24', 'rgb32', 'jpeg', 'h265', 'mpeg1', 'mpeg2'], \
'min-quality': 30, 'min-speed': 30, 'compression_level': 1, 'video-scaling': 'auto', \
'title': '@title@ on @client-machine@', 'clipboard': 'yes', 'clipboard-direction': 'both', \
'input-method': 'none', 'microphone': 'off', 'speaker': 'on', 'fake-xinerama': True, \
'resize_display': True, 'keyboard-sync': True, 'cursors': True, 'bell': True, 'notifications': True, \
'xsettings': True, 'system-tray': True, 'windows': True, 'webcam': 'auto', 'html': 'auto', \
'av-sync': True, 'global-menus': True, 'forward-xdg-open': True, 'modal-windows': True, \
'bandwidth-detection': True, 'ssh-upgrade': True, 'printing': 'no', 'file-transfer': 'auto', \
'open-command': '/usr/bin/xdg-open', 'open-files': 'auto', 'open-url': 'auto', 'start-new-commands': True, \
'mmap': 'yes', 'mmap-group': 'auto', 'mdns': True, 'bind': ['auto'], 'rfb-upgrade': 5, \
'bandwidth-limit': 'auto', 'start': ['xterm'], 'chdir': '/home/antoine/projects/Xpra/trunk/src'
}
Clearly lots of things we don't need to be sending.

comment:3 Changed 6 days ago by Antoine Martin

Mostly done in r22729 (client-side fix) by only sending options when their values differ from the default config.

We still need to do something similar proxy-side:

/usr/bin/python3 /usr/bin/xpra start --chdir=/home/antoine/projects/Xpra/trunk/src \
    --attach=no --encodings=all --video-encoders=all --csc-modules=all --video-decoders=all \
    --compressors=lz4, lzo, zlib, brotli --packet-encoders=rencode, bencode, yaml \
    --start=xterm --env=XPRA_PROXY_START_UUID=8523b7547812495ebeea0c632b3d9923 \
    --daemon=yes --systemd-run=no --uid=1000 --gid=1000 --displayfd=13
Note: See TracTickets for help on using tickets.