I have created cronjob as @reboot root sleep 75 && firefox but then I test it, but it didn't work. In /var/spool/mail/root it shows me this

enter image description here

what I want to archive is after every reboot I want to automatically load my firefox browser. Want to do it with this with cron job or even with systemd unit file as Crontab job start +1 min after @reboot

  • 1
    I recommend you copy and paste the text from the screen instead of a picture of the screen. The primary reason is that it's considered good etiquette on unix.se, and will help you get answers more quickly.
    – RobertL
    Sep 24, 2018 at 2:58
  • 2
    You should probably put the desired commands in the startup for your desktop system, KDE, Gnome, etc. Or maybe X window startup. You can't really run firefox until X is running.
    – RobertL
    Sep 24, 2018 at 3:09

1 Answer 1


after every reboot I want to automatically load my firefox browser.

A cronjob is not the correct way to do so.

For Firefox to be able to run, your X environment (KDE or GNOME) must have already started. Hence the error about $DISPLAY mentioned in the last line of your input.

Therefore you need to configure KDE or GNOME to run Firefox upon start. For instance, here's a related question regarding GNOME: https://askubuntu.com/questions/37957/how-do-i-manage-applications-on-startup-in-gnome-3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.