Commit c09ffc70 authored by Tails developers's avatar Tails developers
Browse files

Adapt tails-activate-winxp-theme script to run as a non-root user.

GSettings can't be set with sudo from GDM's PostLogin on Wheezy (tried both with
"gsettings set" and "dconf write"), so we'll have to do this otherwise.

Then:

* Adapt the Unsafe Browser script accordingly: make it run
  tails-activate-winxp-theme as the clearnet user. This likely won't work
  either, for the same reason as why we're doing this entire commit at all,
  so likely this one will need more adaptation. We'll see.

* Don't try to delete /etc/skel/Desktop/*.desktop: it seems entirely useless
  (the users we need have already been created) and can't work now that we don't
  run this script as root anymore.
parent 1db7d445
......@@ -3,8 +3,6 @@
# This script sets up the live user's Gnome theme to something that
# resembles Microsoft Windows XP.
. /etc/live/config.d/username.conf
# Set IE icon in iceweasel
ie_icon="/usr/share/icons/GnomeXP/48x48/apps/iceweasel.png"
for x in /usr/share/iceweasel/chrome/icons/default/*; do
......@@ -13,18 +11,17 @@ for x in /usr/share/iceweasel/chrome/icons/default/*; do
done
# Remove Tails-specific desktop icons
rm --interactive=never -f /home/${LIVE_USERNAME}/Desktop/*.desktop \
/etc/skel/Desktop/*.desktop 2> /dev/null || true
rm --interactive=never -f ${HOME}/Desktop/*.desktop 2> /dev/null || true
# The part below is based on the XpGnome installation script, written
# by PhrankDaChicken, available from http://ubunut.online02.com/xpgnome
gconf_set() {
sudo -H -u "${LIVE_USERNAME}" gconftool-2 --set "$@"
gconftool-2 --set "$@"
}
gsettings_set() {
sudo -H -u "${LIVE_USERNAME}" gsettings set "$@"
gsettings set "$@"
}
# Icon theme
......
......@@ -177,9 +177,7 @@ user_pref("lightweightThemes.isThemeSelected", true);
user_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
else
echo "LIVE_USERNAME=${CLEARNET_USER}" > \
${CHROOT}//etc/live/config.d/username.conf
chroot ${CHROOT} tails-activate-winxp-theme
chroot ${CHROOT} sudo -H -u clearnet tails-activate-winxp-theme
fi
# Set the name (e.g. window title) of the browser
......
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