![为什么这个 gsettings 命令在 16.04 和 16.04.1 之间停止工作?](https://linux22.com/image/992879/%E4%B8%BA%E4%BB%80%E4%B9%88%E8%BF%99%E4%B8%AA%20gsettings%20%E5%91%BD%E4%BB%A4%E5%9C%A8%2016.04%20%E5%92%8C%2016.04.1%20%E4%B9%8B%E9%97%B4%E5%81%9C%E6%AD%A2%E5%B7%A5%E4%BD%9C%EF%BC%9F.png)
我正在使用这段代码(shell 脚本)与 16.04 上的 Gnome Terminal 配置文件进行交互,并且运行良好
profile=$(gsettings get org.gnome.Terminal.ProfilesList default)
profile=${profile:1:-1} # remove leading and trailing single quotes
org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:${profile}/ \
background-transparency-percent
然后我通过安装 16.04.1 来更新系统,现在当我运行上述命令时,无论是通过脚本还是通过命令行,gsettings
都只会返回其“使用情况”消息:
$ gsettings 获取 org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:${profile}/
用法:gsettings [--schemadir SCHEMADIR] 获取 SCHEMA[:PATH] KEY ...
我需要做什么才能使这个命令再次起作用?
答案1
您省略了键名称,例如background-transparency-percent
:
gsettings get org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:${profile}/ background-transparency-percent