QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'

Hello.
From kickoff menu, Openning konsole in super user mode, return 3 errors warning :

Password: 
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
++ logger -t JCD_ETC_BASH-BASHRC '/etc/bash.bashrc - BEGIN'

The errors appear after the password input and before the second line ( instruction logger -t … ) of the file /etc/bash.bashrc

Postscriptum : the first line of /etc/bash.bashrc contains :

set -x

At any moment typing this command :

kf5-config --version

return the same errors :

linux-dpgm:~ # kf5-config --version
+ kf5-config --version
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Qt: 5.6.2
KDE Frameworks: 5.32.0
kf5-config: 1.0
linux-dpgm:~ # 

Any help is welcome.

Ignore that warning, it’s normal when you run Qt applications as root in the user’s session.

Or do you have any real problem?

Practically not.
Just the three warning lines.

Thank you for your quick answer.

But is it somethings like a bug ?

No.
Qt just tells you that $XDG_RUNTIME_DIR is not set, and therefore it uses some default directory for runtime/temporary files (/tmp/runtime-root/).

XDG_RUNTIME_DIR will normally be set when you login, but not by “su -”… (though it obviously did in previous versions)

If you want to get rid of the message, you could probably set XDG_RUNTIME_DIR manually if it’s not set before running a Qt application, or not run a Qt application in /etc/bash.bashrc in the first place… :wink:

Btw, it would probably be better not to modify /etc/bash.bashrc, there’s /etc/bash.bashrc.local for local changes…

Yes of course.
But I modified it just for seeing where/when the warning come from.

Another derivative question on the subject :
2 laptop with same config ( same install and same update ).
same files :

/bash.bashrc
/etc/bash.bashrc.local
/etc/environment
/etc/profile
/etc/profile.local

/etc/sudoers :

##
## User privilege specification
##
root ALL=(ALL) ALL

Uncomment to allow members of group wheel to execute any command

%wheel ALL=(ALL) ALL

Same thing without a password

%wheel ALL=(ALL) NOPASSWD: ALL

Read drop-in files from /etc/sudoers.d

(the ‘#’ here does not indicate a comment)

#includedir /etc/sudoers.d

/home/user_install/.local/share/applications/konsolesu-2.desktop :

[Desktop Entry]
Comment[en_US]=
Comment=
Exec=kdesu -c "konsole --profile Root_Shell_JCD"
GenericName[en_US]=
GenericName=
Icon=/backup_sys/¬000_COMMON/¬¬ICONS_WALLPAPERS_THEMES/ICONS/KONSOLE/RootTerminal.png
MimeType=
Name[en_US]=Terminal - %WHEEL Super User Mode
Name=Terminal - %WHEEL Super User Mode
NoDisplay=false
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-DocPath=konsole/index.html
X-KDE-AuthorizeAction=shell_access
X-KDE-StartupNotify=true
X-KDE-SubstituteUID=false
X-KDE-Username=
X-SuSE-translate=true

/home/user_install/.local/share/konsole/Profile_std_JCD.profile
/home/user_install/.local/share/konsole/Root_Shell_JCD.profile
/home/user_install/.local/share/konsole/Root_std_Shell.profile

From the kickoff menu, when I open a konsole in super user mode ( konsolesu-2.desktop ) I did not get the warnings on the first computer I configured two months ago.
Have you any idea where I should found the difference ?
I am speaking of the action that open the konsole window ( Not what should happens when I type a command after opening. )

I have been ignoring those messages. Thus far, they have not caused a problem.

And where does it come from then?
The default /etc/bash.bashrc does not run any Qt applications, and none of the other default auto-start scripts (like /etc/profile) neither.

From the kickoff menu, when I open a konsole in super user mode ( konsolesu-2.desktop ) I did not get the warnings on the first computer I configured two months ago.
Have you any idea where I should found the difference ?

Maybe in your custom Root_Shell_JCD.profile?
In particular the “Command=” line…

I got it.

/etc/profile.local source a script of mine to set some env variables.
The sourced script call a kde function to get kde version

**kf5-config --version**

It is the call of this function which causes the three warning messages.

Roku is a streaming device, which is a reasonable roku activation and other Set-up Box. Roku is a bundle of amusement, where client can stream for boundless motion appears, web arrangement, news, animation and a lot more projects.