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.

3
votes
2answers
286 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
72 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. ...
0
votes
1answer
81 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
53 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
24 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
16 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
19 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
51 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
59 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
80 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
21 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
32 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
105 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
83 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
45 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
266 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
1k 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
52 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
646 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
982 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
69 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
30 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
676 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
56 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
229 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
38 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
178 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
115 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
70 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
72 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
135 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
30 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
8k 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
3k 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
543 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
51 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
220 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
391 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 ...
0
votes
1answer
844 views

RuntimeError: No access to /dev/mem

I'm using the PXfmini with the raspberrypi3 for a project and I need to use mavros and python code. My operative system is Frambuesa. I created the catkin workspace and I tested the c++ file ...
0
votes
2answers
4k views

Update Node JS and delete old one

I've a lot of Raspberry Pi clients, which I've initialized with a 4.5.0 Node JS version, using the following lines of code: wget https://nodejs.org/dist/v4.5.0/node-v4.5.0-linux-armv7l.tar.gz tar -...
-1
votes
1answer
2k views

Automating web page login with bash script

I have been looking to write a script to automate login on an internal company website that is used as a Ping Board to monitor a network of IP connected cameras. I am pretty new to bash scripting and ...
0
votes
1answer
540 views

start omxplayer with matchbox window manager

I have a RPI 3 with Raspbian Jessie, set up to boot in cli mode, autologin with user pi. I have installed matchbox window manager because it's lighter than lxde and I use only chromium and omxplayer. ...
1
vote
1answer
797 views

Issues when trying to open Chromium at a certain URL on boot

I am having some issues with automating tasks at boot on the Pi. I have tried numerous different methods to do this including the systemd method and the .bashrc method. The command is a simple one ...
0
votes
1answer
84 views

Running Alexa processes inside Screen to save desktop real estate

Here's the story (TL;DR is at the bottom): I've followed the tutorials in the github page and pimylifeup for setting up Alexa on a RPi3. I now have a working Alexa, started with a nice script. Great ...
1
vote
1answer
483 views

Run shell script from PATH using root

I have added a shell script to my ~/bin folder. When I type the script name normally in the terminal it finds the script just fine. However, when trying to launch the script using the sudo prefix, I ...