#!/bin/bash

MYUSER=`cat /var/lib/groovix/session-info/current-user`

zenity --width=400  --title "Make Changes Permanent?" --question --ok-label=Proceed --text "If you proceed, changes you make during this session will be permanently saved for user $MYUSER."
if [ $? -eq 0 ] ; then
        echo proceeding
else
        exit 0
fi


#unlock menu editor
chmod 755 /usr/bin/alacarte

#todo...
#unlock panel, etc.

groovix-cancel-timeouts

getent passwd $MYUSER | cut -f 6 -d: > /var/lib/groovix/session-info/$MYUSER.save-home

zenity --width=400  --info --title "Groovix User Environment Editing Mode Enabled" --text "Remember to close all programs, especially Firefox, and log out after making all changes. Inactivity and quota timeouts have been disabled so this session will NOT automatically close."
