Lets look at one of the error message below and its solution.
Here we get an error of non-existing path with XDG_RUNTIME_DIR warning message.
Warning: Qt Warning: QStandardPaths: XDG_RUNTIME_DIR points to non-existing path '/run/user/44564', please create it with 0700 permissions.
Check if user is able to create directory under /var/run when logged in via SSH/Keys, etc when processed the PAM validation.
When you login via scripts, it skips the runtime directory creation as PAM checks are skipped.
The alternate way to resolve the issue is to point this variable XDG_RUNTIME_DIR to some other directory, say:
XDG_RUNTIME_DIR=”/var/tmp/APP” where you can change APP with the application name.
We can also change the way we are running the script(say run via transferring the script and running on server) to let systemd process pam validations thereby creating the runtime dir.
Solution 1 is preferred here as this is temporary filesystem area of OS and you can use /var/tmp/ for runtime directories.
We need to change the variable value and create that directory and set permissions.
After this, run the script and issue should be resolved.