Using xmessage in system cron?

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

 



                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
   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@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux