Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Mon Sep 16, 2019 11:18 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Odd behaviour with Fedora
PostPosted: Thu Mar 12, 2009 1:56 pm 
Offline

Joined: Thu Nov 09, 2006 2:41 pm
Posts: 90
I'm not sure if this problem is due to RB or Fedora, but here goes.

I have an app developed in RB on my Windows box and compliled for Linux. It works just fine on my Linux box when I run it manually. What I want to do is to have it run automatically, using cron. I've written a script which launches the program, and that also works fine when I run it manually. However, when cron tries to run it, nothing happens except it e-mails me with the message:

Gtk-WARNING **: cannot open display:

I've tried googling this message but none of the results seem to fit this case.


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd behaviour with Fedora
PostPosted: Thu Mar 12, 2009 2:18 pm 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
cron can only launch console apps.


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd behaviour with Fedora
PostPosted: Thu Mar 12, 2009 2:23 pm 
Offline

Joined: Thu Nov 09, 2006 2:41 pm
Posts: 90
timhare wrote:
cron can only launch console apps.


Damn, I clean forgot that (too busy getting the app to work). Does anyone know how to schedule a normal app? This can't be a console app because its whole purpose is to collect data from a database, use it to draw a graph and ftp the graph to a remote server.


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd behaviour with Fedora
PostPosted: Thu Mar 12, 2009 3:24 pm 
Offline
User avatar

Joined: Wed Nov 15, 2006 3:50 pm
Posts: 2353
Location: England
Maybe stupid suggestion but.. can a console app start a GUI app?
If so, write a diddy console app, start it with cron, and have it launch the GUI full thing


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd behaviour with Fedora
PostPosted: Thu Mar 12, 2009 9:18 pm 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
It's not whether a console app can start a GUI app, it's whether a console app started by cron can start a GUI app. It cannot. It's cron that makes the difference - there is no GUI environment. You must be logged in as a regular user to have a GUI.

Tim


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd behaviour with Fedora
PostPosted: Fri Mar 13, 2009 1:46 am 
Offline

Joined: Thu Nov 09, 2006 2:41 pm
Posts: 90
timhare wrote:
It's not whether a console app can start a GUI app, it's whether a console app started by cron can start a GUI app. It cannot. It's cron that makes the difference - there is no GUI environment. You must be logged in as a regular user to have a GUI.

Tim


Exactly. In fact the RB documentation states that graphical objects can't be used in a console app, which is why I didn't write mine as a console app. My app doesn't need a GUI; it draws a picture which it saves to disk without displaying it. It works entirely automatically without any user intervention at all.


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd behaviour with Fedora
PostPosted: Fri Mar 13, 2009 3:09 am 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
But it does need the graphical environment to be able to manipulate the picture. You could probably do the whole thing with declares, but then what's the point of using RB.

Tim


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd behaviour with Fedora
PostPosted: Fri Mar 13, 2009 3:27 am 
Offline

Joined: Thu Nov 09, 2006 2:41 pm
Posts: 90
timhare wrote:
But it does need the graphical environment to be able to manipulate the picture. You could probably do the whole thing with declares, but then what's the point of using RB.


Yeah, but I don't have the time to get into that. Like you said, I wouldn't need RB, but I use RB to save time!


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd behaviour with Fedora
PostPosted: Fri Mar 13, 2009 6:29 am 
Offline
User avatar

Joined: Wed Nov 15, 2006 3:50 pm
Posts: 2353
Location: England
Could you change your drawing code to produce VML or SVG instructions embedded in an HTML page?

[OFF](If only one of these worked with all browsers...)


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd behaviour with Fedora
PostPosted: Fri Mar 13, 2009 7:49 am 
Offline

Joined: Thu Nov 09, 2006 2:41 pm
Posts: 90
jefftullin wrote:
Could you change your drawing code to produce VML or SVG instructions embedded in an HTML page?

[OFF](If only one of these worked with all browsers...)


Interesting idea that I'll have to try. Thanks!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours


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

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group