LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 06-15-2005, 10:12 AM   #1
BWebb
Member
 
Registered: Jan 2004
Posts: 32

Rep: Reputation: 15
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
 
Old 06-29-2005, 10:27 AM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
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, 01:57 PM   #3
Artanicus
Member
 
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, 02:09 PM   #4
Artanicus
Member
 
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)
 
  


Reply


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 01:52 AM
RCA Output as Primary Display? basketkase999 Linux - Hardware 2 12-01-2005 02:23 PM
display ifconfig output in php ?? ALInux Programming 1 10-29-2005 05:23 PM
How do I make PHP display output from my shell script? farmerjoe Programming 2 04-03-2005 02:15 PM
TV-Out display different output than Monitor with Nvidia MasterC Linux - Hardware 1 08-13-2003 07:13 PM


All times are GMT -5. The time now is 08:33 PM.

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