X Strike Force SVN commit: rev 144 - in trunk/debian: . local
Author: branden
Date: 2003-06-05 08:18:34 -0500 (Thu, 05 Jun 2003)
New Revision: 144
Modified:
trunk/debian/changelog
trunk/debian/local/Xsession
trunk/debian/local/Xsession.5
Log:
* debian/local/Xsession
(message,message_nonl): if $DISPLAY is set and the xmessage command is
present, also use xmessage to create a dialog box for the message being
reported
* debian/local/Xsession.5: document the above behavior
Inspired by a patch from Petter Reinholdtsen. Closes: #179904.
Modified: trunk/debian/local/Xsession.5
==============================================================================
--- trunk/debian/local/Xsession.5 2003-06-05 13:08:41 UTC (rev 143)
+++ trunk/debian/local/Xsession.5 2003-06-05 13:18:34 UTC (rev 144)
@@ -250,19 +250,25 @@
.B message
is used for communicating with the user. It may be given an arbitrarily
long message string. It is formatted to the user's terminal width
-(breaking lines at whitespace) and sent to standard error.
+(breaking lines at whitespace) and sent to standard error. If the
+.I DISPLAY
+environment variable is set and the
+.BR xmessage (1x)
+program is available, in which case
+.B xmessage
+is also used to display the message.
.PP
.B message_nonl
is used for communicating with the user when a trailing newline is
-undesirable. It may be given an arbitrarily long message string. It is
-formatted to the user's terminal width (breaking lines at whitespace) and
-sent to standard error.
+undesirable; it omits a trailing newling from the message text. It
+otherwise works as
+.BR message .
.PP
.B errormsg
-is used for indicating an error condition and aborting the script. It can
-be used as
-.B message
-above. After displaying the message to standard error, it will exit
+is used for indicating an error condition and aborting the script. It
+works as
+.BR message ,
+above, except that after displaying the message, it will exit
.I Xsession
with status 1.
.SH ENVIRONMENT
@@ -347,6 +353,7 @@
.BR startx (1x),
.BR tempfile (1),
.BR xdm (1x),
+.BR xmessage (1x),
.BR xmodmap (1x),
.BR xrdb (1x),
.BR sh (1)
Modified: trunk/debian/local/Xsession
==============================================================================
--- trunk/debian/local/Xsession 2003-06-05 13:08:41 UTC (rev 143)
+++ trunk/debian/local/Xsession 2003-06-05 13:18:34 UTC (rev 144)
@@ -9,16 +9,23 @@
PROGNAME=Xsession
message () {
- # pretty-print messages of arbitrary length
+ # pretty-print messages of arbitrary length; use xmessage if it
# is available and $DISPLAY is set
MESSAGE="$PROGNAME: $*"
echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2
+ if [ -n "$DISPLAY" ] && which xmessage > /dev/null 2>&1; then
+ echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -file -
+ fi
}
message_nonl () {
- # pretty-print messages of arbitrary length (no trailing newline)
+ # pretty-print messages of arbitrary length (no trailing newline); use
+ # xmessage if it is available and $DISPLAY is set
MESSAGE="$PROGNAME: $*"
- echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2
+ echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2;
+ if [ -n "$DISPLAY" ] && which xmessage > /dev/null 2>&1; then
+ echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -file -
+ fi
}
errormsg () {
Modified: trunk/debian/changelog
==============================================================================
--- trunk/debian/changelog 2003-06-05 13:08:41 UTC (rev 143)
+++ trunk/debian/changelog 2003-06-05 13:18:34 UTC (rev 144)
@@ -26,8 +26,12 @@
* debian/{xdm.postinst.in,xdm.prerm.in,xfree86-common.postinst.in,
xfs.postinst.in,xfs.prerm.in}: use invoke-rc.d to execute init scripts
rather than using the absolute path of the init script itself
+ * debian/local/Xsession: if $DISPLAY is set and the xmessage command is
+ present, also use xmessage to create a dialog box for the message being
+ reported (based on a patch by Petter Reinholdtsen) (Closes: #179904)
+ * debian/local/Xsession.5: document Xsession's new behavior
- -- Branden Robinson <branden@debian.org> Thu, 5 Jun 2003 06:29:05 -0500
+ -- Branden Robinson <branden@debian.org> Thu, 5 Jun 2003 08:15:53 -0500
xfree86 (4.2.1-7) unstable; urgency=medium
Reply to: