On 24.02.2024 00:46, Marc Chamberlin via openSUSE Users wrote:
Hello -
I am trying to grok how two X authority files get created and who/what is responsible for creating them.
Normally they are created by display manager that starts X server.
I have a script for starting up the x11vnc service and it needs to find the X authority file and looks for it in one of two places. The first location it looks for it is at /run/user/1000/xauth_* and if my script finds it there then my script assumes it is running on an OpenSuSE 15.4 or later system and I use it for/via the -auth parameter of x11vnc command and the x11vnc service can be started up OK. If my script does not find the X authority file at
If you start x11vnc from within your desktop session you automatically get the correct environment.
this first location then it assumes that it is running on OpenSuSE 15.3 or earlier and looks for the X authority file at ~/.Xauthority. And again (ASSUMING my script is running on an OpenSuSE 15.3 or earlier system) if my script finds it there it passes the location of the .Xauthority file to x11vnc via the -auth parameter and the xvncserver will start up an run OK.
The trouble is that on about half of my OpenSuSE 15.4 systems, the X authority file is not being created at /run/user/1000/ This causes my script to fall through to looking for the X authority file in the users home directory at ~/.Xauthority but using that for x11vnc via it's -auth parameter results in getting error messages such as this - in
23/02/2024 10:06:40 x11vnc version: 0.9.16 lastmod: 2019-01-05 pid: 23287 Invalid MIT-MAGIC-COOKIE-1 keyNo protocol specified 23/02/2024 10:06:40 XOpenDisplay(":0") failed. 23/02/2024 10:06:40 Trying again with XAUTHLOCALHOSTNAME=localhost ... Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 key 23/02/2024 10:06:40 *************************************** 23/02/2024 10:06:40 *** XOpenDisplay failed (:0)
*** x11vnc was unable to open the X DISPLAY: ":0", it cannot continue. *** There may be "Xlib:" error messages above with details about the failure.
I believe the ~/.Xauthority file in my home directory may be a left-over file from when I was running previous versions of OpenSuSE? I get that feeling because if I delete the .Xauthority file (as some internet searches suggested) it is not recreated when I rebooted or log out, log back in. So I am guessing that ~/Xauthority files have been deprecated/removed from OpenSuSE 15.4 and later systems?
additional info -
OpenSuSE 15.4 x64
kf5-config --version Qt: 5.15.2 KDE Frameworks: 5.90.0 kf5-config: 1.0
plasmashell --version qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Crud! don't know how to solve this, maybe "plasmashell ---version" does not work over SSH?
SSH? How SSH suddenly comes in picture? You did not say anything about doing that remotely. I guess you better take a step back and explain what you are trying to achieve, not how you think it should be done.