diff options
author | Frederic Crozat <fcrozat@mandriva.com> | 2006-09-04 16:32:24 +0000 |
---|---|---|
committer | Frederic Crozat <fcrozat@mandriva.com> | 2006-09-04 16:32:24 +0000 |
commit | bc68b076464f5a6f1ef03b2968890b7089467b5d (patch) | |
tree | 68dc3975b12a7980754e1101449a8ffe0e67b8e3 /xinit.d/desktop-directories | |
parent | 12511b6a90b1353109a517c97f1b9381b6da8cd2 (diff) | |
download | common-data-bc68b076464f5a6f1ef03b2968890b7089467b5d.tar common-data-bc68b076464f5a6f1ef03b2968890b7089467b5d.tar.gz common-data-bc68b076464f5a6f1ef03b2968890b7089467b5d.tar.bz2 common-data-bc68b076464f5a6f1ef03b2968890b7089467b5d.tar.xz common-data-bc68b076464f5a6f1ef03b2968890b7089467b5d.zip |
- Improve gdm/kdm theme with new backgrounds
- Don't create default desktop directories for root (Mdv bug #19711)
Diffstat (limited to 'xinit.d/desktop-directories')
-rwxr-xr-x | xinit.d/desktop-directories | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/xinit.d/desktop-directories b/xinit.d/desktop-directories index 9627973..ffe7512 100755 --- a/xinit.d/desktop-directories +++ b/xinit.d/desktop-directories @@ -1,8 +1,8 @@ #!/bin/sh -USER_STAMP=$HOME/.mdk-folders +MDK_FOLDERS="$HOME/.mdk-folders" -if [ ! -e $USER_STAMP ]; then +if [ "$UID" != "0" -a ! -e $MDK_FOLDERS ]; then . /etc/profile.d/10lang.sh locale=C if [ ! -z "$LC_ALL" ]; then @@ -14,7 +14,7 @@ if [ ! -e $USER_STAMP ]; then fi CHARSET=`locale charmap` - [ -d $HOME/.mdk-folders ] || mkdir -p $HOME/.mdk-folders + [ -d $MDK_FOLDERS ] || mkdir -p "$MDK_FOLDERS" for file in /usr/share/mdk/menu/*-mdk.desktop.template ; do TARGET_DIR=`grep -m1 -F Name[$locale]= $file | sed -e 's|.*=||g'` @@ -36,8 +36,8 @@ if [ ! -e $USER_STAMP ]; then [ -d "$DIRECTORY_PATH" ] || mkdir -p "$DIRECTORY_PATH" echo -e [Desktop Entry]\\nHidden=true\\n`grep Icon= $file` > "$DIRECTORY_PATH/.directory" - FILE_PATH=$HOME/.mdk-folders/`basename $file .template` - SYMLINK=$HOME/.mdk-folders/`basename $file -mdk.desktop.template` + FILE_PATH=$MDK_FOLDERS/`basename $file .template` + SYMLINK=$MDK_FOLDERS/`basename $file -mdk.desktop.template` ln -f -s "$DIRECTORY_PATH" $SYMLINK @@ -47,6 +47,5 @@ if [ ! -e $USER_STAMP ]; then [ -f $FILE_PATH ] || cat $file | sed -e "s|\$HOME.*|$DIRECTORY_PATH|g" > $FILE_PATH echo "file://$FILE_PATH" >> $HOME/.gtk-bookmarks done - touch $USER_STAMP fi |