Welcome to WebmasterWorld Guest from

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


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'.



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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 27, 2001
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

10+ Year Member

joined:July 13, 2006
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.


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members