Second++ script runs encounter two instead of one .Xauthority files #6

Open
opened 2023-12-29 11:20:37 +00:00 by hygienic-books · 1 comment

On first script invocation stdout reports:

INFO     .Xauthority file '/var/run/sddm/xauth_zGOcOM' located        main.py:34

Subsequently we correctly see:

DEBUG    Adapter '/dev/ttyACM0' initialized                          main.py:211
DEBUG    Env variable 'DISPLAY' set to ':0'                          main.py:227
DEBUG    Env variable 'XAUTHORITY' set to                            main.py:200
         '/var/run/sddm/xauth_zGOcOM'

At this point behavior is as expected. Key presses via HDMI CEC are recognized, parsed and translated into xdotool commands.

On second and all future executions (for example when entering a Kodi instance and then leaving it) we see two .Xauthority files instead of one:

INFO     .Xauthority file '/var/run/sddm/xauth_GXWplh                 main.py:34
         /var/run/sddm/xauth_JpuFTA' located

main.py does not cleanly deal with this situation and instead does:

DEBUG    Env variable 'DISPLAY' set to ':0'                          main.py:227
DEBUG    Env variable 'XAUTHORITY' set to                            main.py:200
         '/var/run/sddm/xauth_GXWplh
         /var/run/sddm/xauth_JpuFTA'

Where especially setting XAUTHORITY to a multiline string is nonsense. Key presses are still recognized correctly but no longer translated into xdotool commands:

INFO     Key press 'OK' detected (CEC key ID '0')                    main.py:154
Authorization required, but no authorization protocol specified
Failed creating new xdo instance.

Investigate and find a sensible solution.

On first script invocation stdout reports: ``` INFO .Xauthority file '/var/run/sddm/xauth_zGOcOM' located main.py:34 ``` Subsequently we correctly see: ``` DEBUG Adapter '/dev/ttyACM0' initialized main.py:211 DEBUG Env variable 'DISPLAY' set to ':0' main.py:227 DEBUG Env variable 'XAUTHORITY' set to main.py:200 '/var/run/sddm/xauth_zGOcOM' ``` At this point behavior is as expected. Key presses via HDMI CEC are recognized, parsed and translated into `xdotool` commands. On second and all future executions (for example when entering a Kodi instance and then leaving it) we see two .Xauthority files instead of one: ``` INFO .Xauthority file '/var/run/sddm/xauth_GXWplh main.py:34 /var/run/sddm/xauth_JpuFTA' located ``` `main.py` does not cleanly deal with this situation and instead does: ``` DEBUG Env variable 'DISPLAY' set to ':0' main.py:227 DEBUG Env variable 'XAUTHORITY' set to main.py:200 '/var/run/sddm/xauth_GXWplh /var/run/sddm/xauth_JpuFTA' ``` Where especially setting `XAUTHORITY` to a multiline string is nonsense. Key presses are still recognized correctly but no longer translated into `xdotool` commands: ``` INFO Key press 'OK' detected (CEC key ID '0') main.py:154 Authorization required, but no authorization protocol specified Failed creating new xdo instance. ``` Investigate and find a sensible solution.
Author
Owner

Workaround for now: Stay inside Kodi, do not leave else you'll be unable to reenter without keyboard input.

Workaround for now: Stay inside Kodi, do not leave else you'll be unable to reenter without keyboard input.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Quico/cec-dm-controller#6
No description provided.