我正在使用这段代码(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