diff options
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | common/autostart/xfce4-update-config.desktop | 11 | ||||
-rw-r--r-- | tools/xfce4-update-config | 46 |
3 files changed, 58 insertions, 0 deletions
@@ -27,6 +27,7 @@ install: install -m 644 common/xfce4/volstatus/* $(DESTDIR)$(xfceconfdir)/xfce4/volstatus/ install -m 644 common/xfce4/*.rc $(DESTDIR)$(xfceconfdir)/xfce4 install -m 644 common/xfce4/*.xrdb $(DESTDIR)$(xfceconfdir)/xfce4 + install -m 755 tools/xfce4-update-tool $(DESTDIR)$(prefix)/bin -install -d $(DESTDIR)$(xfceprofdir) -install -d $(DESTDIR)$(xfceprofdir)/Flash/xfce4/mcs_settings diff --git a/common/autostart/xfce4-update-config.desktop b/common/autostart/xfce4-update-config.desktop new file mode 100644 index 0000000..351c2ec --- /dev/null +++ b/common/autostart/xfce4-update-config.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Mandriva xfce4 update tool +Comment=Update config and icons for Xfce +Icon=mandriva +Exec=xfce4-update-config +StartupNotify=false +Terminal=false +Hidden=false +OnlyShowIn=XFCE; diff --git a/tools/xfce4-update-config b/tools/xfce4-update-config new file mode 100644 index 0000000..939ee0b --- /dev/null +++ b/tools/xfce4-update-config @@ -0,0 +1,46 @@ +#!/bin/bash + +MDV_FLAVOUR=`echo $META_CLASS` +USER_DESKTOP=`xdg-user-dir DESKTOP` +DESKTOP_FILE=$HOME/.config/autostart/xfce4-update-config.desktop + +if [ `whoami` = "root" ]; then + echo "Not supported for root user" + 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-update-config.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 + + xfdesktop --reload + exit || 0 + + else + if [ ! -e $USER_DESKTOP/register.desktop ]; then + cp -f /usr/share/mdk/desktop/powerpack/register.desktop $USER_DESKTOP + fi + + xfdesktop --reload + exit || 0 + fi + fi +fi + +#EOF |