Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
tails
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
947
Issues
947
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tails
tails
Commits
958fe087
Commit
958fe087
authored
Oct 21, 2014
by
Tails developers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename more variables for consistency with i2p-browser script.
parent
39f52772
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
config/chroot_local-includes/usr/local/sbin/unsafe-browser
config/chroot_local-includes/usr/local/sbin/unsafe-browser
+16
-16
No files found.
config/chroot_local-includes/usr/local/sbin/unsafe-browser
View file @
958fe087
...
...
@@ -89,37 +89,37 @@ configure_chroot () {
xargs
chroot
${
CHROOT
}
dpkg
--remove
# Create a fresh browser profile for the clearnet user
CLEARNET
_PROFILE
=
"
${
CHROOT
}
"
/home/
${
BROWSER_USER
}
/.tor-browser/profile.default
BROWSER
_PROFILE
=
"
${
CHROOT
}
"
/home/
${
BROWSER_USER
}
/.tor-browser/profile.default
CLEARNET_EXT
=
"
${
CLEARNET
_PROFILE
}
"
/extensions
mkdir
-p
"
${
CLEARNET
_EXT
}
"
cp
-Pr
"
${
TBB_PROFILE
}
"
/extensions/langpack-
*
.xpi
"
${
CLEARNET
_EXT
}
"
BROWSER_EXT
=
"
${
BROWSER
_PROFILE
}
"
/extensions
mkdir
-p
"
${
BROWSER
_EXT
}
"
cp
-Pr
"
${
TBB_PROFILE
}
"
/extensions/langpack-
*
.xpi
"
${
BROWSER
_EXT
}
"
CLEARNET_PREFS
=
"
${
CLEARNET
_PROFILE
}
"
/preferences/prefs.js
mkdir
-p
"
$(
dirname
"
${
CLEARNET
_PREFS
}
"
)
"
BROWSER_PREFS
=
"
${
BROWSER
_PROFILE
}
"
/preferences/prefs.js
mkdir
-p
"
$(
dirname
"
${
BROWSER
_PREFS
}
"
)
"
# Localization
BEST_LOCALE
=
"
$(
guess_best_tor_browser_locale
)
"
configure_xulrunner_app_locale
"
${
CLEARNET
_PROFILE
}
"
"
${
BEST_LOCALE
}
"
configure_xulrunner_app_locale
"
${
BROWSER
_PROFILE
}
"
"
${
BEST_LOCALE
}
"
# Disable proxying in the chroot
echo
'pref("network.proxy.type", 0);'
>>
"
${
CLEARNET
_PREFS
}
"
echo
'pref("network.proxy.socks_remote_dns", false);'
>>
"
${
CLEARNET
_PREFS
}
"
echo
'pref("network.proxy.type", 0);'
>>
"
${
BROWSER
_PREFS
}
"
echo
'pref("network.proxy.socks_remote_dns", false);'
>>
"
${
BROWSER
_PREFS
}
"
# Prevent File -> Print or CTRL+P from causing the browser to hang
# for several minutes while trying to communicate with CUPS, since
# access to port 631 isn't allowed through.
echo
'pref("print.postscript.cups.enabled", false);'
>>
"
${
CLEARNET
_PREFS
}
"
echo
'pref("print.postscript.cups.enabled", false);'
>>
"
${
BROWSER
_PREFS
}
"
# Hide "Get Addons" in Add-ons manager
echo
'user_pref("extensions.getAddons.showPane", false);'
>>
"
${
CLEARNET
_PREFS
}
"
echo
'user_pref("extensions.getAddons.showPane", false);'
>>
"
${
BROWSER
_PREFS
}
"
# Set the name (e.g. window title) of the browser
set_chroot_browser_name
${
CHROOT
}
"
`
gettext
\"
Unsafe Browser
\"
`
"
"
${
BEST_LOCALE
}
"
# Set start page to something that explains what's going on
echo
'user_pref("browser.startup.homepage", "'
${
START_PAGE
}
'");'
>>
\
"
${
CLEARNET
_PREFS
}
"
BROWSER_CHROME
=
"
${
CLEARNET
_PROFILE
}
/chrome/userChrome.css"
"
${
BROWSER
_PREFS
}
"
BROWSER_CHROME
=
"
${
BROWSER
_PROFILE
}
/chrome/userChrome.css"
mkdir
-p
"
$(
dirname
"
${
BROWSER_CHROME
}
"
)
"
cat
>
${
BROWSER_CHROME
}
<<
EOF
/* Required, do not remove */
...
...
@@ -135,8 +135,8 @@ EOF
# Remove all bookmarks
rm
-f
${
CHROOT
}
/
"
${
TBB_PROFILE
}
"
/bookmarks.html
rm
-f
${
CLEARNET
_PROFILE
}
/bookmarks.html
rm
-f
${
CLEARNET
_PROFILE
}
/places.sqlite
rm
-f
${
BROWSER
_PROFILE
}
/bookmarks.html
rm
-f
${
BROWSER
_PROFILE
}
/places.sqlite
chown
-R
${
BROWSER_USER
}
:
${
BROWSER_USER
}
${
CHROOT
}
/home/clearnet/.tor-browser
...
...
@@ -145,7 +145,7 @@ EOF
# we may run below requires that the browser profile is writable
# by the user running the script (i.e. clearnet).
if
[
-z
"
${
CAMOUFLAGE
}
"
]
;
then
cat
>>
"
${
CLEARNET
_PREFS
}
"
<<
EOF
cat
>>
"
${
BROWSER
_PREFS
}
"
<<
EOF
pref("lightweightThemes.isThemeSelected", true);
pref("lightweightThemes.usedThemes", "[{
\"
id
\"
:
\"
1
\"
,
\"
name
\"
:
\"
Unsafe Browser
\"
,
\"
headerURL
\"
:
\"
file:///usr/share/pixmaps/red_dot.png
\"
,
\"
footerURL
\"
:
\"
file:///usr/share/pixmaps/red_dot.png
\"
,
\"
textcolor
\"
:
\"
#FFFFFF
\"
,
\"
accentcolor
\"
:
\"
#CC0000
\"
,
\"
updateDate
\"
:0,
\"
installDate
\"
:0}]");
EOF
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment