Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tails
tails
Commits
7825b318
Commit
7825b318
authored
Mar 27, 2012
by
Tails developers
Browse files
Make the Unsafe Browser a bit more verbose to help debugging.
parent
234b0a52
Changes
1
Hide whitespace changes
Inline
Side-by-side
config/chroot_local-includes/usr/local/sbin/unsafe-browser
View file @
7825b318
...
...
@@ -70,6 +70,8 @@ setup_chroot () {
# Setup a chroot on an aufs "fork" of the filesystem.
# FIXME: When LXC matures to the point where it becomes a viable option
# for creating isolated jails, the chroot can be used as its rootfs.
echo
"* Setting up chroot"
trap
cleanup INT
trap
cleanup EXIT
...
...
@@ -83,6 +85,8 @@ setup_chroot () {
}
configure_chroot
()
{
echo
"* Configuring chroot"
# Set the chroot's DNS servers to those obtained through DHCP
rm
-f
${
CHROOT
}
/etc/resolv.conf
for
NS
in
${
IP4_NAMESERVERS
}
;
do
...
...
@@ -91,7 +95,7 @@ configure_chroot () {
chmod
a+r
${
CHROOT
}
/etc/resolv.conf
# Disable problematic Iceweasel addons and proxying in the chroot
chroot
${
CHROOT
}
apt-get remove
--yes
${
OFFENDING_ADDONS
}
1>/dev/null 2>&1
chroot
${
CHROOT
}
apt-get remove
--yes
${
OFFENDING_ADDONS
}
sed
-i
'/^pref("network.proxy.type",/d'
\
${
CHROOT
}
/etc/iceweasel/pref/iceweasel.js
echo
'pref("network.proxy.type", 0);'
>>
\
...
...
@@ -109,6 +113,8 @@ user_pref("lightweightThemes.usedThemes", "[{\"id\":\"1\",\"name\":\"Unsafe Brow
start_browser_in_chroot
()
{
# Start Iceweasel in the chroot
echo
"* Starting Unsafe Browser"
sudo
-u
${
SUDO_USER
}
xhost +SI:localuser:
${
CLEARNET_USER
}
2>/dev/null
chroot
${
CHROOT
}
sudo
-u
${
CLEARNET_USER
}
iceweasel
-DISPLAY
=
:0.0
sudo
-u
${
SUDO_USER
}
xhost
-SI
:localuser:
${
CLEARNET_USER
}
2>/dev/null
...
...
@@ -127,7 +133,8 @@ maybe_restart_tor () {
# Tor from bootstrapping, and a restart is the fastest way to get
# wheels turning)
if
!
tor_is_working
;
then
if
!
service tor restart 2>/dev/null
;
then
echo
"* Restarting Tor"
if
!
service tor restart
;
then
error
"
`
gettext
\"
Failed to restart Tor.
\"
`
"
fi
local
counter
=
0
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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