diff options
author | Tomasz Paweł Gajc <tpg@mandriva.org> | 2010-02-25 14:30:37 +0000 |
---|---|---|
committer | Tomasz Paweł Gajc <tpg@mandriva.org> | 2010-02-25 14:30:37 +0000 |
commit | c98d64650e4600e151eb542da2f6e5be196cd61a (patch) | |
tree | bb2d61cb74bd259851da4646eb2eb701a905bb4f /tools | |
parent | efcff8a88c2276d74c42490dd6830417b7906c77 (diff) | |
download | config-c98d64650e4600e151eb542da2f6e5be196cd61a.tar config-c98d64650e4600e151eb542da2f6e5be196cd61a.tar.gz config-c98d64650e4600e151eb542da2f6e5be196cd61a.tar.bz2 config-c98d64650e4600e151eb542da2f6e5be196cd61a.tar.xz config-c98d64650e4600e151eb542da2f6e5be196cd61a.zip |
- xfce4-firstrun:
o add checks for running xfdesktop
o add some verbose messages
o add header
Diffstat (limited to 'tools')
-rw-r--r-- | tools/xfce4-firstrun | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/tools/xfce4-firstrun b/tools/xfce4-firstrun index bba0586..4a89433 100644 --- a/tools/xfce4-firstrun +++ b/tools/xfce4-firstrun @@ -1,15 +1,18 @@ #!/bin/sh +# Simple script which configure Xfce environment for a fresh user +# Author: tpg@mandriva.org +# Licensed under GPL terms MDV_FLAVOUR=`echo $META_CLASS` USER_DESKTOP=`xdg-user-dir DESKTOP` DESKTOP_FILE=$HOME/.config/autostart/xfce4-firstrun.desktop if [ `whoami` = "root" ]; then - echo "Not supported for superuser" + echo "xfce4-firstrun: not supported for superuser." exit || 0 else if [ ! -e $DESKTOP_FILE ]; then - echo "Localised desktop folder exists." + echo "xfce4-firstrun: localised desktop folder exists." if [ ! -d $HOME/.config/autostart ]; then mkdir -p $HOME/.config/autostart fi @@ -32,8 +35,9 @@ EOF if [ ! -e $USER_DESKTOP/mandriva-draklive-install.desktop ]; then cp -f /usr/share/applications/mandriva-draklive-install.desktop $USER_DESKTOP 2> /dev/null fi - - xfdesktop --reload + if [ "$(pidof xfdesktop)" ]; then + xfdesktop --reload 1> /dev/null; echo "xfce4-firstrun: xfdesktop reloaded."; + fi exit || 0 else @@ -44,11 +48,14 @@ EOF if [ ! -e $USER_DESKTOP/mandriva-draklive-install.desktop ]; then cp -f /usr/share/applications/mandriva-draklive-install.desktop $USER_DESKTOP 2> /dev/null fi - - xfdesktop --reload + if [ "$(pidof xfdesktop)" ]; then + xfdesktop --reload 1> /dev/null; echo "xfce4-firstrun: xfdesktop reloaded."; + fi exit || 0 fi + else echo "xfce4-firstrun: make sure you have installed xdg-user-dirs-gtk and xdg-user-dir packages." fi + fi #EOF |