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
0 votes
1 answer
40 views

Help with "-bash: syntax error near unexpected token `do' "

Background: Yes, I'm a noob. I've been learning Debian Linux the last several months. Here's the situation: I have 10 Raspberry Pi's (3B+) with hostname rpi-100 to rpi-109. I am trying to automate ...
Myszek512's user avatar
0 votes
1 answer
173 views

How to turn monitor on/off? vcgencmd doesn't know about display_power

In times past, I used tvservice to turn the monitor on/off in a script. Now I understand vcgencmd is the current method. I'm running RPi OS 12.4 on a 4GB RPi 5. I installed lib-rasbperrypibin. ...
raindog308's user avatar
1 vote
2 answers
45 views

GPIO input pins high at 3V, and detect when ground is connected when I want it to detect when 3V is connected

This is on a Raspberry Pi Zero 2 W The physical pin 3 and 5 (gpio2 and gpio3) are the input pins I am using and for whatever reason, they are at default 3V and detect a change when they are connected ...
prestonferry's user avatar
0 votes
1 answer
112 views

Run a shell script on first boot

I want to make a script that runs on boot, as I'm making a PowerShell script to install the Raspberry Pi OS. It needs to install some things on boot. How do I make a script to run on first boot and ...
berriz44's user avatar
1 vote
1 answer
52 views

run script after some device from dhcp ip pool connect to hotspot raspberry pi 4

I was searching answer from over a week and still don't find it. I'm fresh user of raspi and linux and network config so be patient for my stupid questions :) I describe my problem. I used raspi to ...
Marko's user avatar
  • 11
0 votes
0 answers
21 views

Monitor lightbox project – does this exist yet?

I have a second monitor next to my iMac. What I’d like to do is set up a Pi that simply outputs solid colour to the monitor over HDMI or composite (it has both), thus allowing me to use it as a video ...
Long Peter's user avatar
0 votes
1 answer
52 views

How can I have the raspberry pi run scripts portably?

I am a noobie and just got a raspberry pi yesterday and I want to create a wifi strength device with my raspberry pi. I have a wireless adapter and alreaady made a script for my linux machine. It ...
Lorde213423432e43434's user avatar
-1 votes
1 answer
73 views

New to PI-Automatically move files from sd card to Syncology NAS

My goal: To have video copied from an SD card that is inserted into a Pi 4B using a USB SD Card reader copied to a network share and put in folders based on dates. My scenario. I come home from ...
Emanuel Levy's user avatar
1 vote
2 answers
220 views

Can't get Cron to run python script

I'm trying to set up porkbun dynamic dns python script to run at reboot via Cron (later I'd like to run it hourly, but baby steps...) following porkbun's tutorial https://www.youtube.com/watch?v=...
APEX's user avatar
  • 11
1 vote
0 answers
116 views

Script only works after opening browser and closing it

I have a script to open 2 webpages one on each monitor. The end of the script selects one of the pages and enters in login credentials. The script works great and I have it working with systemctl to ...
Logan's user avatar
  • 11
0 votes
2 answers
218 views

Script running from terminal after setting pythonpath and running "thonny&" command, but not when thonny ide is opened directly

I am using a Raspberry Pi OS 64-bit to run a script that will capture an image. I have gone through installing the right packages for libcamera for this OS and can run libcamera apps using my terminal....
Uchechi Ugo's user avatar
0 votes
1 answer
143 views

Can the Raspberry Pi detect when the screen turns off for a script?

I’m running a Raspberry Pi in my car with an official screen (link: https://www.amazon.com/dp/B073S3LQ6Q/ref=cm_sw_r_cp_api_i_dl_ZSPC0NJXFQVBZ19PXGCP?_encoding=UTF8&psc=1). It’s for obd. When I ...
Mat's user avatar
  • 1
1 vote
2 answers
2k views

Switch Raspberry (RaspAP) from an AP to a Wifi Client in a script

Switch Raspberry Hotspot "RaspAP" (wlan0) to a simple Wifi Device via a script What is missing #!/bin/bash # This script will stop the RASPAP Hotspot (AP+DHP) and will Switch your ...
Christian Klugesherz's user avatar
0 votes
1 answer
86 views

Working ssh tunnel script does not work when executed by 'on boot' techniques

The following works flawlessly, in that it allows me to access a webpage hosted on the Pi at my domain which is hooked up to a google compute vm. pi@raspberrypi:~ $ ./pi_home_reverse_proxy/scripts/...
Monty's user avatar
  • 1
-1 votes
2 answers
66 views

Start script not working

I have a script that starts my GPIO website server. This allows my phone etc to accress the switches that control certain elements in my camper I would like it to start at after boot in the case of ...
John Harney's user avatar
0 votes
0 answers
94 views

command is working on terminal but not in the script

I am using raspbian in headless mode and I am trying to mount USB on USB insertion. Script is executing but USB mount command failing. here is the script, filename is automount.sh (this script gets ...
dev_eng's user avatar
-2 votes
1 answer
110 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(...
Mustafa Issa's user avatar
0 votes
1 answer
65 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?
StanW's user avatar
  • 1
0 votes
0 answers
69 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 ...
Leonardo Muller's user avatar
0 votes
0 answers
209 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 ...
Kazi Ilyas's user avatar
0 votes
1 answer
629 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: *...
Alessio_110's user avatar
0 votes
1 answer
127 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 ...
Alex's user avatar
  • 3
2 votes
0 answers
310 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 (...
nino's user avatar
  • 21
0 votes
1 answer
222 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 ...
YvetteLee's user avatar
  • 127
2 votes
1 answer
3k 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 ...
Albrecht's user avatar
2 votes
0 answers
8k 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 ...
Pievee's user avatar
  • 21
0 votes
0 answers
563 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 ...
Tim's user avatar
  • 101
0 votes
2 answers
223 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 ...
j0h's user avatar
  • 2,463
-1 votes
1 answer
354 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 ...
Andreas Kämpe's user avatar
0 votes
0 answers
200 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 ...
keratos's user avatar
1 vote
1 answer
2k 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 )....
Don Madrino's user avatar
1 vote
2 answers
735 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 -...
Brokenstick's user avatar
0 votes
4 answers
2k 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 ...
sirzento's user avatar
  • 221
1 vote
1 answer
646 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 ...
iGadget's user avatar
  • 11
0 votes
1 answer
229 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 ...
Hayvosh's user avatar
0 votes
2 answers
118 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 ...
Icyartillery's user avatar
2 votes
2 answers
585 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: # ...
Lyra Orwell's user avatar
1 vote
2 answers
3k 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, ...
CraftyMyner's user avatar
-2 votes
1 answer
317 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 ...
Riaementi's user avatar
1 vote
2 answers
1k 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?
AsianXL's user avatar
  • 151
1 vote
1 answer
3k 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:...
user avatar
2 votes
1 answer
223 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 ...
Electronics Passion Channel's user avatar
2 votes
1 answer
1k 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 ...
Falco's user avatar
  • 21
1 vote
1 answer
2k 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 ...
Zlatko's user avatar
  • 11
2 votes
1 answer
870 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 ...
Bernd's user avatar
  • 23
1 vote
1 answer
87 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, ...
lukenm's user avatar
  • 183
2 votes
0 answers
227 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 ...
kassidylynnk's user avatar
2 votes
1 answer
116 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 ...
dandspach's user avatar
3 votes
1 answer
821 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 ...
user2744010's user avatar
1 vote
0 answers
400 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://...
JustCallmeSPED's user avatar

1
2 3 4 5