On Mon, 25 Nov 2002 22:42:36 -0600 Gerald Livingston <[EMAIL PROTECTED]> wrote:
> I've dug through documentation all over the place and no go so far. > > How can I let a procmail recipe pop up a display using xmessage if the > user owning the procmailrc happens to be logged in to a local xsession > at the time it is processed? I keep getting the following error: > > Error: Can't open display: > > This is the recipe: > > #test case > :0bc > * ^From.*[EMAIL PROTECTED] > |/usr/X11R6/bin/xmessage --display :0.0 -default okay -nearmouse -file > |- > > I have xmessage working how I want from the command line, just can't > get it to pop to the displat from procmail. > > I'll also need to add a "&" on that recipe so procmail won't stop > there, right? > > G I now have this working, so long as I don't log out, then back in to X. See below for my new question. Here is aht I have done to get it working. I'm using gdm and gnome. Every tim I log in my XAUTHORITY changes to a new file in /tmp. So, after I get logged in to X I issue the following command in a shell: set|grep XAUTH>~/tempfile then I use this .procmailrc snippet to let procmail use the X display: SHELL=/bin/sh PATH=$PATH:/usr/local/bin:/usr/local/mh/bin:/usr/bin:/bin MAILDIR=$HOME/Maildir/ LOGFILE=$HOME/Mail/fetchlog XMSG=/usr/X11R6/bin/xmessage DISPLAY=:0 PROCX=$HOME/tempfile INCLUDERC=$PROCX #FAILDROP=failed.mail Note the PROCX variable and the INCLUDERC. This sets the XAUTHORITY variable in .procmailrc. So, what I need now is a way to automatically issue that cat command each time I log in through gdm. Does a gdm login even look at ~/.xsession? If it DOES, has the XAUTH already been issued at that point? And, lastly, is there a way to modify that tempfile when I log out of X (make its only line say XAUTHORITY rather than XAUTHORITY=/tmp/something) so I can include a test in procmail to skip the display recipe if XAUTHORITY is un-set? Thanks, Gerald -- Configure your Email to send TEXT ONLY -- See the following page: http://expita.com/nomime.html gvl2 (Gerald) AirBall the Rolling Basket Case (1969 Standard Beetle) LifeSaver (1974 Bay Window Bus) http://www.phorce1.com -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]