Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #
- # Restores a bunch of settings, like:
- # o home folder directory structure
- # o XDG settings
- # o nautilus bookmarks
- # o wallpaper
- # o and other bits of desktop configuration the user may have "accidentally" set
- #
- # Use Startup Applications to run this script
- #
- # Last updated: 2010.august.21
- DIR_STRUCTURE_FILE=/.x/config/directory.structure
- WALLPAPER_FILE=/.x/config/wallpaper.jpg
- SRC_XDG_FILE=/.x/config/original.xdg
- SRC_BOOKMARKS_FILE=/.x/config/original.bookmarks
- DST_XDG_FILE=/home/user/.config/user-dirs.dirs
- DST_BOOKMARKS_FILE=/home/user/.gtk-bookmarks
- # loop to infinity
- while :
- do
- # do the restore once every 60 seconds
- sleep 60
- # restore default directory structure if they were modified by the user
- while read DIR_NAME ;
- do
- if [ ! -d "$DIR_NAME" ] ;
- then
- mkdir "$DIR_NAME"
- fi
- done < $DIR_STRUCTURE_FILE
- # force restore of user directories
- cp $SRC_XDG_FILE $DST_XDG_FILE
- # force restore of bookmarks
- cp $SRC_BOOKMARKS_FILE $DST_BOOKMARKS_FILE
- # force restore of wallpaper settings
- gconftool-2 --type string --set /desktop/gnome/background/color_shading_type solid
- gconftool-2 --type bool --set /desktop/gnome/background/draw_background true
- gconftool-2 --type string --set /desktop/gnome/background/picture_filename $WALLPAPER_FILE
- gconftool-2 --type int --set /desktop/gnome/background/picture_opacity 100
- gconftool-2 --type string --set /desktop/gnome/background/picture_options zoom
- gconftool-2 --type string --set /desktop/gnome/background/primary_color '#000000000000'
- gconftool-2 --type string --set /desktop/gnome/background/secondary_color '#000000000000'
- # other settings we need to enforce put them after this line
- # we don't want mousekeys enabled
- gconftool-2 --type bool --set /desktop/gnome/accessibility/keyboard/mousekeys_enable false
- done
- # EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement