Revision 24200,
509 bytes
checked in by rbasch, 15 years ago
(diff) |
In xsession:
* Define a message function for use by Xsession.d scripts if the
Xsession script has not done so.
|
Line | |
---|
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. |
---|
5 | if ! hash message 2>/dev/null ; then |
---|
6 | message () { |
---|
7 | text="$@" |
---|
8 | echo "$text" | fold -s |
---|
9 | if [ -n "$DISPLAY" ]; then |
---|
10 | if hash zenity 2>/dev/null ; then |
---|
11 | zenity --info --text "$text" |
---|
12 | elif hash xmessage 2>/dev/null ; then |
---|
13 | echo "$text" | fold -s | xmessage -center -file - |
---|
14 | fi |
---|
15 | fi |
---|
16 | } |
---|
17 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.