Hola ! On Wed, Jul 20, 2005 at 06:44:16PM -0400, hacker (of golf) wrote: > I'm trying to create a popup to show the connection speed. > > I'm trying this: > > root :~# kdialog --display localhost:0 --msgbox "Connection Speed > `tail -n1 /var/log/ppp-connect-errors | awk '{ print $6 }'` bps" > kdialog: cannot connect to X server localhost:0 > > but, as you can see, it won't connect to the xserver. > > How can I get this to work? >
If you running the X server as the same user you are trying to execute "kdialog" you might want to try this: root:~# kdialog --msgbox "This is a test." --display `env |grep -i display |cut -d'=' -f 2` or better instead of doing that [env|grep|cut] just use: # kdialog --msgbox "this is a test" --display $DISPLAY which actually is what we want to get , the value for DISPLAY environment variable. :) [ instead of using "localhost:0" take a look at the DISPLAY environment variable ] If you are not running the X server as the user who wants to execute the kdialog and you want let others [any] user from [any] host [ not recommended ] : $ xhost + # export DISPLAY=:0.0 && kdialog... Other option would be ssh forwarding to your own box. $ ssh -Xf [EMAIL PROTECTED] 'kdialog --msgbox ......... ' I hope it helps, -- Matías Rollán <[EMAIL PROTECTED]> -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]