Commit 826b97e3 authored by Tails developers's avatar Tails developers

Show startup/shutdown notification for better feedback to the user.

parent e5540ad2
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment