11.4. 设置强制性扩展程序

在 GNOME Shell 系统中,您可以提供一组用户必须使用的扩展程序。为此,在 /usr/share/gnome-shell/extensions 目录中安装这些扩展程序,然后锁定 org.gnome.shell.enabled-extensionsorg.gnome.shell.development-tools 的键值。
锁定 org.gnome.shell.development-tools 的键值可以确保用户无法用 GNOME Shell 的内置调试器和检查工具(Looking Glass)停用任何强制性的扩展程序。

过程 11.4. 设置强制性扩展程序

  1. /etc/dconf/db/local.d/00-extensions-mandatory 中创建一个用于计算机范围设置的 local 数据库文件。
    [org/gnome/shell]
    # List all mandatory extensions
    enabled-extensions=['myextension1@myname.example.com', 'myextension2@myname.example.com']
    # Disable access to Looking Glass
    development-tools=false
    enabled-extensions 的键值通过扩展程序的 uuid 规定了被启用的扩展程序(myextension1@myname.example.commyextension2@myname.example.com)。
    development-tools 的键值被设置为假(false),以阻止用户使用应用程序 Looking Glass
  2. 覆盖用户设置,并阻止用户在 /etc/dconf/db/local.d/locks/extensions-mandatory 中对此修改:
    # Lock the list of mandatory extensions and access to Looking Glass
    /org/gnome/shell/enabled-extensions
    /org/gnome/shell/development-tools
  3. 更新系统数据库:
    # dconf update