简体   繁体   English

从GJS中的org.gnome.shell模式获取启用的扩展

[英]Get enabled extensions from org.gnome.shell schema in GJS

I am trying to obtain the value stored in the org.gnome.shell schema with the enabled extensions. 我正在尝试获取具有启用的扩展名的org.gnome.shell架构中存储的值。

But this sentence says that the org.gnome.shell schema is not installed 但是这句话说没有安装org.gnome.shell模式

let extensionsSchema = new Gio.Settings({ schema: 'org.gnome.shell' });

I am calling this line in my own GJS application. 我在自己的GJS应用程序中称这行。 And navigating with dconf editor I see this schema and the value there. 并使用dconf编辑器进行导航,我看到了该架构和其中的值。

What am I missing? 我想念什么?

Thanks 谢谢

It tourned out that 它发现了

Gio.Settings.new('org.gnome.shell')

actually worked, but when running my code from Gnome Builder, it said that it was not installed because I guess my user is not loaded inside. 确实有效,但是从Gnome Builder运行我的代码时,它表示未安装该代码,因为我想我的用户未加载到其中。

Setting this env (USER=myuser) var, allowed me to be able to read the shell schema. 设置此env(USER = myuser)var,使我能够读取Shell模式。 It actually makes sense because this schema is user based. 这实际上是有道理的,因为此架构是基于用户的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM