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