summaryrefslogtreecommitdiffstats
path: root/kde/post-install
diff options
context:
space:
mode:
Diffstat (limited to 'kde/post-install')
-rw-r--r--kde/post-install/k3b.post-install2
-rw-r--r--kde/post-install/kde-runtime.post-install5
-rw-r--r--kde/post-install/kde-workspace.post-install35
-rw-r--r--kde/post-install/kde-workspace/config/Xsession88
-rw-r--r--kde/post-install/kde-workspace/config/Xsession.orig65
-rwxr-xr-xkde/post-install/kde-workspace/xinit/xinitrc.kde32
-rw-r--r--kde/post-install/kdebase.post-install9
-rwxr-xr-xkde/post-install/kdebase/profile.d/kde.csh12
-rwxr-xr-xkde/post-install/kdebase/profile.d/kde.sh13
-rw-r--r--kde/post-install/kdelibs.post-install2
-rw-r--r--kde/post-install/konsole.post-install12
11 files changed, 275 insertions, 0 deletions
diff --git a/kde/post-install/k3b.post-install b/kde/post-install/k3b.post-install
new file mode 100644
index 0000000..8810114
--- /dev/null
+++ b/kde/post-install/k3b.post-install
@@ -0,0 +1,2 @@
+# Move the dbus configuration files to the proper place:
+mv $PKG/etc/kde/dbus-1 $PKG/etc/
diff --git a/kde/post-install/kde-runtime.post-install b/kde/post-install/kde-runtime.post-install
new file mode 100644
index 0000000..914cfe8
--- /dev/null
+++ b/kde/post-install/kde-runtime.post-install
@@ -0,0 +1,5 @@
+# Create a symlink in /usr/bin to the kdesu binary
+( cd $PKG/usr/bin ; ln -s /usr/lib${LIBDIRSUFFIX}/kde4/libexec/kdesu . )
+
+# Remove the hicolor icon theme index.theme so it doesn't clobber the real one
+rm -f $PKG/usr/share/icons/hicolor/index.theme
diff --git a/kde/post-install/kde-workspace.post-install b/kde/post-install/kde-workspace.post-install
new file mode 100644
index 0000000..68dd052
--- /dev/null
+++ b/kde/post-install/kde-workspace.post-install
@@ -0,0 +1,35 @@
+
+# Use ck-launch-session in runlevel 3,
+# to start and attach a ConsoleKit session to the X session:
+mkdir -p $PKG/etc/X11/xinit
+cat $CWD/post-install/kde-workspace/xinit/xinitrc.kde > $PKG/etc/X11/xinit/xinitrc.kde
+chmod 0755 $PKG/etc/X11/xinit/xinitrc.kde
+
+# Setup config files for KDM:
+$PKG/usr/bin/genkdmconf --no-old --no-old-scripts --no-backup --in $PKG/usr/share/config/kdm
+
+# Not allowing root to login at the console is just plain silly. If they
+# have physical access to the machine, what's the point of trying to stop
+# this? Even the kdmrc file says this is supposed to be the default.
+sed -i 's/AllowRootLogin=false/AllowRootLogin=true/' \
+ $PKG/usr/share/config/kdm/kdmrc
+# We are also not ready to create a separate 'kdm' non-root user:
+sed -i 's/GreeterUID=kdm/#&/' \
+ $PKG/usr/share/config/kdm/kdmrc
+mv $PKG/usr/share/config/kdm/kdmrc $PKG/usr/share/config/kdm/kdmrc.new
+
+cp -a $PKG/usr/share/config/kdm/Xsession $PKG/usr/share/config/kdm/Xsession.orig
+cat $CWD/post-install/kde-workspace/config/Xsession | sed -e "s#/lib#/lib${LIBDIRSUFFIX}#" \
+ > $PKG/usr/share/config/kdm/Xsession
+mv $PKG/usr/share/config/kdm/backgroundrc $PKG/usr/share/config/kdm/backgroundrc.new
+
+# Move the KDM files someplace FHS compliant:
+mkdir -p $PKG/etc/kde
+mv $PKG/usr/share/config/kdm $PKG/etc/kde
+( cd $PKG/usr/share/config ; ln -sf ../../../etc/kde/kdm . )
+
+# Move the polkit dbus configuration files to the proper place:
+mv $PKG/etc/kde/dbus-1 $PKG/etc/
+
+# This is fubar:
+rm -f $PKG/usr/share/icons/hicolor/index.theme
diff --git a/kde/post-install/kde-workspace/config/Xsession b/kde/post-install/kde-workspace/config/Xsession
new file mode 100644
index 0000000..736f5d5
--- /dev/null
+++ b/kde/post-install/kde-workspace/config/Xsession
@@ -0,0 +1,88 @@
+#! /bin/sh
+# Xsession - run as user
+
+# Merged in parts of the old Xsession to load defaults from
+# Xresources and Xmodmap files, 2006-02-09 volkerdi
+# Merged with the new Xsession (original) from KDE4, 20071220 rworkman
+
+ session=$1
+
+# This section is borrowed from the old X11 Xsession file:
+userresources=$HOME/.Xresources
+usermodmap=$HOME/.Xmodmap
+sysresources=/usr/lib/X11/xinit/.Xresources
+sysmodmap=/usr/lib/X11/xinit/.Xmodmap
+# merge in defaults and keymaps
+if [ -r $sysresources ]; then
+ /usr/bin/xrdb -merge $sysresources
+fi
+if [ -r $sysmodmap ]; then
+ /usr/bin/xmodmap $sysmodmap
+fi
+if [ -r $userresources ]; then
+ /usr/bin/xrdb -merge $userresources
+fi
+if [ -r $usermodmap ]; then
+ /usr/bin/xmodmap $usermodmap
+fi
+
+# Note that the respective logout scripts are not sourced.
+case $SHELL in
+ */bash)
+ [ -z "$BASH" ] && exec $SHELL $0 "$@"
+ set +o posix
+ [ -f /etc/profile ] && . /etc/profile
+ if [ -f $HOME/.bash_profile ]; then
+ . $HOME/.bash_profile
+ elif [ -f $HOME/.bash_login ]; then
+ . $HOME/.bash_login
+ elif [ -f $HOME/.profile ]; then
+ . $HOME/.profile
+ fi
+ ;;
+ */zsh)
+ [ -z "$ZSH_NAME" ] && exec $SHELL $0 "$@"
+ emulate -R zsh
+ [ -d /etc/zsh ] && zdir=/etc/zsh || zdir=/etc
+ zhome=${ZDOTDIR:-$HOME}
+ # zshenv is always sourced automatically.
+ [ -f $zdir/zprofile ] && . $zdir/zprofile
+ [ -f $zhome/.zprofile ] && . $zhome/.zprofile
+ [ -f $zdir/zlogin ] && . $zdir/zlogin
+ [ -f $zhome/.zlogin ] && . $zhome/.zlogin
+ ;;
+ */csh|*/tcsh)
+ # [t]cshrc is always sourced automatically.
+ # Note that sourcing csh.login after .cshrc is non-standard.
+ xsess_tmp=`mktemp /tmp/xsess-env-XXXXXX`
+ $SHELL -c "if (-f /etc/csh.login) source /etc/csh.login; if (-f ~/.login) source ~/.login; /bin/sh -c export -p >! $xsess_tmp"
+ . $xsess_tmp
+ rm -f $xsess_tmp
+ ;;
+ *) # Plain sh, ksh, and anything we do not know.
+ [ -f /etc/profile ] && . /etc/profile
+ [ -f $HOME/.profile ] && . $HOME/.profile
+ ;;
+esac
+
+[ -f /etc/xprofile ] && . /etc/xprofile
+[ -f $HOME/.xprofile ] && . $HOME/.xprofile
+
+case $session in
+ "")
+ exec xmessage -center -buttons OK:0 -default OK "Sorry, $DESKTOP_SESSION is no valid session."
+ ;;
+ failsafe)
+ exec xterm -geometry 80x24-0-0
+ ;;
+ custom)
+ exec $HOME/.xsession
+ ;;
+ default)
+ exec /usr/bin/startkde
+ ;;
+ *)
+ eval exec "$session"
+ ;;
+esac
+exec xmessage -center -buttons OK:0 -default OK "Sorry, cannot execute $session. Check $DESKTOP_SESSION.desktop."
diff --git a/kde/post-install/kde-workspace/config/Xsession.orig b/kde/post-install/kde-workspace/config/Xsession.orig
new file mode 100644
index 0000000..43d78b8
--- /dev/null
+++ b/kde/post-install/kde-workspace/config/Xsession.orig
@@ -0,0 +1,65 @@
+#! /bin/sh
+# Xsession - run as user
+
+session=$1
+
+# Note that the respective logout scripts are not sourced.
+case $SHELL in
+ */bash)
+ [ -z "$BASH" ] && exec $SHELL $0 "$@"
+ set +o posix
+ [ -f /etc/profile ] && . /etc/profile
+ if [ -f $HOME/.bash_profile ]; then
+ . $HOME/.bash_profile
+ elif [ -f $HOME/.bash_login ]; then
+ . $HOME/.bash_login
+ elif [ -f $HOME/.profile ]; then
+ . $HOME/.profile
+ fi
+ ;;
+ */zsh)
+ [ -z "$ZSH_NAME" ] && exec $SHELL $0 "$@"
+ emulate -R zsh
+ [ -d /etc/zsh ] && zdir=/etc/zsh || zdir=/etc
+ zhome=${ZDOTDIR:-$HOME}
+ # zshenv is always sourced automatically.
+ [ -f $zdir/zprofile ] && . $zdir/zprofile
+ [ -f $zhome/.zprofile ] && . $zhome/.zprofile
+ [ -f $zdir/zlogin ] && . $zdir/zlogin
+ [ -f $zhome/.zlogin ] && . $zhome/.zlogin
+ ;;
+ */csh|*/tcsh)
+ # [t]cshrc is always sourced automatically.
+ # Note that sourcing csh.login after .cshrc is non-standard.
+ xsess_tmp=`mktemp /tmp/xsess-env-XXXXXX`
+ $SHELL -c "if (-f /etc/csh.login) source /etc/csh.login; if (-f ~/.login) source ~/.login; /bin/sh -c export -p >! $xsess_tmp"
+ . $xsess_tmp
+ rm -f $xsess_tmp
+ ;;
+ *) # Plain sh, ksh, and anything we do not know.
+ [ -f /etc/profile ] && . /etc/profile
+ [ -f $HOME/.profile ] && . $HOME/.profile
+ ;;
+esac
+
+[ -f /etc/xprofile ] && . /etc/xprofile
+[ -f $HOME/.xprofile ] && . $HOME/.xprofile
+
+case $session in
+ "")
+ exec xmessage -center -buttons OK:0 -default OK "Sorry, $DESKTOP_SESSION is no valid session."
+ ;;
+ failsafe)
+ exec xterm -geometry 80x24-0-0
+ ;;
+ custom)
+ exec $HOME/.xsession
+ ;;
+ default)
+ exec /usr/bin/startkde
+ ;;
+ *)
+ eval exec "$session"
+ ;;
+esac
+exec xmessage -center -buttons OK:0 -default OK "Sorry, cannot execute $session. Check $DESKTOP_SESSION.desktop."
diff --git a/kde/post-install/kde-workspace/xinit/xinitrc.kde b/kde/post-install/kde-workspace/xinit/xinitrc.kde
new file mode 100755
index 0000000..a33eb06
--- /dev/null
+++ b/kde/post-install/kde-workspace/xinit/xinitrc.kde
@@ -0,0 +1,32 @@
+#!/bin/sh
+# $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $
+
+userresources=$HOME/.Xresources
+usermodmap=$HOME/.Xmodmap
+sysresources=/etc/X11/xinit/.Xresources
+sysmodmap=/etc/X11/xinit/.Xmodmap
+
+# merge in defaults and keymaps
+
+if [ -f $sysresources ]; then
+ xrdb -merge $sysresources
+fi
+
+if [ -f $sysmodmap ]; then
+ xmodmap $sysmodmap
+fi
+
+if [ -f $userresources ]; then
+ xrdb -merge $userresources
+fi
+
+if [ -f $usermodmap ]; then
+ xmodmap $usermodmap
+fi
+
+# Start the window manager:
+if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
+ ck-launch-session startkde
+else
+ startkde
+fi
diff --git a/kde/post-install/kdebase.post-install b/kde/post-install/kdebase.post-install
new file mode 100644
index 0000000..e18f8fe
--- /dev/null
+++ b/kde/post-install/kdebase.post-install
@@ -0,0 +1,9 @@
+# Add profile scripts
+mkdir -p $PKG/etc/profile.d
+cat $CWD/post-install/kdebase/profile.d/kde.sh \
+ | sed -e "s#/lib/#/lib${LIBDIRSUFFIX}/#" \
+ > $PKG/etc/profile.d/kde.sh
+cat $CWD/post-install/kdebase/profile.d/kde.csh \
+ | sed -e "s#/lib/#/lib${LIBDIRSUFFIX}/#" \
+ > $PKG/etc/profile.d/kde.csh
+chmod 0755 $PKG/etc/profile.d/*
diff --git a/kde/post-install/kdebase/profile.d/kde.csh b/kde/post-install/kdebase/profile.d/kde.csh
new file mode 100755
index 0000000..a09579b
--- /dev/null
+++ b/kde/post-install/kdebase/profile.d/kde.csh
@@ -0,0 +1,12 @@
+#!/bin/csh
+# KDE additions:
+if ( ! $?KDEDIRS ) then
+ setenv KDEDIRS /usr
+endif
+setenv PATH ${PATH}:/usr/lib/kde4/libexec
+
+if ( $?XDG_CONFIG_DIRS ) then
+ setenv XDG_CONFIG_DIRS ${XDG_CONFIG_DIRS}:/etc/kde/xdg
+else
+ setenv XDG_CONFIG_DIRS /etc/xdg:/etc/kde/xdg
+endif
diff --git a/kde/post-install/kdebase/profile.d/kde.sh b/kde/post-install/kdebase/profile.d/kde.sh
new file mode 100755
index 0000000..6f0199e
--- /dev/null
+++ b/kde/post-install/kdebase/profile.d/kde.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+# KDE additions:
+KDEDIRS=/usr
+export KDEDIRS
+PATH="$PATH:/usr/lib/kde4/libexec"
+export PATH
+if [ ! "$XDG_CONFIG_DIRS" = "" ]; then
+ XDG_CONFIG_DIRS=$XDG_CONFIG_DIRS:/etc/kde/xdg
+else
+ XDG_CONFIG_DIRS=/etc/xdg:/etc/kde/xdg
+fi
+export XDG_CONFIG_DIRS
+
diff --git a/kde/post-install/kdelibs.post-install b/kde/post-install/kdelibs.post-install
new file mode 100644
index 0000000..9239a3e
--- /dev/null
+++ b/kde/post-install/kdelibs.post-install
@@ -0,0 +1,2 @@
+# Move the polkit dbus configuration files to the proper place:
+mv $PKG/etc/kde/dbus-1 $PKG/etc/
diff --git a/kde/post-install/konsole.post-install b/kde/post-install/konsole.post-install
new file mode 100644
index 0000000..b0ef9a6
--- /dev/null
+++ b/kde/post-install/konsole.post-install
@@ -0,0 +1,12 @@
+# "konsole -ls" is no longer valid syntax for konsole, even though it's
+# still documented in the help manual. Here's a way to get the same
+# thing, and it works here, but I honestly don't know how it will act
+# everywhere with every shell. I just know it works with bash and ksh
+sed -i -e 's/Exec=konsole/Exec=konsole -e $SHELL -l/' \
+ $PKG/usr/share/applications/kde4/konsole.desktop
+
+## I find this a little bit too bright... <change by pjv>
+## Change the konsole defaults to look like the real Linux console:
+#sed -i 's/ColorScheme=Linux/ColorScheme=WhiteOnBlack/' \
+# $PKG/usr/share/apps/konsole/Shell.profile
+