[ Content contribution] 【增强ACE书虫环境】ACE应用融合到宿主机
Tofloor
poster avatar
neko
deepin
Ecological co-builder
2023-11-09 08:08
Author

最终效果
通过ACE安装的GUI应用(具有desktop文件)自动添加到宿主机器的启动菜单。这样就可以直接在宿主机器启动ACE兼容环境里面的GUI应用了。

存在的问题:宿主机不能直接右键图标卸载,需要在ACE容器卸载(卸载后会自动清除宿主机器里的图标)
步骤
(1)在ACE兼容环境里添加 /etc/apt/apt.conf.d/ace2host钩子,内容如下:

DPkg::Post-Invoke { "for file in /usr/share/applications/*.desktop; do if ! grep -q "bookworm-run" "$file"; then sed -i 's|^Exec=\(.*\)|Exec=bookworm-run \1|' "$file" && pkill dde-launcher  ; fi ; done"; };

(2)在宿主机添加 /etc/profile.d/ace2host.sh脚本,内容如下:

export XDG_DATA_DIRS
APP_ROOT="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env/usr/share"
XDG_DATA_DIRS="${APP_ROOT}:/usr/local/share:/usr/share"
export APP_ROOT

最终效果:

image.png

image.png

Reply Favorite View the author
All Replies
神末shenmo
deepin
Spark-App
2023-11-09 08:24
#1

matrix上面就是你吧


咱们共同维护ACE可以,这个融合可以再做的好一些,容器中加钩子然后host-spawn到主机去


容器中加apt钩子,安装结束时打包出integration deb然后用host-spawn指挥主机去安装。这一过程是安全的

Reply View the author
神末shenmo
deepin
Spark-App
2023-11-09 08:29
#2

https://gitee.com/deepin-community-store/deepin-ace-integration

放这里吧,完善后集成进新ACE

Reply View the author
花雨落逝
deepin
2023-11-09 08:34
#3
神末shenmo

https://gitee.com/deepin-community-store/deepin-ace-integration

放这里吧,完善后集成进新ACE

捉到熬夜的shenmo一只

(doge

Reply View the author
yanjuner
Super Moderator
2023-11-09 17:40
#4

好厉害啊

点赞

Reply View the author
阿尼樱奈奈
Moderator
2023-11-09 19:07
#5

like

Reply View the author
神末shenmo
deepin
Spark-App
2023-11-09 19:18
#6

https://gitee.com/deepin-community-store/amber-compatability-environment/blob/master/ace-host-integration

只要在容器里执行这个就好了

这样会比较简单~

Reply View the author
神末shenmo
deepin
Spark-App
2023-11-10 00:30
#7

Will improve at ACE-BCM 12.3 Release

Reply View the author
neko
deepin
Ecological co-builder
2023-11-10 05:18
#8
神末shenmo

Will improve at ACE-BCM 12.3 Release

好耶!已经吃上了!

Reply View the author
neko
deepin
Ecological co-builder
2023-11-10 05:23
#9
神末shenmo

Will improve at ACE-BCM 12.3 Release

还有个问题,我不知道是不是deepin23 beta2的原因。

ACE里面安装好应用后必须pkill dde-launcher重启启动器才能显示出新安装的应用图标。所以我脚本里面有加&& pkill dde-launcher用来刷新启动器。

Reply View the author
神末shenmo
deepin
Spark-App
2023-11-10 06:53
#10
neko

还有个问题,我不知道是不是deepin23 beta2的原因。

ACE里面安装好应用后必须pkill dde-launcher重启启动器才能显示出新安装的应用图标。所以我脚本里面有加&& pkill dde-launcher用来刷新启动器。

这是launcher的问题


20就是好的

Reply View the author
神末shenmo
deepin
Spark-App
2023-11-10 07:16
#11
neko

还有个问题,我不知道是不是deepin23 beta2的原因。

ACE里面安装好应用后必须pkill dde-launcher重启启动器才能显示出新安装的应用图标。所以我脚本里面有加&& pkill dde-launcher用来刷新启动器。

有个问题,和玲珑一样

如果和主机的desktop file相同,会导致启动主机的应用,而不是容器里的

我改改吧

Reply View the author
mozixun
deepin
2023-11-11 21:28
#12
神末shenmo

有个问题,和玲珑一样

如果和主机的desktop file相同,会导致启动主机的应用,而不是容器里的

我改改吧

话说在加desktop文件时加一下(ACE)标识吧

Reply View the author
neko
deepin
Ecological co-builder
2023-11-12 01:47
#13
mozixun

话说在加desktop文件时加一下(ACE)标识吧

最新的版本有标识的

Reply View the author
mozixun
deepin
2023-11-12 02:34
#14
neko

最新的版本有标识的

好的,谢谢大佬!

Reply View the author