Xpra: Ticket #2620: Configurations with weird defaults

Related to r25485

On Ubuntu Bionic:

$ xpra showconfig | grep -P '\((used|default)\)'
encodings             (used)   = 'all'                             <class 'list'>
encodings            (default) = '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'  <class 'list'>
fake-xinerama         (used)   = 'no'                              <class 'str'>
fake-xinerama        (default) =                                   <class 'NoneType'>
pdf-printer           (used)   = ''                                <class 'str'>
pdf-printer          (default) = '/usr/share/ppd/cupsfilters/Generic-PDF_Printer-PDF.ppd'  <class 'str'>
pulseaudio            (used)   = False                             <class 'bool'>
pulseaudio           (default) =                                   <class 'NoneType'>
socket-dirs           (used)   = '/run/$UID/xpra', '/run/xpra'     <class 'list'>
socket-dirs          (default) = '/run/user/$UID/xpra', '/run/xpra'  <class 'list'>

I am leaving commands that I've modified myself below for reference

pings                 (used)   = 3                                 <class 'int'>
pings                (default) = 5                                 <class 'int'>
microphone            (used)   = 'disabled'                        <class 'str'>
microphone           (default) = 'off'                             <class 'str'>
min-quality           (used)   = 20                                <class 'int'>
min-quality          (default) = 30                                <class 'int'>
min-speed             (used)   = 50                                <class 'int'>
min-speed            (default) = 30                                <class 'int'>
speaker               (used)   = 'disabled'                        <class 'str'>
speaker              (default) = 'on'                              <class 'str'>
webcam                (used)   = 'no'                              <class 'str'>
webcam               (default) = 'auto'                            <class 'str'>

Would socket-dirs block me from being able to take connections? The most basic xpra shadow fails sooner (with /:0) or later (without /:0)

$ xpra shadow ssh://u@bionic
$ xpra shadow ssh://u@bionic/:0
xpra for python 2.7 is not installed
 retrying with python3
2020-03-04 16:20:04,589 Xpra GTK3 X11 client version 3.0.6-r25174 64-bit
2020-03-04 16:20:04,667  running on Linux Ubuntu 16.04 xenial
2020-03-04 16:20:04,668  window manager is 'Compiz'
2020-03-04 16:20:04,779 No OpenGL_accelerate module loaded: No module named 'OpenGL_accelerate'
2020-03-04 16:20:05,497 OpenGL enabled with Quadro P400/PCIe/SSE2
2020-03-04 16:20:05,536 Connected (version 2.0, client OpenSSH_7.6p1)
/usr/lib/python3/dist-packages/Crypto/Cipher/blockalgo.py:141: FutureWarning: CTR mode needs counter parameter, not IV
  self._cipher = factory.new(key, *args, **kwargs)
2020-03-04 16:20:05,602 Unable to handle key of type ecdsa-sha2-nistp521
2020-03-04 16:20:05,602 Unable to handle key of type ecdsa-sha2-nistp521
2020-03-04 16:20:05,630 Authentication (publickey) successful!
2020-03-04 16:20:05,957  keyboard settings: model=pc105, rules=evdev, layout=us
2020-03-04 16:20:05,968  desktop size is 6400x1440 with 1 screen:
2020-03-04 16:20:05,969   :0.0 (1693x381 mm - DPI: 96x96) workarea: 6341x1416 at 59x24
2020-03-04 16:20:05,969     DP-0 2560x1440 (597x336 mm - DPI: 108x108)
2020-03-04 16:20:05,969     DP-2 1920x1080 at 2560x180 (527x296 mm - DPI: 92x92)
2020-03-04 16:20:05,970     DP-4 1920x1080 at 4480x180 (527x296 mm - DPI: 92x92)
2020-03-04 16:20:05,970  upscaled to 125%, virtual screen size: 5120x1152
2020-03-04 16:20:05,970   :0.0 (1693x381 mm - DPI: 76x76) workarea: 5073x1133 at 47x19
2020-03-04 16:20:05,971     DP-0 2048x1152 (597x336 mm - DPI: 87x87)
2020-03-04 16:20:05,971     DP-2 1536x864 at 2048x144 (527x296 mm - DPI: 74x74)
2020-03-04 16:20:05,971     DP-4 1536x864 at 3584x144 (527x296 mm - DPI: 74x74)
2020-03-04 16:20:06,056 Warning: invalid frame extents value '[0, 0, 0, 0, 0, 0, 28, 0]'
2020-03-04 16:20:06,056  this is probably a bug in 'Compiz'
2020-03-04 16:20:06,056  using '[0, 0, 28, 0]' instead
2020-03-04 16:21:36,277 Error: failed to receive anything, not an xpra server?
2020-03-04 16:21:36,277   could also be the wrong protocol, username, password or port
2020-03-04 16:21:36,277   or the session was not found
2020-03-04 16:21:36,278 Connection lost

Note that I haven't unlocked the computer yet; I don't know if that changes anything



Wed, 04 Mar 2020 14:40:15 GMT - stdedos:

Without /:0:

$ cat display-\:0.log
2020-03-04 16:19:21,300 Error: failed to connect to display :0
2020-03-04 16:19:21,300  could not connect to X server on display ':0' after 3 seconds

With /:0:

$ cat display-\:0.log
2020-03-04 16:20:06,468 Warning: failed to create socket directory '/run/1000/xpra'
2020-03-04 16:20:06,468  [Errno 2] No such file or directory: '/run/1000/xpra'
2020-03-04 16:20:06,469 Error: failed to create socket '/run/1000/xpra/quartzviewer-Latitude-E6430-0':
2020-03-04 16:20:06,469  [Errno 2] No such file or directory
xpra initialization error:
 failed to create socket /run/1000/xpra/quartzviewer-Latitude-E6430-0

Thu, 05 Mar 2020 05:57:09 GMT - Antoine Martin: status changed

I assume encodings-default "de-references" all to the available encoders?

Yes. Doing so as part of the showconfig command is impossible since we don't know if the encodings are for running the client or the server. (as can be different)

I never set pdf-printer. Is that default picked up at runtime?

This one is special cased because it is very slow to probe. Looking into it.

pulseaudio I've set it to 'no'. I understand that 'no' == False, but should it look like the rest?

No, pulseaudio is a bool, the others are strings that happen to support boolean values as well as strings. (ie: fakexinerama can take a path to the library)

I've never modified socket-dirs. Did you touch that between 3.0.6-r25195-2 and 4.0-20200303r25480-1? (..) Warning: failed to create socket directory '/run/1000/xpra'

It broke in r25404, fixed it in r25503. Updated beta builds will be available shortly. The viable workaround is to set XDG_RUNTIME_DIR.


Thu, 05 Mar 2020 09:30:03 GMT - Antoine Martin: owner, status changed

I never set pdf-printer. Is that default picked up at runtime?

My guess is that you don't have cups-daemon installed, so we don't find the pdf printer files.

Improvements:

@stdedos: installing cups-daemon should fix this problem, the other queries are answered above. Please close the ticket if that works for you.


Thu, 05 Mar 2020 20:31:35 GMT - stdedos:

Replying to Antoine Martin:

pulseaudio I've set it to 'no'. I understand that 'no' == False, but should it look like the rest?

No, pulseaudio is a bool, the others are strings that happen to support boolean values as well as strings. (ie: fakexinerama can take a path to the library)

I'd like to clarify that. So, it is a bool, because there is no reason to support more states (fine by me).

Do you / Would you cast that no to False, or is that undesirable?


Thu, 05 Mar 2020 20:40:59 GMT - stdedos:

Replying to Antoine Martin:

I never set pdf-printer. Is that default picked up at runtime?

My guess is that you don't have cups-daemon installed, so we don't find the pdf printer files.

Improvements:

@stdedos: installing cups-daemon should fix this problem, the other queries are answered above. Please close the ticket if that works for you.

cups-daemon is already installed :/

$ xpra --version
xpra v4.0-r25505
$ dpkg --get-selections  | grep cups-daemon
cups-daemon					install

I'll wait until r25511 lands somewhere if you don't mind.


Thu, 05 Mar 2020 20:41:33 GMT - stdedos:

It broke in r25404, fixed it in r25503. Updated beta builds will be available shortly. The viable workaround is to set XDG_RUNTIME_DIR.

Verified as fixed. xpra-inside-xpra rocks :-D


Sat, 07 Mar 2020 05:22:22 GMT - Antoine Martin:

Do you / Would you cast that no to False, or is that undesirable?

You can't cast the value of the "xinerama" option to a boolean as the value might contain a path. (string) And then the code that uses the value would still have to do its own casting / parsing.

I'll wait until r25511 lands somewhere if you don't mind.

All the latest beta builds have those fixes, the v3.0 backport is in r25513.


Sat, 07 Mar 2020 06:21:37 GMT - stdedos:

Do you / Would you cast that no to False, or is that undesirable?

You can't cast the value of the "xinerama" option to a boolean as the value might contain a path. (string) And then the code that uses the value would still have to do its own casting / parsing.

Cast the pulseaudio=no value to pulseaudio=False


Sun, 08 Mar 2020 05:15:12 GMT - Antoine Martin: status changed; resolution set

Cast the pulseaudio=no value to pulseaudio=False

DOH! Sorry. I don't know why I was looking at fakexinerama when you were clearly talking about pulseaudio!

Anyway, that's fixed in r25542 (+r25543 fixup).

I forgot to mention that booleans can also be set to None to mean 'undefined' / 'automatic'. In the case of pulseaudio, the only difference this makes is that a failure to start pulseaudio will only print a warning if the pulseaudio option is enabled explicitly. showconfig will now correctly show auto as the value.


Sat, 23 Jan 2021 05:56:14 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2620