Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 06-15-2005, 09:12 AM   #1
Registered: Jan 2004
Posts: 32

Rep: Reputation: 15
Directing xosd output to X display from crontab


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:


setenv DISPLAY


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?


Old 06-29-2005, 09:27 AM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
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?
Old 06-30-2005, 12:57 PM   #3
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
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.. ):
Old 06-30-2005, 01:09 PM   #4
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
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)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Directing sound output to microphone Night Ink Linux - Software 2 12-28-2007 12:52 AM
RCA Output as Primary Display? basketkase999 Linux - Hardware 2 12-01-2005 01:23 PM
display ifconfig output in php ?? ALInux Programming 1 10-29-2005 04:23 PM
How do I make PHP display output from my shell script? farmerjoe Programming 2 04-03-2005 01:15 PM
TV-Out display different output than Monitor with Nvidia MasterC Linux - Hardware 1 08-13-2003 06:13 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:17 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration