完美解决XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root‘

警告或报错问题:XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root‘
解决方法:
方法一:设置环境变量:终端输入export XDG_RUNTIME_DIR=/usr/lib/
方法二:在/etc/profile末尾增加两句

export XDG_RUNTIME_DIR=/usr/lib/
export RUNLEVEL=3

然后刷新全局变量

source /etc/profile

方法三:如果你的程序没有中断或严重BUG,那么该警告记录:
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root’好像并不影响页面显示和程序的正常运行。

猜你喜欢

转载自blog.csdn.net/weixin_41194129/article/details/120399123