天天看點

讓 Ubuntu 上的 Unity 線上搜尋功能見鬼去吧!

無論何時,你開始在 unity dash 搜尋計算機中的應用程式或檔案時,你的檢索詞将被自動發送給第三方,如亞馬遜,并且第三方将依據您的搜尋詞顯示相關結果(主要是廣告)。如果你不喜歡這個功能,感覺真的打擾到你,你可以禁用它。

例如,當我在 unity dash 中輸入 “terminal” 時,将顯示 “terminal” 應用和 web 上其他第三方的東東(我要發狂了!我不想要這些!)。

讓 Ubuntu 上的 Unity 線上搜尋功能見鬼去吧!

正如上面的截圖所見,unity顯示内置的 terminal 應用、引用連結、天氣連結和其他第三方的推薦,如電影等。這是非常惱人的并且在 unity dash 上看起來很糟。同時,它顯示了太多的搜尋結果,并使我迷惑。

如果你像我一樣不需要這個功能,在你的終端輸入以下指令:

wget -q -o - https://fixubuntu.com/fixubuntu.sh | 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."

else

# check canonical schema is present. take first match, ignoring case.

schema="`$gs list-schemas | grep -i $ccul | head -1`"

if [ -z "$schema" ]

then

printf "error: could not find canonical schema %s.\n" "$ccul" 1>&2

exit 1

ccul="$schema"

fi

# 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']"

fi;

# 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 dash 看起來還不錯。

讓 Ubuntu 上的 Unity 線上搜尋功能見鬼去吧!

全部搞定,讓那些雜亂的東西再也不要回來了。

原文釋出時間為:2014-05-23

本文來自雲栖社群合作夥伴“linux中國”