21 Oct
2004
21 Oct
'04
13:50
On Thursday, 21 October 2004 15.44, Johnny Ernst Nielsen wrote:
Quite right -- it does not work for this situation, since it is not the las logged in user that runs the script.
It should work (if you put 'export' in front of DISPLAY and XAUTHORITY), I just tried it. It doesn't grab "the last logged in user", it grabs the last logged in user on :0 Try this #!/bin/bash USER=`/usr/bin/last :0|grep still|/usr/bin/awk '{print $1}'` export DISPLAY=:0.0 export XAUTHORITY=/home/$USER/.Xauthority /opt/kde3/bin/kdialog --msgbox "this is a test" I tried it and it works