如何以编程方式启用/禁用 Dash 在线结果?

ænd*_*rük 17 command-line automation gsettings dconf unity-dash

如何从 Bash 脚本更改此设置?

系统设置 ? 隐私 ? 搜索结果 ? 在 Dash 中搜索时:包括在线搜索结果

我的计划是仅在某些网络连接上启用它。

Set*_*eth 29

您可以使用dconf-editor更改此设置。它在:

com -> canonical -> unity -> lenses  
Run Code Online (Sandbox Code Playgroud)

并被称为remote-content-search。据我所知,只有两个选项noneall. 当设置为all滑块时在系统设置中设置为“开”,当设置为none滑块时为“关”位置。

您可以通过终端使用gsettings.

gsettings set com.canonical.Unity.Lenses remote-content-search all  
Run Code Online (Sandbox Code Playgroud)

将打开它,同时:

gsettings set com.canonical.Unity.Lenses remote-content-search none
Run Code Online (Sandbox Code Playgroud)

将其设置为“关闭”。

Gsettings 在 Ubuntu 中默认提供,您可以使用以下命令安装 dconf:

sudo apt-get install dconf-tools  
Run Code Online (Sandbox Code Playgroud)

您不需要 dconf 即可使用 gsettings。