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

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

parent e5540ad2
...@@ -81,6 +81,12 @@ verify_start () { ...@@ -81,6 +81,12 @@ verify_start () {
fi 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_chroot () {
# Setup a chroot on an aufs "fork" of the filesystem. # Setup a chroot on an aufs "fork" of the filesystem.
# FIXME: When LXC matures to the point where it becomes a viable option # FIXME: When LXC matures to the point where it becomes a viable option
...@@ -131,7 +137,7 @@ EOF ...@@ -131,7 +137,7 @@ EOF
rm -f ${CHROOT}/etc/iceweasel/profile/bookmarks.html rm -f ${CHROOT}/etc/iceweasel/profile/bookmarks.html
} }
start_browser_in_chroot () { run_browser_in_chroot () {
# Start Iceweasel in the chroot # Start Iceweasel in the chroot
echo "* Starting Unsafe Browser" echo "* Starting Unsafe Browser"
...@@ -140,6 +146,12 @@ start_browser_in_chroot () { ...@@ -140,6 +146,12 @@ start_browser_in_chroot () {
sudo -u ${SUDO_USER} xhost -SI:localuser:${CLEARNET_USER} 2>/dev/null 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() { tor_is_working() {
# FIXME: the approach is stolen from is_tor_working() in the 20-time # 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 # NM hook -- we should move things like this to a shell script library
...@@ -186,9 +198,11 @@ if [ -z "${IP4_NAMESERVERS}" ]; then ...@@ -186,9 +198,11 @@ if [ -z "${IP4_NAMESERVERS}" ]; then
fi fi
verify_start verify_start
show_start_notification
setup_chroot setup_chroot
configure_chroot configure_chroot
start_browser_in_chroot run_browser_in_chroot
show_shutdown_notification
maybe_restart_tor maybe_restart_tor
exit 0 exit 0
Supports Markdown
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