You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Flatpak更新后出现XDG环境变量路径提示的问题求助

Flatpak更新后出现XDG环境变量路径提示的问题求助

最近我跑更新脚本的时候,在完成Flatpak包更新的环节后,总会跳出一段关于XDG环境变量的提示,具体的命令执行输出如下:

flatpak updates ...

Looking for updates…


        ID                         Branch     Op     Remote      Download
 1. [✓] com.visualstudio.code      stable     u      flathub     102.5 MB / 108.4 MB

Updating… ████████████████████ 100%  7.3 MB/s  00:00
Note that '/var/lib/flatpak/exports/share' is not in the search path
set by the XDG_DATA_HOME and XDG_DATA_DIRS
environment variables, so applications may not
be able to find it until you set them. The
directories currently searched are:

- /root/.local/share
        ID                         Branch     Op     Remote      Download
 1. [✓] com.visualstudio.code      stable     u      flathub     102.5 MB / 108.4 MB

Updates complete.

我翻遍了/home/user和/etc目录下的.bashrc、profile这类常见配置文件,完全找不到对XDG_DATA_HOME或者XDG_DATA_DIRS这两个变量的赋值语句,只有XDG_DATA_DIRS能看到部分内容,但就是找不到相关的配置项。有没有朋友遇到过类似的情况?该怎么处理这个提示呢?

备注:内容来源于stack exchange,提问作者Trunk

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.16 11:03:06