LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Directing xosd output to X display from crontab (https://www.linuxquestions.org/questions/linux-general-1/directing-xosd-output-to-x-display-from-crontab-333842/)

BWebb 06-15-2005 09:12 AM

Directing xosd output to X display from crontab
 
All,

I am trying to run an xosd script from crontab, but the text in the script does not go to the X display when run from crontab. Now from what I've read this is because cron is not attached to the X display. So, I created a shell script that has the following lines:

#/bin/sh

setenv DISPLAY local.host:0.0

/usr/local/xosd_script

Running this shell script from crontab doesn't work either. While you probably cannot 'pipe' the xosd output to the X display, is there a way to direct the output to a specific X display?

Any ideas?

Thanks,

BW

trickykid 06-29-2005 09:27 AM

My question would be.. where's it suppose to display it on your X display? Do you expect it to just popup on your wallpaper or something? ;)

Artanicus 06-30-2005 12:57 PM

Ive toyde around with xosd and osd_cat for some time, but this one is a toughie..

I got rid of crontab errors when I used 'export DISPLAY=:0' but as you said, no text appears.. (TC: yeah, thats exactly how it should come.. osd_cat draws directly to the root window.. (;)

Maybe by going deeper into the lib there might be an answer, but an obvois one it surely isnt.. ):

Artanicus 06-30-2005 01:09 PM

well, did some more experiments and found a few conditions under which it actually works.. (:

- the owner of the X is the same as the user whose crontab is in question
- we use export to set the DISPLAY variable
- the command 'xhost localhost' has been entered in a terminal under the X in question, can also be executed upon X startup..

When these are met, it seems to work.. (: (atleast under fluxbox where theres nothing blocking it like in kde sometimes)


All times are GMT -5. The time now is 01:51 PM.