Thanks Andrei for your time and responses, I will, like you did, intersperse my replies with yours... On 2/23/24 22:05, Andrei Borzenkov wrote:
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. And that is what I expect also, but the question remains, why am I not seeing the X authority files being created at /run/user/1000 on some of my OpenSuSE 15.4 systems all running with the KDE/Plasma desktop and using the SDDM display manager?
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. I am starting x11vnc from a systemd service so that it is always available on remote systems that are inconvenient to access physically,
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. Not trying to tell anyone how I think X Authority files should be created, simply what I have observed and empirically grokked is going on. Yes I a using SSH (and/or VNC when it is working) to access my remote systems. I didn't think that was important to mention in connection with trying to understand why I am missing the X authority files on some of my systems. I mentioned SSH only when I discovered I couldn't get the plasmashell version and guessed it might be due to my using SSH. Why do you think my usage of SSH is relevant to understanding why I am not finding the X authority file at /run/user/1000/ on some of my remote systems?
BTW, the plasmashell version I am running on one of my remote systems, that is not creating the X authority file at my expected location, is 5.24.4 HTHs, Marc