gnome-cleanup revision 15676
1204N/A# Cleans up the GNOME Desktop user configuration files. This 1203N/A# will return the user to the default desktop configuration. 1203N/A# Useful if the user's configuration has become corrupted. 1204N/A# By: Brian Cameron <Brian.Cameron@sun.com> 1203N/A# The first argument can be a user name. If so, then the script 1204N/A# will clean up the files for that specified user (if file 1203N/A# permissions permit). If no argument is given, the default value 1203N/A# Error if the directory for this user does not exist. 1203N/A# If USRHOME is the root directory, just set USRHOME to nothing 1203N/A# to avoid double-slash in the output since we refer to files 1203N/A# as $USRHOME/.gconf, for example. 1203N/A# Check if GNOME is running: 1203N/A echo "\nError getting user process information for user <$LOGNAME>...\n" 1203N/A echo "\nThe following GNOME processes are still running for user <$LOGNAME>:\n" 1203N/A echo "\nPlease log out user <$LOGNAME> from GNOME, so this user has no" 1203N/A echo "GNOME processes running before using gnome-cleanup. For example," 1203N/A echo "log out, and log into a failsafe session to run gnome-cleanup." 1203N/A# Use disp_files to echo files back to the screen so that we don't expand 1203N/A# "tmp" wildcard directories like gvfs-${LOGNAME}, otherwise the output 1203N/A# is cumbersome to read since this will echo dozens of files to the screen. 1203N/Atmp_cleanup=
"gconfd-${LOGNAME} mapping-${LOGNAME} orbit-${LOGNAME} gvfs-${LOGNAME}*" echo "\nUser <$LOGNAME> currently has the following GNOME configuration files:" echo "\nDo you wish to remove these files (Y/N) \c" # Back up files for debugging. echo "\nThe files removed from the user \$HOME directory have been" echo "backed up to the following file:" echo "\nIf you ran this program to resolve an issue that was caused" echo "by the GNOME desktop not functioning properly, then please" echo "\nNote that configuration files may contain sensitive" echo "information about you. If this is a concern, then it is best" echo "to not attach this tar file to a publicly visible bug report." echo "If this is not an issue, then attaching this file would likely" echo "help to debug the problem. Also note that files in the /tmp" echo "directory are removed automatically on reboot, so move this" echo "file to a more permanent location if you want to save it for" echo "reference or future use." echo "Error removing files..." echo "\nUser $LOGNAME does not have any GNOME configuration files.\n"