[Exchange and share] 随便聊一下玲珑包存放机制
Tofloor
poster avatar
陈陈菌
deepin
2022-09-09 09:36
Author

最近我在尝试其他发行中使用玲珑。特别是 debian 类系统,在一次通过网页商店安装玲珑应用中发现,安装完成后没有并没有在 /usr/share/applications 中生成相应的 .desktop 文件。无法在程序中心中找到应用。但可以在 ll-cli 中通过 ll-cli run [软件包名] 来运行玲珑程序

这里是我发的一个 desktop 文件缺失的帖子:https://bbs.deepin.org/zh/post/242793?offset=0&postId=1374960

对于这个其实很好解决,都是小问题。但我误打误撞中发现了个小细节,那就是

在 deepin v23 预览版中玲珑包的软件主体文件默认是存放在根目录的 /persistent/linglong/ 下面

而在我测试 ubuntu 发行中发现,在它们却是在根目录的 /var/lib/linglong/ ,对于这样的机制,不知道大家有什么看法。

image.png

Reply Favorite View the author
All Replies
jjcui8595
Moderator
2022-09-09 14:49
#1

欢迎交流反馈

Reply View the author
SamLukeYes
deepin
2022-09-09 15:58
#2

看起来玲珑在 ubuntu 上的行为更符合 FHS 规范

deepin 是自己家的所以可以乱来joy

Reply View the author
qq4945286
deepin
2022-09-09 18:23
#3

在ubuntu22.04下面能安装玲珑截图软件吗?

Reply View the author
陈陈菌
deepin
2022-09-09 19:28
#4
qq4945286

在ubuntu22.04下面能安装玲珑截图软件吗?

玲珑商店暂时没看到有截图软件

Reply View the author
ti-ji
deepin
2022-09-10 04:33
#5

flatpak

$ cat /etc/profile.d/flatpak.sh
# set XDG_DATA_DIRS to include Flatpak installations

new_dirs=$(
    (
        unset G_MESSAGES_DEBUG
        echo "${XDG_DATA_HOME:-"$HOME/.local/share"}/flatpak"
        flatpak --installations
    ) | (
        new_dirs=
        while read -r install_path
        do
            share_path=$install_path/exports/share
            case ":$XDG_DATA_DIRS:" in
                *":$share_path:"*) :;;
                *":$share_path/:"*) :;;
                *) new_dirs=${new_dirs:+${new_dirs}:}$share_path;;
            esac
        done
        echo "$new_dirs"
    )
)

export XDG_DATA_DIRS
XDG_DATA_DIRS="${new_dirs:+${new_dirs}:}${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
$ echo $XDG_DATA_DIRS
/home//.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share

所以只要 $XDG_DATA_DIRS 存在 ll 的 share 目录。就没得问题。

参考 https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s02.html

ll 的目录结构是什么?

find . -name '*.desktop' 的输出是什么?在一个目录中?

如果在一个目录中,那他只是缺少了个脚本文件,去设置 XDG_DATA_DIRS(见开头)。

如果不在,那就得改了。。。

Reply View the author
忘记、过去
Moderator
2022-09-10 06:49
#6

V20 上在 /data,V23 上在 /persistent......总的来说在 Deepin 自己定义的数据盘挂载点下,之前一直以为是 dde-launcher 自己监控了其他文件夹来着 XD......

Reply View the author
晚秋(lateautumn)
Moderator
2022-09-22 19:20
#7

学习了agree

Reply View the author
wcs4221
deepin beta test group
2022-10-24 14:59
#8

学习一下

Reply View the author