diff -ru openbox.orig/README openbox/README --- openbox.orig/README 2007-11-13 21:30:29.000000000 -0600 +++ openbox/README 2008-03-23 20:04:47.000000000 -0500 @@ -3,3 +3,20 @@ and to work properly. Openbox is fully functional as a stand-alone working environment, or can be used as a drop-in replacement for the default window manager in the GNOME or KDE desktop environments. + +To use Openbox in KDE or GNOME please specify this in the script or +when running the script by setting KXINIT or GXINIT to "YES", +respectively. For example, to add an option to use Openbox in KDE +you can run: + +KXINIT=YES ./openbox.SlackBuild + +If you do not make the package with this support and you want to run +Openbox in KDE or GNOME, then you should copy the respective xinitrc +script from /usr/doc/openbox to /etc/X11/xinit/. You will also need +to copy openbox-kde-session or openbox-gnome-session to /usr/bin/. +To be used, all the scripts will need to be executable. + +If you do not plan on using a session manager with Openbox you can +build a smaller binary by disabling session management support. To +do this simply configure with '--disable-session-management'. diff -ru openbox.orig/openbox.SlackBuild openbox/openbox.SlackBuild --- openbox.orig/openbox.SlackBuild 2008-03-10 11:08:43.000000000 -0500 +++ openbox/openbox.SlackBuild 2008-03-23 19:45:47.000000000 -0500 @@ -3,11 +3,12 @@ # Slackware build script for Openbox # Written by Chess Griffin +# Modifications for KDE and GNOME xinitrc scripts by Phillip Warner PRGNAM=openbox VERSION=3.4.6.1 ARCH=${ARCH:-i486} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} CWD=$(pwd) @@ -15,6 +16,18 @@ PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +# Set these to "YES" if you want your package to include a xinitrc file +# for running Openbox in KDE or GNOME, respectively. +# Otherwise, you can add the xinitrc files manually to /etc/X11/xinit and +# the openbox-kde-session and openbox-gnome-session files to /usr/bin. +# The files can be found under /usr/doc/openbox +# Don't forget to make them executable if you copy them from /usr/doc! +# +# This can be specified on the command line when calling the build script: +# KXINIT=YES ./openbox.SlackBuild +KXINIT=${KXINIT:-NO} +GXINIT=${GXINIT:-NO} + DOCS="ABOUT-NLS AUTHORS CHANGELOG COMPLIANCE COPYING README" if [ "$ARCH" = "i486" ]; then @@ -59,10 +72,29 @@ # Add xinitrc.openbox so that openbox will show up as an option in xwmconfig install -D -m 0755 $CWD/xinitrc.openbox $PKG/etc/X11/xinit/xinitrc.openbox +# Optionally install xinitrc scripts for running Openbox in KDE or GNOME +# Move the scripts from /usr/bin if the xinitrc scripts are not installed. +if [ "$KXINIT" == "YES" ]; then + install -D -m 0755 $CWD/xinitrc.kde-openbox $PKG/etc/X11/xinit/xinitrc.kde-openbox +else + cat $PKG/usr/bin/openbox-kde-session > $PKG/usr/share/doc/$PRGNAM/openbox-kde-session + rm -v $PKG/usr/bin/openbox-kde-session +fi +if [ "$GXINIT" == "YES" ]; then + install -D -m 0755 $CWD/xinitrc.gnome-openbox $PKG/etc/X11/xinit/xinitrc.gnome-openbox +else + cat $PKG/usr/bin/openbox-gnome-session > $PKG/usr/share/doc/$PRGNAM/openbox-gnome-session + rm -v $PKG/usr/bin/openbox-gnome-session +fi + mkdir -p $PKG/usr/doc mv $PKG/usr/share/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION rmdir $PKG/usr/share/doc cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION +for x in $CWD/xinitrc.*openbox +do + cat $x > $PKG/usr/doc/$PRGNAM-$VERSION/$(basename $x) +done cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild ( cd $PKG/usr/doc ; ln -s $PRGNAM-$VERSION $PRGNAM ) Only in openbox/: xinitrc.gnome-openbox Only in openbox/: xinitrc.kde-openbox diff -ru openbox.orig/xinitrc.openbox openbox/xinitrc.openbox --- openbox.orig/xinitrc.openbox 2008-03-10 11:08:07.000000000 -0500 +++ openbox/xinitrc.openbox 2008-03-23 17:44:19.000000000 -0500 @@ -31,5 +31,4 @@ cat /etc/xdg/openbox/rc.xml > $HOME/.config/openbox/rc.xml fi -exec openbox - +exec openbox-session