Skip to content

Instantly share code, notes, and snippets.

@schlomo
Created February 7, 2015 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schlomo/a24f43c00e4166592579 to your computer and use it in GitHub Desktop.
Save schlomo/a24f43c00e4166592579 to your computer and use it in GitHub Desktop.
Ubuntu guest session customization. Install as /etc/guest-session/prefs.sh
touch "$HOME"/.skip-guest-warning-dialog
if [[ -r /usr/share/applications/google-chrome.desktop ]] ; then
mkdir -p "$HOME"/.local/share/applications
sed -e '/Exec/s/google[a-z-]\+/& --password-store=basic/' -e '/^Name=/s/=/&Guest /' \
< /usr/share/applications/google-chrome.desktop > "$HOME"/.local/share/applications/google-chrome.desktop
fi
mkdir -p "$HOME"/.config/autostart
for service in blueman.desktop deja-dup-monitor.desktop indicator-bluetooth.desktop indicator-power.desktop light-locker.desktop vino-server.desktop nm-applet.desktop ; do
if [[ -e /etc/xdg/autostart/$service ]] ; then
sed -e '$a X-GNOME-Autostart-enabled=false' < /etc/xdg/autostart/$service > "$HOME"/.config/autostart/$service
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment