Opened 5 years ago

Closed 5 years ago

#13835 closed enhancement (fixed)

environment variable to set TorBrowser homepage

Reported by: proper Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Keywords: tbb-usability, TorBrowserTeam201501
Cc: proper Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Tor Browser's homepage is currently hardcoded in (aboutTor.js).

kAboutTorURL = "chrome://torbutton/content/aboutTor/aboutTor.xhtml";

It would be nice if there was an TOR_HOMEPAGE environment variable to configure this. Would be useful for (linux) distributions that want to set a divergent default.

I am going to submit a git branch that adds this feature soon.

Child Tickets

Attachments (1)

patch (779 bytes) - added by linostar 5 years ago.
Patch linking browser.startup.homepage to the environment variable

Download all attachments as: .zip

Change History (11)

comment:2 Changed 5 years ago by brade

It seems strange to change about:tor to open a different page. It might be useful for users to have access to the same about:tor page in every Tor Browser. I am not sure what your alternative home page will look like, but are you sure you don't want to just change the default home page preference (browser.startup.homepage) to point to it?

I would need to think about how to make that happen via an environment variable.

comment:3 Changed 5 years ago by proper

I am not sure what your alternative home page will look like

The work in progress looks like this. (discussion forum thread and html code)

but are you sure you don't want to just change the default home page preference (browser.startup.homepage) to point to it?

I hope someone from the Whonix team can get that patch done. :) But browser.startup.homepage would also work, I think.

I would need to think about how to make that happen via an environment variable.

Yeah. Any tip in which function we may add this?

Changed 5 years ago by linostar

Attachment: patch added

Patch linking browser.startup.homepage to the environment variable

comment:4 Changed 5 years ago by linostar

I added a new patch, per request by proper, that changes browser.startup.homepage based on the environment variable, instead of changing the about:tor page. The patch is attached, and can be also pulled from:
https://github.com/linostar/torbutton/commit/ecb14f30e7cfdf3e8cd166e7004709910f3eb5d6?diff=unified

Please review.

comment:5 Changed 5 years ago by proper

Thanks linostar!

I tested the patch by linostar. Works well.

comment:6 in reply to:  4 ; Changed 5 years ago by mcs

Replying to linostar:

I added a new patch, per request by proper, that changes browser.startup.homepage based on the environment variable, instead of changing the about:tor page. The patch is attached, and can be also pulled from:
https://github.com/linostar/torbutton/commit/ecb14f30e7cfdf3e8cd166e7004709910f3eb5d6?diff=unified

Please review.

I reviewed the changes with brade. They look OK to us. Since only the default behavior is changed, can we use TOR_DEFAULT_HOMEPAGE as the env variable name?

comment:7 Changed 5 years ago by proper

I reviewed the changes with brade. They look OK to us.

Great!

Since only the default behavior is changed, can we use TOR_DEFAULT_HOMEPAGE as the env variable name?

Sure. Do you like to just add a commit on top and change it yourself (easier for us, preferred, I suppose) or do you wish a updated patch (also possible)?

comment:8 in reply to:  6 Changed 5 years ago by linostar

Replying to mcs:

I reviewed the changes with brade. They look OK to us. Since only the default behavior is changed, can we use TOR_DEFAULT_HOMEPAGE as the env variable name?

I made the requested change. New patch is here:
https://github.com/linostar/torbutton/commit/774e024d448f5ea31950a74e62b9d93ca7b2126f

comment:9 Changed 5 years ago by gk

Keywords: tbb-usability TorBrowserTeam201501R added

comment:10 Changed 5 years ago by mcs

Keywords: TorBrowserTeam201501 added; TorBrowserTeam201501R removed
Resolution: fixed
Status: needs_reviewclosed

Thanks for the updated patch. I committed it and pushed it to Torbutton master:

https://gitweb.torproject.org/torbutton.git/commit/?id=a8b1333f08cd79699bec0d3d9a74845487c9a8be

Note: See TracTickets for help on using tickets.