Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
shell script running x apps from crontab
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
lysergicacid
Guru
Guru


Joined: 25 Nov 2003
Posts: 352
Location: The Universe,Virgo Super Cluster,Milky Way,Earth

PostPosted: Mon Apr 24, 2006 12:07 am    Post subject: shell script running x apps from crontab Reply with quote

hi all im trying to get this going :

file : /usr/local/bin/popup.sh

Code:
#!/bin/bash
kdialog --title "POPUP" --msgbox "Hello ;) :)"


from crontab and all i get is :

Code:
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

kdialog: cannot connect to X server :0


can anyone tell me how i would achieve this please :) ?
thank you in advance :)
_________________
[img]http://valid.canardpc.com/cache/banner/2040927.png[/img]
Desktop:
[img]http://valid.canardpc.com/cache/banner/2703952.png[/img]
Back to top
View user's profile Send private message
massysett
Apprentice
Apprentice


Joined: 06 Jan 2006
Posts: 296
Location: Silver Spring, Maryland USA

PostPosted: Mon Apr 24, 2006 12:56 am    Post subject: Reply with quote

hmm, can't give you a precise answer, but Free Software Magazine had a good article about X. It talks about how to connect to specific X servers and things like that. It might be helpful.

http://www.freesoftwaremagazine.com/articles/what_is_x/
_________________
Draft Windows-to-Linux Guide
Back to top
View user's profile Send private message
lysergicacid
Guru
Guru


Joined: 25 Nov 2003
Posts: 352
Location: The Universe,Virgo Super Cluster,Milky Way,Earth

PostPosted: Mon Apr 24, 2006 12:57 am    Post subject: Reply with quote

just looked and wasnt anything usefull that i could see there, but thank you anyway :)

got it to work :) :)

Code:
#!/bin/bash
export INTERVAL=0
export COUNT=10
export CTR=0

while [ true ]
do
        if [ ${CTR} -ge ${COUNT} ]
        then
                exit
        fi
   DISPLAY=:0 /usr/kde/3.5/bin/kdialog --error "You encountered a critical error."
   CTR=$(expr ${CTR} + 1)
   sleep ${INTERVAL}
done


was only for a joke to wind a mate up and it worked :twisted:
_________________
[img]http://valid.canardpc.com/cache/banner/2040927.png[/img]
Desktop:
[img]http://valid.canardpc.com/cache/banner/2703952.png[/img]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum