This should be simple, but for some reason it doesn't appear to run.
The goal here in our shared netbook environment is to
a) disable the password requirement on the screen saver
b) cleanup any leftover files (lock and .parentlock) in the user's browser profile
The script works when run from a terminal, but does not run at login despite a .config/autostart entry to launch it...
The autostart file (.cleanup.desktop) contains:
[Desktop Entry]
Type=Application
Exec=bash ~/.cleanup.sh
Hidden=false
NoDisplay=true
X-GNOME-Autostart-enabled=true
Name[en_US]=cleanup
Name=cleanup
Comment[en_US]=cleanup
Comment=cleanup
~
And the .cleanup.sh script contains:
#!/bin/bash
sleep 10
echo -en "\07"
killall -KILL firefox-bin
killall -KILL firefox
find ~./.mozilla/ -iname ".parentlock" -exec rm -f {} \;
find ~./.mozilla/ -iname "lock" -exec rm -f {} \;
find ~./.mozilla/ -iname "places.sqlite" -exec rm -f {} \;
find ~./.mozilla/ -iname "places.sqlite-journal" -exec rm -f {} \;
touch ~/I_RAN
#This is for 12.04LTS
gsettings set org.gnome.desktop.screensaver lock-enabled false
# this is for 10.04LTS
gconftool-2 --type boolean -s /apps/gnome-power-manager/lock/blank_screen false
gconftool-2 --type boolean -s /apps/gnome-power-manager/lock/gnome_keyring_hibernate false
gconftool-2 --type boolean -s /apps/gnome-power-manager/lock/gnome_keyring_suspend false
gconftool-2 --type boolean -s /apps/gnome-power-manager/lock/hibernate false
gconftool-2 --type boolean -s /apps/gnome-power-manager/lock/suspend false
gconftool-2 --type boolean -s /apps/gnome-power-manager/lock/use_screensaver_settings true
gconftool-2 --type boolean -s /apps/gnome-screensaver/lock_enabled false