diff options
Diffstat (limited to 'tools/xfce4-firstrun')
-rw-r--r-- | tools/xfce4-firstrun | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/tools/xfce4-firstrun b/tools/xfce4-firstrun new file mode 100644 index 0000000..200faf9 --- /dev/null +++ b/tools/xfce4-firstrun @@ -0,0 +1,54 @@ +#!/bin/bash + +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" + exit || 0 +else + if [ ! -e $DESKTOP_FILE ]; then + echo "Localised desktop folder exists." + if [ ! -d $HOME/.config/autostart ]; then + mkdir -p $HOME/.config/autostart + fi + +cat > $HOME/.config/autostart/xfce4-firstrun.desktop << EOF +[Desktop Entry] +Hidden=true +EOF +# + + if [ $MDV_FLAVOUR = "download" -o $MDV_FLAVOUR = "desktop" ]; then + if [ ! -e $USER_DESKTOP/register.desktop ]; then + cp -f /usr/share/mdk/desktop/free/register.desktop $USER_DESKTOP + fi + + if [ ! -e $USER_DESKTOP/upgrade.desktop ]; then + cp -f /usr/share/mdk/desktop/one/upgrade.desktop $USER_DESKTOP + fi + + if [ ! -e $USER_DESKTOP/mandriva-draklive-install.desktop ]; then + cp -f /usr/share/applications/mandriva-draklive-install.desktop $USER_DESKTOP + fi + + xfdesktop --reload + exit || 0 + + else + if [ ! -e $USER_DESKTOP/register.desktop ]; then + cp -f /usr/share/mdk/desktop/powerpack/register.desktop $USER_DESKTOP + fi + + if [ ! -e $USER_DESKTOP/mandriva-draklive-install.desktop ]; then + cp -f /usr/share/applications/mandriva-draklive-install.desktop $USER_DESKTOP + fi + + xfdesktop --reload + exit || 0 + fi + fi +fi + +#EOF |