From 81a00406cbfe8c83734d2a2b4561ca7c0fc3104b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jani=20V=C3=A4limaa?= Date: Tue, 3 Jul 2012 17:45:06 +0000 Subject: move xfce4-firstrun parts to OLD/ --- OLD/autostart/xfce4-firstrun.desktop | 11 +++++++++ OLD/tools/xfce4-firstrun | 48 ++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 OLD/autostart/xfce4-firstrun.desktop create mode 100644 OLD/tools/xfce4-firstrun (limited to 'OLD') diff --git a/OLD/autostart/xfce4-firstrun.desktop b/OLD/autostart/xfce4-firstrun.desktop new file mode 100644 index 0000000..29790f5 --- /dev/null +++ b/OLD/autostart/xfce4-firstrun.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Mageia xfce4 update tool +Comment=Update config and icons for Xfce +Icon=mageia +Exec=xfce4-firstrun +StartupNotify=false +Terminal=false +Hidden=false +OnlyShowIn=XFCE; diff --git a/OLD/tools/xfce4-firstrun b/OLD/tools/xfce4-firstrun new file mode 100644 index 0000000..2e5809b --- /dev/null +++ b/OLD/tools/xfce4-firstrun @@ -0,0 +1,48 @@ +#!/bin/sh +# Simple script which configure Xfce environment for a fresh user +# Author: tpg@mandriva.org +# Licensed under GPL terms + +MGA_FLAVOUR=$(echo $META_CLASS) +USER_DESKTOP=$(xdg-user-dir DESKTOP) +DESKTOP_FILE=$HOME/.config/autostart/xfce4-firstrun.desktop + +if [ $(whoami) = "root" ]; then + echo "xfce4-firstrun: not supported for superuser." + exit || 0 +else + if [ ! -e $DESKTOP_FILE ]; then + echo "xfce4-firstrun: 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 [ $MGA_FLAVOUR = "download" -o $MGA_FLAVOUR = "desktop" ]; then + if [ ! -e $USER_DESKTOP/mageia-draklive-install.desktop ]; then + cp -f /usr/share/applications/mageia-draklive-install.desktop $USER_DESKTOP 2> /dev/null + fi + if [ "$(pidof xfdesktop)" ]; then + xfdesktop --reload 1> /dev/null; echo "xfce4-firstrun: xfdesktop reloaded."; + fi + exit || 0 + else + + if [ ! -e $USER_DESKTOP/mageia-draklive-install.desktop ]; then + cp -f /usr/share/applications/mageia-draklive-install.desktop $USER_DESKTOP 2> /dev/null + fi + 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 -- cgit v1.2.1