全局禁用“包括在线搜索结果”

The*_*eou 14 unity unity-dash scopes

我们已经开始为我工作的组织中的一些用户使用 Ubuntu 替换一些 Windows 桌面。由于我们的政策,我们需要全局禁用以下功能:

  • 包括在线搜索结果搜索的标签安全和隐私
  • 启动器中的亚马逊启动器图标

我注意到当我手动取消单击“包含在线搜索结果”时,它会更改~/.config/dconf/user. 但是这个文件是一些 GVariant 二进制格式,所以我不能用文本编辑器或脚本来调整它。

我也尝试过在另一篇文章中找到的这个命令,但它似乎没有效果,建议仍然有效:

$ gsettings set com.canonical.Unity.Lenses disabled-scopes "['more_suggestions-amazon.scope', 'more_suggestions-u1ms.scope', 'more_suggestions-populartracks.scope', 'music-musicstore.scope', 'more_suggestions-ebay.scope', 'more_suggestions-ubuntushop.scope', 'more_suggestions-skimlinks.scope']"
Run Code Online (Sandbox Code Playgroud)

有没有办法禁用这些功能以符合我组织的政策?我们使用的是 14.042 LTS,但如果该解决方案也适用于更高版本,那将是理想的。

Jac*_*ijm 16

您正在寻找的命令是:

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

要在登录时全局(针对所有用户)执行命令,您必须在 中添加一个启动器/etc/xdg/autostart,运行以下命令:

/bin/bash -c "gsettings set com.canonical.Unity.Lenses remote-content-search 'none'"
Run Code Online (Sandbox Code Playgroud)

该文件将如下所示:

[Desktop Entry]
Name=Disable Search
Exec=/bin/bash -c "gsettings set com.canonical.Unity.Lenses remote-content-search 'none'"
Type=Application
Run Code Online (Sandbox Code Playgroud)

它另存为disable_onlinesearch.desktop/etc/xdg/autostart

删除亚马逊启动器

为确保没有用户可以使用 Amazon 启动器,最好将其全局删除:转到/usr/share/applications并查找文件:

ubuntu-amazon-default.desktop
Run Code Online (Sandbox Code Playgroud)

并将其删除。

或者

如果出于某种原因,您想保留该文件ubuntu-amazon-default.desktop,但(暂时?)禁用它(使其在 Dash/Unity 中不可见)在文件中添加一行:

NoDisplay=true
Run Code Online (Sandbox Code Playgroud)

更高版本

上述解决方案适用于当前版本的 Ubuntu,至少从 14.04 及更高版本开始。(截至 2015 年 5 月 28 日)。