[wplug] Creating an xmessage box from a hotplug script

Brandon Kuczenski brandon at 301south.net
Fri Feb 24 14:04:58 EST 2006


I have a script that runs upon detecting certain hotplug events. 
Naturally, it runs as root.  I would like this script to generate a 
user-input window using xmessage on the "currently active" X display, if 
such a thing is possible.  I sense, however, that a solution to this 
problem would be fraught with difficulty.

I know that if I "su -", then root cannot talk to my display, but if I 
simply "su", then it can.  I guess this has something to do with the 
environment variables that the X user has defined.  But how could a 
process like this determine which user is even logged in and active, much 
less gain access to his/her environment variables?

I'm a little confused by the whole affair.  Any ideas?

Thanks,
Brandon



More information about the wplug mailing list