#!/bin/bash

if [ "$KDE_FULL_SESSION" == "true" ]; then
    if which celestia-kde > /dev/null 2>&1; then exec celestia-kde $* ; fi
fi

if [ "$GNOME_DESKTOP_SESSION_ID" ]; then
        if which celestia-gnome > /dev/null 2>&1; then exec celestia-gnome $* ; fi
fi

if which celestia-kde > /dev/null 2>&1; then exec celestia-kde $* ; fi
if which celestia-gnome > /dev/null 2>&1; then exec celestia-gnome $* ; fi
if which celestia-glut > /dev/null 2>&1; then exec celestia-glut $* ; fi

echo
echo No celestia front-end found.  Check your installation.
echo You need to install one of the following packages:
echo - celestia
echo - celestia-gnome
echo - celestia-glut
echo

exit 1;
