source: trunk/debathena/debathena/xsession/debian/00debathena-message @ 24439

Revision 24439, 611 bytes checked in by jhamrick, 15 years ago (diff)
In xsession: * Make sure debathena-xsession is installed before executing any of the scripts in /etc/X11/Xsession.d (Trac: #348)
RevLine 
[24200]1# This file is sourced by Xsession(5), not executed.
2
3# Work around the absence of the message function (to pretty-print user
4# messages) from some versions of gdm's Xsession script.
[24439]5if [ "$(dpkg-query -W -f '${Status}' debathena-xsession 2>/dev/null)" = "install ok installed" ] && \
6   ! hash message 2>/dev/null ; then
[24200]7  message () {
8    text="$@"
9    echo "$text" | fold -s
10    if [ -n "$DISPLAY" ]; then
11      if hash zenity 2>/dev/null ; then
12        zenity --info --text "$text"
13      elif hash xmessage 2>/dev/null ; then
14        echo "$text" | fold -s | xmessage -center -file -
15      fi
16    fi
17  }
18fi
Note: See TracBrowser for help on using the repository browser.