Skip to main content
50 votes

Open chromium full screen on start up

Edit this file sudo nano /etc/xdg/lxsession/LXDE-pi/autostart And add this: @xset s off @xset -dpms @xset s noblank @chromium-browser --kiosk http://google.com/ # load chromium after boot and open ...
SK73106's user avatar
  • 641
16 votes

Why is cron needed for Raspbian?

In Unix/Linux systems, lots of OS background tasks are run as cron jobs. To see what won't run if you stop the cron daemon, type these commands: ls -la /etc/cron.hourly ls -la /etc/cron.daily ls -...
Michael Harvey's user avatar
14 votes

Is there a way to remove old files without relying on internet time service?

Since you don't have Internet NTP, the file timestamps are meaningless, being reset to the Pi's "/etc/fake-hwclock.data" time whenever the system is booted. If the daily data file(s) have a ...
dave58's user avatar
  • 345
12 votes

Open chromium full screen on start up

on chromium you can use --start-fullscreen (like F11)
Quadrifoglio Verde's user avatar
10 votes

Why is cron needed for Raspbian?

cron runs tasks (system or user chosen) which need to be run at regular intervals. By itself it uses negligible resources. I suggest you leave cron alone.
joan's user avatar
  • 71.6k
9 votes

Execute a script at sunrise/sunset

If you want to run cron jobs with start times relative to sun up/down or twilight then you could use sunwait It will determine the correct time to wait, based on your location's coordinates. Simple ...
Dirk's user avatar
  • 3,559
8 votes
Accepted

cron not executing python3

As is typical with crontab issues. The environment is not the same as your user or even a sudo/root shell , and env python3 may not return anything (env simply searches through Instead you should ...
crasic's user avatar
  • 3,003
7 votes

Is there a way to remove old files without relying on internet time service?

On a system where the time resets on boot, you can't know what time it is when the system starts, and similarly can't know how long it was when the system was down. But you can count reboots, and you ...
ilkkachu's user avatar
  • 213
6 votes
Accepted

Is it necessary to release Raspberry Pi Camera before rebooting? If so how do I do it?

There is NO NEED to do anything before a reboot. If you issue a sudo reboot command Linux will manage an orderly shutdown of the software. This is, however, a poor way of ensuring a reliable 24/7 ...
Milliways's user avatar
  • 61.4k
6 votes

Execute a script at sunrise/sunset

I tried sunwait, mentioned above, but found it to be a bit clunky. I rewrote a similar program, myself, called heliocron, with the advantages being that it is actively maintained, has clear ...
Michael Freeborn's user avatar
6 votes
Accepted

What is the environment for cron?

We can ask cron to tell us what its environment is. Create a shell script in your home directory (~/) as follows (or with the editor of your choice): $ nano ~/envtst.sh Enter/C+P the following in ...
Seamus's user avatar
  • 22.8k
6 votes

What's different about a crontab reboot?

As I understand your question: You have a cron job to reboot your RPi every night at 01:00; e.g. 0 1 * * * sudo reboot (#or something similar; e.g. shutdown -r now) You have a 2nd cron job to ...
Seamus's user avatar
  • 22.8k
6 votes
Accepted

Is there a way to remove old files without relying on internet time service?

Raspbian includes fake-hwclock, which saves the clock to the SD card on shutdown and restores it on boot. However, if you're just cutting the power to restart it, this is fairly useless; it will never ...
wizzwizz4's user avatar
  • 186
5 votes
Accepted

Raspbian Jessie "wait for network" Vs. Cron @reboot entries

will the entire system halt until the network is up No. where in the boot-up sequence is crontab activated? Crontabs are managed by cron, a system daemon started by init, which on Raspbian jessie ...
goldilocks's user avatar
  • 60.1k
5 votes

Launch Python script from Cron in foreground

To run in foreground you'd need to add DISPLAY=:0: @reboot DISPLAY=:0 \usr\bin\python3 \home\pi\Desktop\photo_frames\get_random_row.py > /logs/cronlog Or open it explicitly with xterm: @reboot ...
techraf's user avatar
  • 4,343
5 votes

Get Bash instead of /bin/sh in a VNC session started by cron

It seems like the problem originates form cron using /bin/sh and not the users SHELL default. I found other people having the same problem at Default shell for cron issue How to change cron shell (sh ...
Frank Breitling's user avatar
5 votes
Accepted

Automatic shutdown of Pi based on timer

You've made a couple of mistakes, all par for the course. Let's step through this, get it working, and hopefully learn one other trick to help you help yourself in the future: First, the "other ...
Seamus's user avatar
  • 22.8k
5 votes

Why is cron needed for Raspbian?

Cron is actually very useful. Say you wanted to run a program once a day, then cron is your friend. You can schedule to run a program at any time during the day. I would definitely leave it on your ...
UNKNOWN's user avatar
  • 99
5 votes
Accepted

Can't run python script on startup. Raspberry Pi 4

You've run into a well-known limitation with cron. The question has been asked and answered here many times. This recent example highlights the two (at least two) choices you have: use cron (older, ...
Seamus's user avatar
  • 22.8k
4 votes

Where do Cron error message go?

Crontab has several parameters (in additional to time execution lines) For example: MAILTO="[email protected]" SHELL="/bin/bash"
DGerman's user avatar
  • 41
4 votes
Accepted

What's wrong with this little python script?

You never flush the buffer, thus, the info is not being dumped to the file. This is done when the file is closed (you never do it), assigning a buffer size (see this stackoverflow answer and comments ...
XiR_'s user avatar
  • 78
4 votes
Accepted

Cronjob is missing the GET parameter in Raspberry Pi

The problem is that cron doesn't wait for your network to come up before it runs @reboot. The explanation as to why cron operates this way, and alternatives to cron are verbose, but have all been ...
Seamus's user avatar
  • 22.8k
4 votes

Crontab suddenly doesn't start jobs

You can help yourself by collecting any error messages that are generated when cron runs your scripts. As you're aware, your shell will send error messages to the stderr stream when they occur. When ...
Seamus's user avatar
  • 22.8k
4 votes
Accepted

CRON schedule to run a .py file

I think you are missing a shebang in the beginning of your python script. Please write #!/usr/bin/env python for python2 or #!/usr/bin/env python3 for python3 as a first line of your .py file. ...
kyjanond's user avatar
  • 231
4 votes

Is there a way to remove old files without relying on internet time service?

You could name your files sequentially and delete the oldest when there’s not much free space left use a larger SD card get the time by other means, for example GPS, DCF77 or RDS
Martin's user avatar
  • 145
3 votes

How to move mouse pointer to a specific location on the screen AT BOOT?

The file /home/pi/.config/lxsession/LXDE-pi/autostart includes the line @point-rpi Description for point-rpi is: Locate the mouse pointer over the menu button This tool determines the current ...
Craig's user avatar
  • 3,014
3 votes

Get Bash instead of /bin/sh in a VNC session started by cron

I was able to fix the issue by adding following line in my ~/.vnc/xstartup : export SHELL=/bin/bash
Tymek's user avatar
  • 131
3 votes
Accepted

Create ssh tunnel on startup

/usr/bin/ssh -i /home/user/.ssh/id_rsa -N -R 4445:localhost:22 user@hostname & You start the process in the background, which is always successful regardless the result. You should use -f switch ...
Jakuje's user avatar
  • 516
3 votes

How do I reboot at a specific time?

I've found other answers here to be incomplete or have bugs. This is a more complete answer that addresses problems I found with other answers and contains information about how to do debugging. Cron ...
Stephen Ostermiller's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible