Using xmessage in system cron?

From: Ryan M Pisani (rpisani_at_csc.com)
Date: 09/20/04

  • Next message: Reuben D. Budiardja: "Dual display with 2 diff. video card"
    To: redhat-list@redhat.com
    Date: Mon, 20 Sep 2004 07:54:11 -0500
    
    

                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
       I'm using Enterprise 3 WKS, and I'm trying to create a system cron that
       monitors aging files for the console user. The problem I'm having is
       that I'm unable to access the display when the script executes.
                                                                                
       I've tried a number of combinations that don't seem to work. For example
       the
       following:
                                                                                
       I grab the console user as so:
       consoleuser=`ls -al /dev/console | awk {'print $3'}`
                                                                                
       Then I attempt to su to the user and display a message back to the
       console:
       (su - $consoleuser -c "export DISPLAY=:0;xhost +localhost;xmessage
       "whatever"")&
                                                                                
       No matter what I've tried like setting the xauth file in the user's
       home. I
       cannot access the display. I keep getting a cannot open display error
       message.
       Is there an easier way that I'm missing?
                                                                                
       Just a note, the same script works without a flaw in Fedora Core 1. Has
       anyone sucessfully accomplished something like this in RedHat Enterprise
       3?
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                

    Ryan Pisani

    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    

  • Next message: Reuben D. Budiardja: "Dual display with 2 diff. video card"