[torqueusers] Getting DISPLAY env variable from a job

Garrick Staples garrick at usc.edu
Tue Mar 2 09:28:46 MST 2010

On Tue, Mar 02, 2010 at 11:26:02AM -0500, Prakash Velayutham alleged:
> Hi,
> I am running Torque 2.3.6. Is there a way to get a job's DISPLAY env.  
> variable (in case they do qsub -I -X, that is) in either prolog or  
> somewhere in the MOM node? I am getting ready to write some scripts  
> that would warn a user about their interactive job (graphical or text- 
> based) reaching the time limit.
> In a text-based interactive job, I think I will able to do a "wall" to  
> the user's tty, but not sure how to display a pop-up window in a  
> graphical application in the correct display.
> Thanks for any pointers.


cat /proc/$pid/environ | xargs -0 -n 1 echo | grep DISPLAY

Garrick Staples, GNU/Linux HPCC SysAdmin
University of Southern California

Life is Good!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torqueusers/attachments/20100302/5a27605c/attachment.bin 

More information about the torqueusers mailing list