Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [script]

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

-1
votes
0answers
20 views

Automatic starting script [duplicate]

Can I create a script in Python 3 that will automatically start when powering up my Raspberry Pi zero v1.3 (no wifi and no GUI - use of Raspbian lite)? If so, can you help me a bit further with the ...
0
votes
1answer
49 views

I want to do this, what programming languages and libraries do I need to know?

I want to run a program or script on Raspberry Pi 3B+, which allows the user to set an amount of time for it to connect to WiFi 1, after the expiry of that time it has to connect another WiFi 2 for ...
0
votes
0answers
34 views

Can't run a command using Raspi_Runner

I've setup Raspi_Runner to auto run commands reading from a text file every x minutes. Raspi Runner is a BASH script which runs all your scripts delivered by e-mail. It works good with commands like ...
1
vote
2answers
24 views

How do I make a Java application I made run as a deamon?

I have a Java Application is going to be my Discord Server's bot. How do I make this application run as a daemon on a Raspberry Pi, it uses the latest version of Raspbian and the Java application ...
2
votes
2answers
84 views

Run script with virtualenv on init

I have bash script which loads a virtualenv and run 3 python scripts. I have tried to init on startup by ini.d and rc.local methods but it doesnt work and I have no idea why is not working but if I ...
2
votes
1answer
31 views

Run bash script after New WiFi connection

Noobs installation. I've a script which needs to be run after a new WiFi connection is set. Is there any way to run this script automatically once we connect/set WiFi?
1
vote
1answer
51 views

Retrieve data from Smart Plug via Raspberry Pi (need help with python script)

I am using a tutorial from BeardMonkey in order to retrieve and store the measured data from a smart plug (a smart plug is monitoring the power consumption of my kettle at the moment) https://www....
4
votes
2answers
291 views

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 ...
0
votes
2answers
250 views

Raspberry pi starting shell script at boot not working

I've been trying to implement a custom procedure triggered by a button connected to my raspberry pi. To do that I've tried to launch a python script on boot that always listens to the button trigger. ...
1
vote
2answers
227 views

Why doesn't my autostart file run a simple shell script

I am trying to launch a simple script (let's say it is /home/pi/python/python_code/hello-world.sh) from the /home/pi/.config/lxsession/LXDE-pi/autostart file. I have added the following line to the ...
-1
votes
3answers
83 views

Runing python script after startup

R Pi 3 B+, Raspbian I would like to run a Python script after the Pi has booted up. There loads of posts about this like here & here & here. They either dont work or I just plain dont ...
0
votes
1answer
29 views

Python script execution time limits?

I have a python3 script called bot.py which is running a simple (for now) telegram bot, and I can retrieve some PI system states. It's required to maintain the bot online, so I added next string to ...
0
votes
0answers
17 views

How to suppress the “The desktop has been updated…” prompt?

I have written a "setup" script to customize a stock Raspian (stretch) image for use in my application, and it includes apt-get update && apt-get upgrade. This was working great last time I ...
0
votes
0answers
22 views

Help with connect / disconnect script

Very noob to Pi programming but am tech savvy. Can somebody help with the 2 questions below: 1) How to I go about setting a script to run boot 2) Can you also help with a script to do the following: ...
1
vote
0answers
54 views

Calling a program from /etc/rc.local

I have a simple script that adjusts the monitor's brightness that is set to run on startup. #!/bin/bash gpio -g 18 1024 gpio -g mode pwm gpio pwmc 1000 gpio -g 18 800 I am calling this script from /...
1
vote
1answer
134 views

How to start a systemd service as a non-root user?

I've been using qbittorrent-nox on a headless Raspberry Pi 3 B+. The setup was a breeze. But then I wanted to autostart qbittorrent after boot, so I wrote a systemd service unit and enabled it. It ...
2
votes
2answers
84 views

Waiting for network connectivity instead of just sleep fixed time

I'm new to the whole Raspberry Pi and Bash scripting thing, so bear with me. I run raspberry autopilot on a remotely controlled vehicle thru a 3G/4G connection. Raspberry Pi is installed onboard the ...
0
votes
0answers
24 views

Rotate script output on my TFT 3.5

I'm trying to use my TFT 3.5 screen on my rpi to rotate different scripts. The idea is to show pihole dashboard, digital clock and a custom message. I have tried to do it using the crontab: */3 0 0 ...
2
votes
1answer
34 views

Monitoring NICs on the Pi

Is it possible to have a script running as a service constantly monitor certain NICs and alert me throught LEDs if one of them has been disconnected or is not properly detected by the OS? Would ...
1
vote
1answer
134 views

Controlling Raspberry pi3 Wirelessly with HTML (Lighttpd)

I've been working on a Obstacle avoidance robot using Ultrasonic and IR sensors. The scope of my project is to execute my program over the air. Control the robot's movement using mouse or touch ...
0
votes
0answers
20 views

Google Translate API rejects exact same script executed on Raspberry Pi, but accepts it coming from other devices!

I am using the following code to translate something via a npm module called google-translate-api: const translate = require('google-translate-api'); var sentence = "Bonjour, mon frere."; translate(...
0
votes
2answers
142 views

auto execute a terminal command in raspberry pi startup

I am working on a pi project which uses audio out through HDMI. I am using respeaker mic for audio in. My problem is everytime when I startup the pi, the default audio is analog. I need to change it ...
0
votes
2answers
54 views

Trouble getting picam to take a photo on boot (init..d method)

I want the camera on my pi (Rpi 3B+) to take a picture every time it boots up. I've read through several other questions of people trying to do similar things, but I haven't ever found the script that ...
0
votes
1answer
436 views

run bash script at startup

i needed 50+ rp points to comment on this one: Run bash script on startup my "problem" is that i use adafruits read only script: https://github.com/adafruit/Raspberry-Pi-Installer-Scripts/blob/...
0
votes
2answers
2k views

Run a script at shutdown on Raspbian

I'm trying to run a script right before my Pi shuts down. OS: Raspbian Stretch Here is what I did so fare: put my script (name: sendir) in /etc/init.d/ created a symbolic link to it in /etc/rc6.d ...
-2
votes
1answer
61 views

How to compare if the cpu serial is correct

I have a question. I would like to check when the raspi system starts or if the serial cpu is correct. If not, he would be rebooting. So he would be doing reboot loops all the time. I found the ...
0
votes
0answers
14 views

How can I monitor the input levels on a usb sound card?

I need a script to monitor the levels on a usb sound card and when they drop below a certain level make a post request to an api. I know this is possible but I'm having a hard time figuring out the ...
0
votes
1answer
979 views

“bin/bash: bad interpreter: No such file or directory” when running shell script

I wrote a shell script for my Raspberry Pi and made it executable. When I run ./filename.sh, I see an error: bash: ./filename.sh: bin/bash: bad interpreter: No such file or directory I wrote this ...
2
votes
2answers
1k views

How did I launch this Python script at boot?

I have a Python script running at boot, on a Raspberry Pi, and of course I didn't write down how I set it up. Now I need to change it, and I can't for the life of me figure out how it's getting ...
0
votes
1answer
83 views

My script in init.d fails on boot, fails as a service, but works fine when executed manually

I created the following script in /etc/init.d/bootscript.sh The script has these permissions: -rwxr-xr-x 1 root root 855 Aug 1 22:44 bootscript.sh # /etc/init.d/bootscript.sh ### BEGIN INIT INFO # ...
0
votes
0answers
33 views

printing info from weather utility [duplicate]

I've download the weather-util on raspberry pi. Is there a way to print the info from a python script? Say you want the weather info for jfk, so the command is weather jfk.
4
votes
2answers
1k views

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 ...
0
votes
3answers
66 views

Raspberry Pi Random Turns Off

So, I was doing a project with PWM (Pulse-width modulation) but something unsual happens, my raspberry pi turns off. I am using a RPi model 2B, and my circuit looks as follows simulate this circuit &...
0
votes
0answers
265 views

xdotool not working as expected at startup

I am trying to simply launch Chromium at startup, then have xdotool press F11 to make it fullscreen. I don't want to use --kiosk mode so please don't suggest that. My autostart file is: @lxpanel --...
1
vote
0answers
39 views

Unwanted calls of program with GPIO

I configured a Raspberry Pi 2 with a button. I have a script in python, which will call a command, if someone press the button. The command doing a sip phone call to a phone server (cisco ...
-1
votes
1answer
197 views

Force Sensing Resistor with Raspberry Pi

I have a school project where I have to make a car park with a fully functional parking lot checking system. The FSRs job is to detect any weight and send a signal to the raspberry pi that the ...
-2
votes
1answer
151 views

How to write a script which execute multiple commands on multiple terminal windows

I am trying to make a script on the following basis: Open a terminal window (keep it open) and run cd ~/dir/dir/dir ./exec Open a second terminal window (keep it open) and run /usr/bin/xterm -font/...
0
votes
1answer
88 views

Run script to setup Socks Proxy on Pi Startup

I'm new to the Pi, and have come across heaps of streams that seem to need you to pair using the same IP before they will play - Openload etc... I read and found you can create a socks proxy that ...
0
votes
2answers
109 views

Run script on boot.

I want to know my Public IP address of PI using script and script should be start running automatically when my raspberry pi boot and Store output in some file, so that i can use later on. Actually, ...
0
votes
1answer
151 views

how to run rtl_fm from a bash script

I'd like to know if it's possible to run rtl_fm from a .sh file: I know it's possible, but what I'd like to do is to run it, record for 5 seconds (I can place a sleep here) and stop the process (in ...
0
votes
1answer
35 views

Web App on computer : Ssh connection to PI + script execution possible?

I'm sort of new with web app programming so sorry if it is obvious for you guys! I appreciate the time you take for me ! I tried to explain my problem the best I could in the title! :p I am building ...
5
votes
1answer
11k views

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, ...
4
votes
2answers
1k views

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 ...
1
vote
1answer
67 views

How can I create a new Login menu for the pi and run my own script? (run script before pi login)

I want to run a script after pi boots but before log in (Raspbian Stretch Lite). It should run after all the other configurations are done. So I thought about finding and changing the RPi log in ...
0
votes
2answers
2k views

How to start a python3 script on startup without login? (stretch image) [closed]

I am trying to start a python script called "irremote.py" on startup (currently in my home directory). I am running raspbian-stretch on a Pi Zero W, and I would like the script to start without a ...
0
votes
2answers
4k views

Run a shell script from a python script when a button is pressed

I'm trying to create a very simple python script that waits for a GPIO button press and then runs a shell script. I personally don't know much about python so what I've come up with is mostly from ...
1
vote
1answer
640 views

UDEV won't run any script, file or inline

I have a Raspberry Pi 3 model B. I installed Raspbian using NOOBS, and it worked great. I had a project that needed to execute certain actions when a USB device was connected. I learned about udev, ...
2
votes
1answer
52 views

Is there a key combination to get to the terminal?

Yesterday, I was trying to get a script to run on boot and it worked. I edited the rc.local script so it would do the commands I wanted. However, I rebooted my Raspberry Pi and I can't type in ...
1
vote
1answer
291 views

Run script on terminal at startup

I want to run a command in a terminal (not background) every time my pi is completely booted (once it loads the desktop). I tried to edit the rc.local and add these commands sleep 10 chromium-browser ...
1
vote
0answers
429 views

Boot script to check for dirty bit/corruption on a USB stick or SD card

I posted this question on the Raspberry Pi forum but got no activity. If it is a dumb question or something else, please say so... While not often, I do experience power outages which stop one of my ...