#! /bin/sh
#
# gnome-session-flashback: gnome-session wrapper script for launching a Gnome Flashback session
#
# Copyright (C) 2013 Philipp Kaluza
#
# Authors: Philipp Kaluza <floss@ghostroute.eu>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#

PACKAGE="gnome-panel"
VERSION="3.8.0"
LIBEXECDIR="/usr/lib/gnome-panel"

if [ -w "$HOME/.xsession-errors-flashback" ] ; then
	echo "gnome-session-flashback ($VERSION): attempting to launch" \
	     "gnome-session at $(date --iso-8601=seconds)" \
	     > "$HOME/.xsession-errors-flashback"
	gnome-session --session=gnome-flashback "$@" 2>&1 | tee -a "$HOME/.xsession-errors-flashback"
else
	echo "gnome-session-flashback ($VERSION): attempting to launch" \
	     "gnome-session at $(date --iso-8601=seconds)" >&2
	exec gnome-session --session=gnome-flashback "$@"
fi

