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
826b97e3
Commit
826b97e3
authored
May 23, 2012
by
Tails developers
Browse files
Show startup/shutdown notification for better feedback to the user.
parent
e5540ad2
Changes
1
Hide whitespace changes
Inline
Side-by-side
config/chroot_local-includes/usr/local/sbin/unsafe-browser
View file @
826b97e3
...
...
@@ -81,6 +81,12 @@ verify_start () {
fi
}
show_start_notification
()
{
local
title
=
"
`
gettext
\"
Starting the Unsafe Browser...
\"
`
"
local
body
=
"
`
gettext
\"
This may take a
while
, so please be patient.
\"
`
"
notify-send
-t
10000
"
${
title
}
"
"
${
body
}
"
}
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
...
...
@@ -131,7 +137,7 @@ EOF
rm
-f
${
CHROOT
}
/etc/iceweasel/profile/bookmarks.html
}
start
_browser_in_chroot
()
{
run
_browser_in_chroot
()
{
# Start Iceweasel in the chroot
echo
"* Starting Unsafe Browser"
...
...
@@ -140,6 +146,12 @@ start_browser_in_chroot () {
sudo
-u
${
SUDO_USER
}
xhost
-SI
:localuser:
${
CLEARNET_USER
}
2>/dev/null
}
show_shutdown_notification
()
{
local
title
=
"
`
gettext
\"
Shutting down the Unsafe Browser...
\"
`
"
local
body
=
"
`
gettext
\"
This may take a
while
, and you may not restart the Unsafe Browser
until
it is properly shut down.
\"
`
"
notify-send
-t
10000
"
${
title
}
"
"
${
body
}
"
}
tor_is_working
()
{
# FIXME: the approach is stolen from is_tor_working() in the 20-time
# NM hook -- we should move things like this to a shell script library
...
...
@@ -186,9 +198,11 @@ if [ -z "${IP4_NAMESERVERS}" ]; then
fi
verify_start
show_start_notification
setup_chroot
configure_chroot
start_browser_in_chroot
run_browser_in_chroot
show_shutdown_notification
maybe_restart_tor
exit
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