Modifying ARM XFCE chroot xinitrc - Need help

Instructions for running openSUSE ARM in a chroot
https://en.opensuse.org/HCL:Chroot
Using this pre-packaged filesystem which includes XFCE
http://download.opensuse.org/ports/armv7hl/distribution/12.2/images/openSUSE-12.2-ARM-XFCE-rootfs.armv7l.tbz

First time I’ve delved into modifying the xinitrc

Problem to be Solved
Have verified that launching a chroot running a Graphical Desktop environment will conflict with the Host if the Host is also running a Desktop because the Window Manager in the chroot will not know about the Host Window Manager despite sharing the same system resources. For that reason, launching a Desktop in the chrrot (XFCE in this case) will cause a conflict because by default it will find DISPLAY:0 already in use (and apparently isn’t smart enough to simply increment to the next possible).

For this reason, you also can’t use Xnest which is a commonly recommended solution to launching a chroot graphical application in a Console because Xnest itself will run a Window Manager for its environment so will cause a conflict when a Desktop loads.

Possible solutions?

  1. Run startx (or its Desktop equivalent) with a modified initrc configuring the Desktop’s Window Manager to launch using a different DISPLAY than 0.0.
  2. X session is supposed to work with an existing running Window Manager, but I’m unsure if a chroot session can work with a Window Manager running on the Host
    **
    Current avenue of Investigation**
    Because of the uncertainty of (2) above, I’m currently trying (1), modifying the initrc script

Need assistance interpreting the highly customized xinitrc that comes with the filesystem described at the top of this post.
The contents of xinitrc.template follows in the codeblock, my specific questions are

  1. Correct me if I’m mistaken, but when modifying the xinitrc, this file (xinitrc.template) should be copied to the User’s home directory (I’ve done this) so that this config/init file is used in place of the default. If this is the case, do I also need to rename the file from xinitrc.template to simply xinitrc?

  2. I’m not very good at reading BASH script code, but it looks to me like code has been inserted that simply uses this process as a hook to optionally install packages and make customizations which may not really be related to starting XFCE and the XFCE environment? Or, maybe this was considered a good idea just in case basic non x86 customizations might be needed?

  3. I’m curious about this specific line towards the end, should this code have deployed the Window Manager on its own DISPLAY or is it supposed to do something else?

exec $WINDOWMANAGER ${1+"$@"}
  1. I’ve already tried the following xfce command which is similar to a command that works for startx, deploying an X Server on its own DISPLAY startx, but doesn’t work with startxfce. Can a command inserted into or modify one of the lines in the following xinitrc be suggested that will do this?
startxfce  --:1

TIA,
TSU



#
# Sample .xinitrc for SuSE Linux
# This script is called from 'startx' when you start an X session
#

#
# In case everything goes wrong, we at least fall back to a plain xterm
#
failsafe="xterm -ls -T Failsafe -geometry 80x24-0-0"
trap "exec $failsafe" EXIT SIGHUP SIGINT SIGPIPE SIGTERM SIGIO

#
# Some bash (1 and 2) settings to avoid trouble on a
# failed program call.
#
set +e > /dev/null 2>&1
set +u > /dev/null 2>&1
set +o posix  > /dev/null 2>&1
if type shopt > /dev/null 2>&1 ; then
    shopt -s execfail
else
    no_exit_on_failed_exec=1
fi

#
# Run user xinit scripts.
#
for script in /etc/X11/xinit/xinitrc.d/*; do
    test -e $script || continue
    test -d $script && continue
    case "$script" in
        .*)             continue ;;
        *.rpm*)         continue ;;
        *.swap)         continue ;;
        *.bak)          continue ;;
        *.orig)         continue ;;
        \#*)            continue ;;
        *~)             continue ;;
    esac
    if test -x $script ; then
        if grep -qE "^# to be sourced" $script >/dev/null 2>&1; then
            . $script
        else
            $script &
        fi
    else
        . $script
    fi
done
unset script

#
# Source common code shared between the
# X session and X init scripts
#
. /etc/X11/xinit/xinitrc.common

#
# Special for twm
#
case "$WINDOWMANAGER" in
    *twm) xsetroot -solid darkslateblue
esac

#
# Uncomment next lines to activate asking for ssh passphrase
#
# if test -S "$SSH_AUTH_SOCK" -a -x "$SSH_ASKPASS"; then
#       ssh-add < /dev/null
# fi

#
# Add your own lines here...
#


# day planer deamon
# pland &

#
# finally start the window manager
#
unset WINDOW_MANAGER STARTUP
exec $WINDOWMANAGER ${1+"$@"}

# call failsafe
exit 0