Stack Exchange Network

Stack Exchange network consists of 174 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.

0
votes
0answers
11 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
18 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
45 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
36 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
73 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
14 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
29 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
votes
0answers
18 views

a linux script doesn't have color

i try to add a line to rc.local file in etcpath in rasbian stretch OS of raspberry pi3 by writing a script. my script doesn't work correctly and it copies many lines in the rc.local so i delete that ...
1
vote
1answer
64 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
17 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(...
-1
votes
0answers
18 views

Probleme with motion and command (on_envent_start) when deamon on

I'm new on linux and I'm experiencing some issue with motion. I'm trying to execute a simple python script from motion when an event start . So I have in the motion.conf file the line : ...
0
votes
2answers
46 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
0answers
55 views

Making a Spotify/Raspberry Pi Radio with functionin buttons through the GPIO

I have to Create A Radio based on Spotify , where we have a number of buttons with assigned stations/playlists to each , i have to emphesize on the need for the buttons because we can't afford a LCD ...
0
votes
1answer
28 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
128 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
403 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
47 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
35 views

Raspbian Auto Mount Drives

I've been trying to adjust a script I found to auto mount several connected drives to specific directories (/media/usb1.../media/usb8). I want the script to start mounting each drive to any of those "...
0
votes
0answers
13 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
0answers
21 views

How to execute a script.sh with a sequence of joystick+button

I would like to know if I could find a way to bind a combo like the "hadouken" (Hadouken is a combination of movement of a joystick: down, down-right, right + button ) of street fighter to make an ...
0
votes
1answer
373 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
584 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
54 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
27 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.
3
votes
2answers
402 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
50 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
186 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
33 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
133 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 ...
0
votes
0answers
125 views

Turn On Raspberry Pi and Modem GSM/GPRS with only raspberry

I am new in Raspberry and I am looking a way to turn on my raspberry and my modem GSM/GPRS with only the switch of the raspberry. I am using Raspberry Pi 3 model B and this modem: https://www....
-2
votes
1answer
87 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
57 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
66 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
122 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
28 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 ...
2
votes
1answer
5k 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, ...
0
votes
0answers
105 views

How to run scipt using camera automatically at bootup?

I am trying to make a cane that uses the Raspberry Pi to take a picture, analyze it through an API and output it through a speaker. It is supposed to start on bootup. The raspberry pi is connected to ...
4
votes
2answers
921 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 ...
0
votes
0answers
119 views

Start python script using screen at start up

I've copied a project from github and I'm trying to make it work but I don't have much experience with programming. Here is the original project. https://github.com/sujay2002/door_lock_pi I need a ...
0
votes
0answers
42 views

3g usb stick for Internet and sms

In a remote place that there is not any DSL connectivity i deployed a rpi with a 3g usb stick (E169) from 'Three'. With that stick and sakis3g https://github.com/Trixarian/sakis3g-source i have 3g ...
1
vote
1answer
61 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
452 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
50 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
183 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
347 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
752 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
1k 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 ...