source: trunk/debathena/config/gdm-config/debian/athena-session @ 25535

Revision 25535, 1.1 KB checked in by jdreed, 12 years ago (diff)
In gdm-config: * Update athena-session for the Unity world
  • Property svn:executable set to *
Line 
1#!/bin/sh
2#
3# A wrapper script to decide how to invoke gnome-session
4GNOME_SESSION_VER=`dpkg-query --showformat='${Version}' --show gnome-session`
5
6SESSION="gnome-session"
7ARGS=""
8
9# STDERR will go somewhere useful at this point, right?
10echo "**** Athena session wrapper (/usr/bin/athena-session)" >&2
11echo "**** session started at $(date)" >&2
12
13# Support for --session was added in gnome-session 2.32.1-0ubuntu2
14# according to the changelog
15if dpkg --compare-versions "$GNOME_SESSION_VER" ge '2.32.1-0ubuntu2~'; then
16  if [ -e /usr/share/gnome-session/sessions/classic-gnome.session ]; then
17    ARGS="--session=classic-gnome"
18  elif [ -e /usr/share/gnome-session/sessions/ubuntu-2d.session ]; then
19    ARGS="--session=ubuntu-2d"
20  elif [ -e /usr/share/gnome-session/sessions/ubuntu.session ]; then
21    ARGS="--session=ubuntu"
22  else
23    zenity --error --text="Can't find a valid GNOME session to run (shouldn't happen).  Please report this error to bugs@mit.edu and mention the hostname ($(hostname -f)) in your report."
24    exit 1
25  fi
26fi
27
28echo "**** About to run $SESSION $ARGS $@" >&2
29exec "$SESSION" "$ARGS" "$@"
Note: See TracBrowser for help on using the repository browser.