Bug #9309

Use Disconnect as the default search engine

Added by intrigeri 2015-05-01 05:22:31 . Updated 2015-05-12 18:35:48 .

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Internationalization
Target version:
Start date:
2015-05-01
Due date:
% Done:

100%

Feature Branch:
bugfix/9309-default-disconnect-search
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Browser
Deliverable for:

Description

Tor Browser 4.5 has moved to Disconnect as its default search engine. This change was ignored during the initial porting effort (Feature #9031). Have we got good reasons not to follow Tor Browser on this one?


Files


Subtasks


History

#1 Updated by anonym 2015-05-02 11:49:53

The reasons they state in the comments of the blog post seem good to me, in particular for moving away from Startpage since they sometimes show a captcha.

If we do the switch, do we want to localize them like we do with Startpage? The Tor Browser uses English in all locales, apparently, and in a comment in the upstream ticket they call that a “privacy leak”.

#2 Updated by intrigeri 2015-05-02 11:57:25

> If we do the switch, do we want to localize them like we do with Startpage? The Tor Browser uses English in all locales, apparently, and in a comment in the upstream ticket they call that a “privacy leak”.

Indeed, Tor Browser (both upstream and in Tails) default to pretending the user has en_US locales, so it of course generally makes sense to default to an English-speaking search engine. However, Tor Browser and Tails situations are a bit different:

  • in Tor Browser, a user who wants to use a web search engine configured in their preferred language can configure it once for all
  • in Tails, a user with the same needs has to configure it every time they start Tails

So the impact of defaulting to something that’s potentially very much impractical to non-English speakers is quite different.

=> Right now, I tend to think we should go on localizing the default web search engine in Tails’ Tor Browser.

#3 Updated by BitingBird 2015-05-02 12:35:19

I’m for localization too

#4 Updated by intrigeri 2015-05-04 02:58:02

  • Subject changed from Consider using the Disconnect search engine to Use Disconnect as the default search engine
  • Type of work changed from Research to Code

Georg confirmed that the CAPTCHAs sometimes seen with Startpage were the major reason behind their move to Disconnect search.

#5 Updated by sajolida 2015-05-06 15:31:34

Here I’ve got Disconnect as the first search engine option. So maybe this is fixed already…

#6 Updated by intrigeri 2015-05-06 16:42:10

> Here I’ve got Disconnect as the first search engine option.

What version of Tails is this?

#7 Updated by sajolida 2015-05-06 17:19:13

  • File <del>missing: disconnect.png</del> added

1.4~rc1 - 20150503
82c1e8dc529c1882ab89a285bb71bd8a8bfc47b4

See screenshot in attachment. At least disconnect shows first and is the default if I restart Tor Browser. I didn’t try to restart Tails.

#8 Updated by sajolida 2015-05-06 17:19:53

  • File deleted (disconnect.png)

#9 Updated by sajolida 2015-05-06 17:20:11

#10 Updated by intrigeri 2015-05-06 19:50:00

sajolida wrote:
> 1.4~rc1 - 20150503
> 82c1e8dc529c1882ab89a285bb71bd8a8bfc47b4
>
> See screenshot in attachment. At least disconnect shows first and is the default if I restart Tor Browser. I didn’t try to restart Tails.

Wow, interesting. I can’t reproduce this when booting from the 1.4~rc1 ISO, neither in English nor French. I also tried restarting Tor Browser a few times (in English) and Startpage was still the default. Do you have any local customization to the browser or anything that could explain this discrepancy? Can you provide precise steps to reproduce this behaviour?

#11 Updated by anonym 2015-05-06 23:49:04

intrigeri wrote:
> sajolida wrote:
> > 1.4~rc1 - 20150503
> > 82c1e8dc529c1882ab89a285bb71bd8a8bfc47b4
> >
> > See screenshot in attachment. At least disconnect shows first and is the default if I restart Tor Browser. I didn’t try to restart Tails.
>
> Wow, interesting. I can’t reproduce this when booting from the 1.4~rc1 ISO, neither in English nor French. I also tried restarting Tor Browser a few times (in English) and Startpage was still the default. Do you have any local customization to the browser or anything that could explain this discrepancy? Can you provide precise steps to reproduce this behaviour?

I cannot reproduce it either. The amnesia@branding extension will make sure that Start Page is used, so the only way I can see this happening is via some persistence modification that removes/disables that extension somehow.

#12 Updated by anonym 2015-05-07 02:50:02

  • Status changed from Confirmed to In Progress

Applied in changeset commit:4a6fc8595d96c96bf3a68889389477e33cb823c3.

#13 Updated by anonym 2015-05-07 02:56:06

  • Category set to Internationalization
  • % Done changed from 0 to 50
  • QA Check set to Ready for QA
  • Feature Branch set to bugfix/9309-default-disconnect-search

So I ended up overdoing this a bit. Basically, see the commit message of commit:4a6fc85. This branch vastly improves the browser localization situation, and should IMHO go into 1.4 despite moving more towards being more of a feature (post-freeze!) than a bugfix. It of course fixes this ticket’s bug.

Here’s a thorough way to test all it does, that should take ~20 minutes:

Boot Tails in any locale and run this code (and do not start the Tor Browser before doing so!):

LOCALES="ar_EG de_DE es_ES en_US fa_IR fr_FR it_IT ko_KR nl_NL pl_PL pt_PT ru_RU tr_TR vi_VN zh_CN"
cp -a .tor-browser .tor-browser.orig
for LOCALE in ${LOCALES}; do
    rm -R .tor-browser
    cp -a .tor-browser.orig/ .tor-browser
    clear
    export LANG="${LOCALE}.UTF-8"
    echo "Testing locale $LANG"
    tor-browser
    sudo unsafe-browser
done

During each locale’s iteration, go through this check list:

  • Make sure that the home page is correct, in particular that it is properly localized for de_DE, fr_FR and pt_PT.
  • Verify that the UI is properly localized, e.g. by checking the menus (press ALT). Actually this branch changes nothing w.r.t. that, but hey, it’s related.
  • Check in about:config that spellchecker.dictionary is set appropriately. Only tr_TR and zh_CN should have defaulted back to en_US. Note that this pref actually has no effect (it must be set as a user_pref() which seems impossible to do via a .properties file like we do in the branding extension), so this step is more “for completeness” to verify that there’s no “regression”.
  • Make sure that a localized Disconnect.me is the default, pre-selected search engine. Do a search and verify that the correct location (e.g. Egypt for ar_EG) is chosen in the top-right corner.
  • Do a search with the Startpage plugin and:
    • make sure the UI is localized for all but ar_EG, fa_IR, ru_RU and vi_VN
    • make sure the search results are localized, which can be a bit hard to come up with in some cases. If you get a “Pages in …” link (e.g. “al-’arabiyah” for ar_EG) in the bottom-left corner that should indicate that it works.
  • Look in the list of search plugins, and make sure that the ones we previously got from the iceweasel localization packages are there. Make sure that yahoo is not there.
  • When you close the Tor Browser the Unsafe Browser will start, and then you should only make sure that Google is the default search eninge.

Note: Previously we localized pt_BR too, but it was identical to pt_PT except setting a more specific spellchecker. I tried adding it, but pt_PT takes precedence, probably due to that being the only langpack, and it being a “full” locale, including location (i.e. it’s not just pt). Not a huge loss, IMHO, especially given that the spellchecker pref doesn’t work.

#14 Updated by BitingBird 2015-05-07 03:19:57

anonym wrote:
> So I ended up overdoing this a bit.

Haha, that’s the understatement of the year :)

#15 Updated by sajolida 2015-05-07 09:54:26

> Wow, interesting. I can’t reproduce this when booting from the 1.4~rc1 ISO, neither in English nor French.

I’m very sorry. Today when I rebooted I saw that Disconnect is first in
the list, but that StartPage is selected by default. Matching what you
are reporting. Note that the last selected search engine is not reset to
the default when switching to a new identity but I guess this is not a bug.

#16 Updated by anonym 2015-05-07 11:26:09

  • Assignee deleted (anonym)

#17 Updated by anonym 2015-05-08 08:56:09

As said in the review’n’merge request sent to tails-dev@, intrigeri has reviewed the code and is happy with it, so all that remains is independent testing of it.

Also, I’ve run a full test suite run, noticed that an image needed updating (TorBrowserUnableToOpen.png, which shows the new tab search bar, which has the name of the default one in it) and after that everything passes.

#18 Updated by intrigeri 2015-05-08 11:07:40

FTR I’ve merged the proposed branch into experimental.

#19 Updated by kytv 2015-05-09 12:44:51

Testing is currently underway and results will be forthcoming.

#20 Updated by kytv 2015-05-09 12:54:03

First: Very impressive work here (as usual) ;) I did my testing with a self-built ISO from the bugfix/9309-default-disconnect-search branch.

The only discrepancy from the above instructions:

anonym wrote:
> Check in about:config that spellchecker.dictionary is set appropriately. Only tr_TR and zh_CN should have defaulted back to en_US. Note that this pref actually has no effect (it must be set as a user_pref() which seems impossible to do via a .properties file like we do in the branding extension), so this step is more “for completeness” to verify that there’s no “regression”.

All of the locales had the localized spell check language selected except for these which had en_US set:

  • Chinese
  • Dutch
  • Korean
  • Polish
  • Turkish

#21 Updated by anonym 2015-05-11 07:30:48

  • Status changed from In Progress to Fix committed
  • % Done changed from 50 to 100

Applied in changeset commit:ebe57d1f2d949393344b2425fc27e5aa1dd38382.

#22 Updated by anonym 2015-05-11 07:33:28

  • QA Check changed from Ready for QA to Pass

kytv wrote:
> First: Very impressive work here (as usual) ;) I did my testing with a self-built ISO from the bugfix/9309-default-disconnect-search branch.
>
> The only discrepancy from the above instructions:
>
> anonym wrote:
> > Check in about:config that spellchecker.dictionary is set appropriately. Only tr_TR and zh_CN should have defaulted back to en_US. Note that this pref actually has no effect (it must be set as a user_pref() which seems impossible to do via a .properties file like we do in the branding extension), so this step is more “for completeness” to verify that there’s no “regression”.
>
> All of the locales had the localized spell check language selected except for these which had en_US set:
>
> * Chinese
> * Dutch
> * Korean
> * Polish
> * Turkish

The additional locales without spellchecker are expected after commit:4998d8d, which was done after I wrote those instructions.

So:

  • Code review passed (intrigeri)
  • Manual tests passed (kytv)
  • Automated test suite passed (anonym)

Merging!

#23 Updated by BitingBird 2015-05-12 18:35:48

  • Status changed from Fix committed to Resolved