[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Sleep on TiBook, getting Gnome sounds working



On Tue, Jul 10, 2001 at 01:19:49PM +1000, Brendan O'Dea wrote:
> 
> xmessage will require at least $DISPLAY, and almost certainly
> $XAUTHORITY to be set for that to work.  The latter is somewhat tricky,
> since X may be started in many ways although this *may* work if you use
> xdm:
> 
>   XAUTHORITY=/var/lib/xdm/authdir/authfiles/* \
>       DISPLAY=:0.0 /usr/X11R6/bin/xmessage -center -timout 15 "$msg"

deficient.

the proper way to implement a GUI warning dialog like this is probably
to setup a named pipe, or socket in /dev, then have each user start a little
daemon (could be done from /etc/X11/Xsession as ssh-agent is) that
listens to that fifo/socket, when a message is written there it
displays a dialog.  

one could then modify wall to write its message into that fifo as well
as all writable tty's.  (fifo should be 664 root.tty).  

there may be better ways to implement the details, for example it
would be better if one could use a tty associated with X, but since
there apperently isn't one in some cases... the model of the user
running a small daemon listening for messages makes much more sense
then screwing around trying to steal users's MIT cookies.

if i knew anything about X programming i might try and make something
like this, but since i don't someone else can try.

> wall requires the message in a file (possibly stdin) rather than as an
> argument:
> 
>   echo "$msg" | /usr/bin/wall

yeah duh, rtfm sheesh ;-)

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgp1EVxXBEFrd.pgp
Description: PGP signature


Reply to: