Questions tagged [script]

non-compiled programs written in scripting languages (e.g. perl, python or tcl) or command line interpreters such as Unix shell.

246 questions
225
votes
12 answers

Execute script on start-up

I am trying to execute a script when my Raspberry Pi boots up. I would like the web browser to open up automatically. I have tried to find a simple solution, (like dropping my script in some "startup" directory or something similar) but I am not…
Tyler Murry
  • 2,353
  • 3
  • 13
  • 5
15
votes
2 answers

Setting timezone non-interactively

What's the best approach for configuring the Time Zone non-interactively? Previously for hostname, I've used sudo raspi-config nonint do_hostname However, I am unable to locate the equivalent command for timezone?
ljtill
  • 153
  • 1
  • 1
  • 5
12
votes
2 answers

Is there a way to automatically activate a script when a USB device connects?

I have a USB device (POV camera) that collects a lot of data a fills up its storage regularly. The goal is to write a script that: Listens for the device to connect via USB Mounts it as a storage device Downloads data from the device Safely…
user3.1415927
  • 303
  • 1
  • 2
  • 13
11
votes
2 answers

Log output of background or boot script

I have a short script which is executed by a system daemon for particular events. I know the event is occurring and the script is executing, but it does not do what I intend. Strangely, it does when I run it manually, so I am very confused. How…
goldilocks
  • 58,187
  • 17
  • 111
  • 227
11
votes
2 answers

Develop a Raspberry python script from a windows

I want to develop a Raspberry python script from the windows side, for several reasons: I want to keep all the code (more) secure on my computer, in case I fry the RPi/try another project/reinstall the Pi. Also my main computer with the two screen…
J4N
  • 293
  • 1
  • 3
  • 9
9
votes
1 answer

Remote full reset (re-install) of a Raspberry

I've had a Raspberry Pi now for some time. I did a lot of fun stuff with it. A lot of the fun stuff is still on there, and that's not always fun. I could reset my Raspberry Pi by walking over to it, powering it down, remove the micro SD card, and…
Nick Dewitte
  • 107
  • 1
  • 1
  • 9
7
votes
3 answers

Clone Raspberry Pi SDCard to file on Mac OS X?

Is there a simple way using Mac OS X (shell preferred) to clone an entire SDCard from the SDCard slot (byte-for-byte)), to a file? I would then want to reverse the process and restore the image from the file to the SDCard. I was considering using…
Will
  • 373
  • 3
  • 16
5
votes
2 answers

Autorun Firefox on startup...grrrrrrr!

Long Story (Short): Okay, I've read all of the guides, questions etc I can find and it's still not happening. I can't get the browser to open its self up when the pi boots. Background: I'm following this…
Mr G Dwyer
  • 71
  • 1
  • 1
  • 6
5
votes
1 answer

How to find out the default init system of my raspbian?

I want to write a script to enable my program on boot automatically. This can be done using SysV Init, Upstart or systemd. However, I am not able to figure out which init system my Raspbian uses. Another doubt I have is that, suppose the default…
Adi
  • 151
  • 1
  • 6
5
votes
2 answers

How to run a script (Node.js) at startup

I've bee reading about running scripts at startup since last weak with no results. I just need to run an application located on my home (/home/pi) at startup (unattended). I tried creating a script at /etc/init.d/, /etc/rc.local, etc. Nothing seems…
vazquezjm
  • 61
  • 1
  • 1
  • 3
4
votes
2 answers

Visualize execution of scripts

I have a script that always runs on the Raspberry Pi. I defined with sudo nano /etc/rc.local so that they turn even after a reboot or a power failure. My question is how can visualize the execution of my scrpits after rebooting or power failure…
Amélie
  • 41
  • 1
4
votes
2 answers

How to set up dashboard for monitoring PI processes

I have PIs that use a schedule to play videos on loop. The PIs also use a daemon file 'surround.sh' to control the video player, and the daemon script allows the user to check the service status of each surround. How can I set up a dashboard…
Kai
  • 41
  • 1
  • 2
4
votes
6 answers

How do I know what version of Python script I'm writing?

As a newbie to Python on the RPi (or anywhere else for that matter), how do I know what version of Python (2 or 3) I'm writing for without looking up every command or syntax while trying to write a script?
n0ukf
  • 77
  • 1
  • 3
4
votes
1 answer

Checking if a given program is running

Is there a way to check if a named program is currently running on an RPi? I am currently running my RPi headless with a VNC server over LAN to initiate the program and check it from time to time when I'm at home. Now, I have SSH access to my…
Kookaburra
  • 113
  • 1
  • 2
  • 10
4
votes
2 answers

Restart mplayer stream process on loss of internet connection

I have just created and set up a script that starts an mplayer internet radio stream right at the startup (desktop) of the PI. But with this set up, if the PI loses it's internet connection, the script must either be manually closed and re-opened,…
1
2 3
16 17