Unity在线搜索如何只显示终端应用-Ubuntu

技术教程 2026-01-09 13:44:46 浏览

相信大家在Ubuntu下使用Unity的在线搜索功能的时候,一定遇到过这样的问题,那就是搜索出来的结果总是带有第三方应用,不胜其烦,下面小编就教大家让Unity只显示终端应用的方法

正如上面的截图所见,Unity显示内置的 Terminal 应用、引用链接、天气链接和其他第三方的推荐,如电影等。显示了太多的搜索结果。

在终端输入以下命令:

wget -q -O -| bash

上述脚本的内容如下:

#!/bin/bash

GS=“/usr/bin/gsettings”

CCUL=“com.canonical.Unity.lenses”

# Figure out The version of Ubuntu That you‘re running

V=`/usr/bin/lsb_release -rs`

# The privacy problems started with 12.10, so earlier versions should do Nothing

if awk “BEGIN {exit !($V 《 12.10 || $V 》= 14.10)}”;then

echo “Good news! This version of Ubuntu is not known to invade your privacy.”

# Check Canonical schema is present. Take first match, ignoring case.

Unity

SCHEMA=“`$GS list-schemas | grep -i $CCUL | head -1`”

if[-z “$SCHEMA”]

printf “Error: could not find Canonical schema %s.\n”“$CCUL”1》&2

CCUL=“$SCHEMA”

# Turn off “Remote Search”, so search terms in Dash don’t get sent to the internet

$GS set $CCUL remote-content-search none

# If you‘re using earlier than 13.10, Uninstall unity-lens-shopping

if[ $V \《 13.10];then

sudo apt-get remove -y unity-lens-shopping

# If you’re using a later version, disable remote scopes

$GS set $CCUL 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’]”

# Block connections to Ubuntu‘s ad server, just in case

if! grep -q “127.0.0.1 productsearch.ubuntu.com”/etc/hosts;then

echo -e “\n127.0.0.1 productsearch.ubuntu.com”| sudo tee -a /etc/hosts 》/dev/null

echo “All done. Enjoy your privacy.”

再次进入Unity dash 的终端。现在Unity 只显示终端应用。

更新:这一招只适用Unity deskTOP。如果你使用其他的比如GNOME,LXDE或Xfce不用这么做。同时,这个在线搜索功能将不会包含在Ubuntu 14.10和即将推出的版本中。

上面就是Ubuntu unity在线搜索只显示终端应用的方法介绍了,在终端输入如上命令后,搜索的结果中就不会有第三方应用,让页面更简洁。

本文版权声明本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,请联系本站客服,一经查实,本站将立刻删除。

发表评论

热门推荐