xpra icon
Bug tracker and wiki

Opened 6 months ago

Closed 6 months ago

#2541 closed defect (fixed)

getXkbProperties fails on additional X screens while attaching

Reported by: habex Owned by: Antoine Martin
Priority: major Milestone: 4.0
Component: client Version: 3.0.x
Keywords: getXkbProperties Cc:

Description (last modified by Antoine Martin)

File "xpra/x11/bindings/keyboard_bindings.pyx", line 441, in xpra.x11.bindings.keyboard_bindings.X11KeyboardBindingsInstance.getXkbProperties
TypeError: a bytes-like object is required, not 'str'

Xpra attach works well on default X screen (:0.0) on Xubuntu 18.04 with multiple X screens:

$ xpra --version
xpra v3.0.4-r24778
$ echo $DISPLAY
:0.0
$ xpra attach :57       
Error: cannot handle window transparency
 screen is not composited
Error: cannot handle window transparency
 screen is not composited
Warning: window 4294967295 changed its transparency attribute
 from False to True, behaviour is undefined
2020-01-06 16:18:00,924 Warning: all the compressors are disabled,
2020-01-06 16:18:00,925  unless you use mmap or have a gigabit connection or better
2020-01-06 16:18:00,925  performance will suffer
2020-01-06 16:18:00,925 Xpra GTK3 X11 client version 3.0.4-r24778 64-bit
2020-01-06 16:18:00,997  running on Linux Ubuntu 18.04 bionic
2020-01-06 16:18:00,998  window manager is 'Xfwm4'
2020-01-06 16:18:01,371 GStreamer version 1.14.5 for Python 3.6.9 64-bit
2020-01-06 16:18:01,460 OpenGL_accelerate module loaded
2020-01-06 16:18:01,463 Using accelerated ArrayDatatype
2020-01-06 16:18:01,588 Error: cannot handle window transparency
2020-01-06 16:18:01,588  screen is not composited
2020-01-06 16:18:01,673 OpenGL enabled with llvmpipe (LLVM 8.0, 256 bits)
2020-01-06 16:18:01,920  keyboard settings: rules=evdev, model=pc105, layout=hu
2020-01-06 16:18:01,921  desktop size is 1024x1280 with 1 screen:
2020-01-06 16:18:01,922   :0.0 (271x339 mm - DPI: 95x95) workarea: 1024x1239
2020-01-06 16:18:01,922     DVI-D-0 (376x301 mm - DPI: 69x108)
Gtk-Message: 16:18:02.307: GtkDialog mapped without a transient parent. This is discouraged.
2020-01-06 16:18:05,574  keyboard settings: rules=evdev, model=pc105, layout=hu
2020-01-06 16:18:05,588  desktop size is 1024x1280 with 1 screen:
2020-01-06 16:18:05,588   :0.0 (271x339 mm - DPI: 95x95) workarea: 1024x1239
2020-01-06 16:18:05,589     DVI-D-0 (376x301 mm - DPI: 69x108)
2020-01-06 16:18:05,837 enabled fast mmap transfers using 256MB shared memory area
2020-01-06 16:18:05,837 enabled remote logging
2020-01-06 16:18:05,838 Xpra GTK3 X11 server version 3.0.4-r24778 64-bit
2020-01-06 16:18:05,838  running on Linux Ubuntu 18.04 bionic
2020-01-06 16:18:05,838 compression disabled: no matching compressor found
2020-01-06 16:18:05,847 Attached to socket:///run/user/1000/xpra/x2-57
2020-01-06 16:18:05,847  (press Control-C to detach)

2020-01-06 16:18:06,220 sound output found 3 audio output devices:
2020-01-06 16:18:06,220 sound output  * SoundBlaster MP3+ Analog Stereo
2020-01-06 16:18:06,221 sound output    alsa_output.usb-041e_USB_Audio-00.analog-stereo
2020-01-06 16:18:06,221 sound output  * Built-in Audio Digital Stereo (IEC958)
2020-01-06 16:18:06,221 sound output    alsa_output.pci-0000_00_1f.3.iec958-stereo
2020-01-06 16:18:06,221 sound output  * GP106 High Definition Audio Controller Digital Stereo (HDMI 2)
2020-01-06 16:18:06,221 sound output    alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1
2020-01-06 16:18:06,221 sound output  to select a specific one,
2020-01-06 16:18:06,221 sound output  use the environment variable 'XPRA_PULSE_SINK_DEVICE_NAME'
2020-01-06 16:18:06,221 sound output using default pulseaudio device
2020-01-06 16:18:06,322 server does not support xi input devices
2020-01-06 16:18:06,322  server uses: xtest
2020-01-06 16:18:06,736 sound output using 'opus' audio codec
^C

2020-01-06 16:18:21,296 got signal SIGINT
2020-01-06 16:18:21,296 sound output got signal SIGINT
2020-01-06 16:18:21,296 exiting
2020-01-06 16:18:21,297 sound output stopping
}}}}

However it does not on other screens, eg.
{{{
$ echo $DISPLAY
:0.1
$ xpra attach :57
Error: cannot handle window transparency
 screen is not composited
Error: cannot handle window transparency
 screen is not composited
Warning: window 4294967295 changed its transparency attribute
 from False to True, behaviour is undefined
2020-01-06 16:20:05,074 Warning: all the compressors are disabled,
2020-01-06 16:20:05,074  unless you use mmap or have a gigabit connection or better
2020-01-06 16:20:05,074  performance will suffer
2020-01-06 16:20:05,074 Xpra GTK3 X11 client version 3.0.4-r24778 64-bit
2020-01-06 16:20:05,147  running on Linux Ubuntu 18.04 bionic
2020-01-06 16:20:05,148  window manager is 'Xfwm4'
2020-01-06 16:20:05,517 GStreamer version 1.14.5 for Python 3.6.9 64-bit
xpra main error:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/scripts/main.py", line 117, in main
    return run_mode(script_file, err, options, args, mode, defaults)
  File "/usr/lib/python3/dist-packages/xpra/scripts/main.py", line 447, in run_mode
    return run_client(error_cb, options, args, mode)
  File "/usr/lib/python3/dist-packages/xpra/scripts/main.py", line 1509, in run_client
    app = get_client_app(error_cb, opts, extra_args, mode)
  File "/usr/lib/python3/dist-packages/xpra/scripts/main.py", line 1625, in get_client_app
    app.init_ui(opts)
  File "/usr/lib/python3/dist-packages/xpra/client/ui_client_base.py", line 189, in init_ui
    opts.keyboard_raw, *overrides)
  File "/usr/lib/python3/dist-packages/xpra/client/gtk_base/gtk_keyboard_helper.py", line 30, in __init__
    self.update()
  File "/usr/lib/python3/dist-packages/xpra/client/gtk_base/gtk_keyboard_helper.py", line 63, in update
    self.query_xkbmap()
  File "/usr/lib/python3/dist-packages/xpra/client/keyboard_helper.py", line 352, in query_xkbmap
    ) = self.get_layout_spec()
  File "/usr/lib/python3/dist-packages/xpra/client/keyboard_helper.py", line 305, in get_layout_spec
    layout, layouts, variant, variants, options = self.keyboard.get_layout_spec()
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/keyboard.py", line 138, in get_layout_spec
    props = self.keyboard_bindings.getXkbProperties()
  File "xpra/x11/bindings/keyboard_bindings.pyx", line 441, in xpra.x11.bindings.keyboard_bindings.X11KeyboardBindingsInstance.getXkbProperties
TypeError: a bytes-like object is required, not 'str'
}}}
{{{
$ ps -ef |grep xpra
habex     7422     1  2 16:17 ?        00:00:11 /usr/bin/python3 /usr/bin/xpra start :57
habex     7424  7422  0 16:17 ?        00:00:02 /usr/lib/xorg/Xorg-for-Xpra-:57 -noreset -novtswitch -nolisten tcp +extension GLX +extension RANDR +extension RENDER -auth /home/habex/.Xauthority -logfile /run/user/1000/xpra/Xorg.:57.log -configdir /run/user/1000/xpra/xorg.conf.d/7422 -config /etc/xpra/xorg.conf -depth 24 :57
}}}

Attachments (1)

ticket_2541.tar.gz (54.4 KB) - added by habex 6 months ago.

Download all attachments as: .zip

Change History (2)

Changed 6 months ago by habex

Attachment: ticket_2541.tar.gz added

comment:1 Changed 6 months ago by Antoine Martin

Description: modified (diff)
Resolution: fixed
Status: newclosed

Thanks for the bug report, this python3 regression is fixed in r24920 and will be in the next stable update.

Note: See TracTickets for help on using tickets.