Questions tagged [script]

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

Filter by
Sorted by
Tagged with
-2
votes
1answer
32 views

Why my code doesn't run when I reboot the raspberry?

So to start in what I tried. first this is the code that I wrote to run import subprocess import pyautogui import urllib.request import time while(1): x = str(pyautogui.position()) time.sleep(...
-1
votes
0answers
38 views

Can someone explain this behaviour

On my Raspberry Pi I have a simple script "CommandReStart.sh" which looks like this: #!/bin/bash tmux send-keys -t 0 'python3 ReStartThis.py' C-m When I run it it works great. The program ...
0
votes
1answer
22 views

Availability of R packages on Raspberry Pi

I couldn't find it by googling. Are all usual R packages from CRAN also available in R on Rasbian on Raspberry Pi? What is the current supported R version on Pi 4?
0
votes
0answers
18 views

Error in autorun script, RASP 3

I need to run a script in lxterminal in boot. The unit is headless, just have a digital button to start the process in the code. I already have a automatic pi user loggin and a .desktop created in ...
0
votes
0answers
33 views

PIR Sensor Counter

Hey guys I'm trying to create a simple script that essentially counts the amount of people that reside within a room, by having an entry sensor and exit sensor and tells you how many are within the ...
0
votes
1answer
45 views

Crontab does not work

I am trying to run either at boot or at intervals of 5 min (everytime basically) a command that enables me to use my remote control. Thus sudo crontab -e -u root, I add in crontab the following line: *...
0
votes
1answer
32 views

How do I use the Pigpiod read function within a script

Im trying to use the read function from the pigpio library inside of a pigpiod script. Here is how: detect = pi.store_script('tag 1 inr p0 r4 jp 1 tag 2 r 4 jz 2 tag 3 inr p1 r 4 jp 3 jmp 1') My ...
0
votes
0answers
28 views

Lxterminal, open new tab and run sh script

How to open a new Tab inside the same lxterminal and run .sh script in that new Tab? If I call lxterminal -e "./script.sh" & it will open a new lxterminal and runs the script there, but ...
2
votes
0answers
65 views

Running Simple Script On Every Boot

Want to run a bash script start.sh with one command that executes tmux and ffmpeg at startup on my Raspberry Pi 4B. The RPi OS loads the Desktop, but to interact with the process only need a terminal (...
0
votes
1answer
67 views

pi 4 - Power present

I am using a pi4 and pijuice. Is it possible with a script or python to check if power is present in my Pi4?(usb port) I am using my pi4 headless with as a web server(online). I would like to know ...
0
votes
0answers
13 views

Playing a sound through sonos speakers in terminal

I would like to play a sound effect I have saved locally on my SONOS speakers in my house through the terminal in my raspberry pi 4. I just have no idea where to start. sonos and sonos-cli didn't work ...
2
votes
1answer
413 views

SIP client for Raspberry Pi, receive call, wait for DTMF tones (button presses) -> run Python script

I'm looking for a SIP client for my Raspberry Pi (commandline). I want to be able to call my Raspberry Pi, and based on what buttons I press on the phone (resulting in DTMF tones), run the correct ...
1
vote
0answers
2k views

ufw Error: Couldn't determine iptables version [closed]

I am currently working on an automated shell setup script for my Raspberry Pi 4. This includes installing and setting up ufw as my firewall. However, I'm currently stuck with configuring ufw. My ...
0
votes
0answers
177 views

RPI connected to a smart plug -> how to auto turn off plug after RPI shutdown?

In short: I was wondering if it is possible to send a command to a smart plug when the pi is good to kill it's power. background I'm running a 3d printer which I'm going to control with a rpi 4 using ...
0
votes
2answers
36 views

ssh shuts down when screen turns off

I have ssh running on boot, on my raspberry PI, it works fine, until the screen shuts off, or it goes into a sleep mode, or whatever its doing. Then ssh becomes unresponsive, and I cannot establish ...
-1
votes
1answer
46 views

Raspberry Pi checking and rebooting the main router if necessary [closed]

I have gotten tired of having to reboot my router a every other day. I think my router does not update when my ISP changes. Now I have a timer that cuts the powers to the router at 4 am. An more ...
0
votes
0answers
36 views

Howto self-restart a service when network link goes down?

I have a VPN using L2P/IPsec. A service I created establishes the ppp0 interface and tunnel. The service basically executes a shell script that does all the work. I can start/stop the service and all ...
1
vote
1answer
406 views

How can I fix “atomic” related issues in my build?

I'm trying to build gRPC using this tutorial (https://lzqblog.top/2018-11-08/Cross-compile-gRPC-for-ARM/) but I still get "atomic" related issues (undefined reference: __atomic_fetch_add_8 )....
1
vote
2answers
62 views

How Do I Keep a CLI Script Running When I Close SSH Session

I am working on Martin F. O'Connor's internet connection monitor (https://github.com/mfoc/monitor-internet-connection), which records Internet Outages. The script runs from the command line ($python3 -...
0
votes
4answers
483 views

Control fan to lower temperatur via script [duplicate]

I have a raspberry pi 4 and a small fan in the case. I know that the pi can run without a fan but I already have one installed so why not using it. The problem is, that this small fan does make a ...
0
votes
1answer
227 views

Send GPIO trigger(s) at specific video timecode(s)?

Just starting out in the wonderful world of RPi maker projects, scored a Model 2b v.1.1, installed the latest Raspbian and now ready for my first project :-) What I want to build is a video player for ...
0
votes
1answer
54 views

Raspberry Pi POCSAG mail script

I have a raspberry pi configured as a POCSAG receiver with a RTL-SDR USB stick. Everything works just perfect, and it receives signals and messages. I then found a script that was supposed to be able ...
0
votes
2answers
33 views

Very new to scripts, is it possible to loop a script in the background looking for a button press?

I'm trying to build a camera with the new HQ Camera module, but am running into some trouble. I don't want to have to run my little camera.py script (that just opens preview, waits, takes a photo, and ...
2
votes
2answers
122 views

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

I am trying to run a python script when my Raspberry pi 4 boots. THis python script works when I run it directly, with no errors. I have edited the crontab file to do this as can be seen below: # ...
0
votes
2answers
868 views

Fuse Mount Option “-nonempty” is Not Working

I have a setup where I need to log quite a bit of data on my Raspberry Pi. I have a 128GB USB stick that mounts to a folder called external where all my scripts/programs log to. This works well, ...
-2
votes
1answer
70 views

Running a program on boot (Pi 4)

I have been trying to get a program to start automatically on boot. I have tried using systemd, init.d, rc.local, and cron to execute my bash script in order to invoke a program (e.g. open an instance ...
1
vote
2answers
462 views

How Do I Create a Startup for No-ip?

I am on Raspbian. I want no-ip to startup everytime it boots. How can I accomplish this?
1
vote
1answer
575 views

Permission denied on executing script

I can't execute a script. I'm struggling with this. OS version and hardware model I'm on Raspbian GNU/Linux 10, Raspberry Pi 3 Model B. Devices When I call lsblk I get: $ lsblk NAME MAJ:...
1
vote
1answer
61 views

Raspberry pi capture desktop without any connected monitor

I want to capture raspberry pi desktop without connected monitor. IS it possible to run a program capture with script at boot up and record the desktop? Or the raspberry pi must be connected with ...
1
vote
1answer
154 views

Script that saves file to USB when plugged in

I am currently building a weather logger with a DHT22 that logs the data to a CSV file. It will be used in a place without internet and also without a screen. The script i am using logs the data as ...
1
vote
1answer
516 views

My script in autostart not work correctly

I am very new in linux and I don't know where I make mistake. I am using Raspbian. When I manually start script press.sh everything works fine. But when I start this script from /etc/rc.local it not ...
2
votes
1answer
154 views

Start application into specific workspace (desktop)

I've set up my Raspbian with 4 workspaces/desktops and like to start an application via script into one specific desktop. Is there a parameter I can add to my script #!/bin/bash # myApp & to ...
1
vote
1answer
54 views

Python script refuses to start automatically

I have a python script (taken from the forums here) that reboots my RPI when a button is pressed. It works great, no issues, except that it refuses to start automatically (either on boot, login, ...
2
votes
0answers
62 views

Sending an image from Pi Camera continuously to a display

I want to send 6 images per minute from the Pi Camera continuously to any display. Like for say I have the camera that is at my house but I want to send the images to my work computer. The end goal ...
2
votes
1answer
81 views

Traffic Light Led Change During NOAA Satellite Script?

I have the following script that downloads and processes NOAA satellites. I'd really like some external LEDs to indicate the following; When the script is running, turn or blink red When the script ...
3
votes
1answer
428 views

Rotate screen 180 on the fly?

I think this may be impossible, but I'd like to rotate the display by 180 degrees on the fly, triggered by a button connected to the input pins. I built a cocktail-style MAME cabinet (RetroPie) but ...
1
vote
0answers
271 views

Custom Dualshock 4 Script/Program

I've got a Pi 3b that I originally planned to be a dedicated Steam Link. I already followed these instructions to set up a DS4 controller to control it, and it's working just fine so far: https://...
-2
votes
1answer
46 views

I'm trying to make a shell script that can mount a exFAT drive

Hi I am trying to make a shell script that can create a directory (/mnt/drive) and mount a exFAT drive in that directory on my raspberry pi 2. The problem I am having is that when I try to run the ...
-1
votes
3answers
97 views

How to automatically run a script on boot / startup?

I have trying to get a script to run at startup to mount a flash drive and change ownership on dynamically created files. I have not been successful in getting the script to run. It only runs when I ...
1
vote
1answer
414 views

Permissions error with logrotate [closed]

I am using a script to monitor a service. I have added said script in crontab. crontab runs the script every one minute. I have found this script online and it works pretty good, but it writes the ...
1
vote
2answers
556 views

Wiring Pi Issue - #!/bin/bash vs #!/bin/sh

I am working on a project and have an application shell script. For function part, I need the GPIO access, and for that, I am using the standard wiringpi package. The issue I am getting is with the #...
1
vote
1answer
2k views

Script Using CEC-Client Will Turn on TV OR Change Input But Not Both

I'm trying to use this script to turn on a TCL TV and change the input to RPi using cec-client: echo 'on 0' | cec-client -s echo '4f:82:10:00' | cec-client -s It will turn the TV on, but not change ...
1
vote
1answer
147 views

Coproc in shell script

I'm trying to do a simple shell script that will make my raspberry's bluetooth discoverable but i'm facing some issues. My raspberry is running Raspbian. Running this through command line works ...
0
votes
0answers
29 views

Howto tell the difference between a RP3B and RP4B from a script? [duplicate]

I want to create scripts that configure RP3 and RP4 software installations using Raspbian Lite. The scripts need to know the difference between an RP3B+ and and RP4B. How can I do that? Dazz
1
vote
0answers
37 views

shell script does not invoke define variable in autostart script

I try to use the raspberry pi for power point presentation. I want to run this as auto ( I mean once the raspberry pi started or rebooted the power point presentation should run). Basically it works ...
3
votes
1answer
42 views

Include File With Raspbian Setup

I am working on a project which requires many raspberry pi's to be set up pretty much the same way. In order to set up the pi's we put NOOBS on the micro SD card and then install raspbian onto the pi. ...
2
votes
3answers
2k views

Python script won't load on startup

I have tried like 5 methods to get this script loaded after raspi3 load. #!/usr/bin/python3.7 #sudo python /home/pi/masterBaseInterface.py import socket # Import socket module import ...
2
votes
2answers
208 views

how to update customised OS image to a newer version keeping modification?

I am using Hypriot as OS . I have done modifications to some file and script,and i have add new service on boot . I would like to know if i have a newer version of Hypriot how can i update my ...
-1
votes
1answer
253 views

Disable autologin on tty1 on stretch 9.9

I found this answere but it doesnt work anymore. How does it work on the new version?
2
votes
4answers
139 views

Pi - own python startup script in the wrong order

I've written a python script to connect to mysql & insert the current time then close. The use case is if my Pi browns out/restarts (often does) the time of this event will be logged. The script ...

1
2 3 4 5