Welcome to WebmasterWorld Guest from 54.196.232.162

Forum Moderators: bakedjake

Message Too Old, No Replies

(firefox-bin:): Gtk-WARNING **: cannot open display:

launching firefox with crontab

     
9:47 pm on Apr 9, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:July 16, 2004
posts: 48
votes: 0


Hi,

I have a crontab entry that supposed to launch firefox browser but it does not work. Here is the cron:

45 14 * * 3 DISPLAY=localhost:0.0;/usr/lib/firefox/firefox

I get the following error:
(firefox-bin:27852): Gtk-WARNING **: cannot open display:

It still does not work after i do 'xhost localhost'.

Ideas?

thanks,
tatarin

10:38 pm on Apr 9, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 27, 2001
posts:2547
votes: 0


Not sure but try
export DISPLAY=localhost:0.0;/usr/lib/firefox/firefox
11:32 am on Apr 10, 2008 (gmt 0)

Preferred Member

5+ Year Member

joined:July 13, 2006
posts:500
votes: 0


Or just remove the stray ; before the firefox command.

export sets the variable for the rest of the session, specifying it at the start of the command means it only applies for that command. You probably only need it for that command so just replace the ; with a space.