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
0 answers
39 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 ...
user avatar
  • 1
0 votes
2 answers
36 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....
user avatar
0 votes
1 answer
34 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 ...
user avatar
  • 1
0 votes
1 answer
180 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 ...
user avatar
0 votes
1 answer
34 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/...
user avatar
  • 1
-1 votes
2 answers
50 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 ...
user avatar
0 votes
0 answers
40 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 ...
user avatar
0 votes
0 answers
31 views

Chromium Kiosk, launch external web page and control it

I am looking for a way to control an external webpage from chrome itself. My use case is a kiosk showing a web app through chromium kiosk and that needs to launch external web pages, but need to ...
user avatar
0 votes
0 answers
46 views

'on_picture_save' triggered script won't execute 'sftp' nor 'sudo -u' commands

My goal is to transfer to a distant raspberry pi the stream of snapshots acquired through 'motion' software. I am using 'sftp' in the following test script: (test-script.sh) #!/bin/bash cp $1 /tmp/...
user avatar
-2 votes
1 answer
63 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(...
user avatar
0 votes
1 answer
43 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?
user avatar
  • 1
0 votes
0 answers
29 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 ...
user avatar
0 votes
0 answers
107 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 ...
user avatar
0 votes
1 answer
152 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: *...
user avatar
0 votes
1 answer
63 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 ...
user avatar
  • 3
2 votes
0 answers
131 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 (...
user avatar
  • 21
0 votes
1 answer
118 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 ...
user avatar
  • 127
2 votes
1 answer
1k 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 ...
user avatar
2 votes
0 answers
4k 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 ...
user avatar
  • 21
0 votes
0 answers
367 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 ...
user avatar
  • 101
0 votes
2 answers
87 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 ...
user avatar
  • 2,365
-1 votes
1 answer
84 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 ...
user avatar
0 votes
0 answers
55 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 ...
user avatar
1 vote
1 answer
1k 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 )....
user avatar
1 vote
2 answers
90 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 -...
user avatar
0 votes
4 answers
941 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 ...
user avatar
  • 201
0 votes
1 answer
420 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 ...
user avatar
0 votes
1 answer
124 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 ...
user avatar
0 votes
2 answers
40 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 ...
user avatar
2 votes
2 answers
238 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: # ...
user avatar
0 votes
2 answers
2k 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, ...
user avatar
-2 votes
1 answer
136 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 ...
user avatar
1 vote
2 answers
988 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?
user avatar
  • 131
1 vote
1 answer
2k 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
1 vote
1 answer
107 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 ...
user avatar
1 vote
1 answer
630 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 ...
user avatar
  • 11
1 vote
1 answer
983 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 ...
user avatar
  • 11
2 votes
1 answer
420 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 ...
user avatar
  • 23
1 vote
1 answer
77 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, ...
user avatar
  • 143
2 votes
0 answers
100 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 ...
user avatar
2 votes
1 answer
96 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 ...
user avatar
3 votes
1 answer
638 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 ...
user avatar
1 vote
0 answers
333 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://...
user avatar
-2 votes
1 answer
56 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 ...
user avatar
-1 votes
3 answers
140 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 ...
user avatar
1 vote
1 answer
572 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 ...
user avatar
1 vote
2 answers
773 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 #...
user avatar
1 vote
1 answer
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 ...
user avatar
  • 11
1 vote
1 answer
193 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 ...
user avatar
0 votes
0 answers
30 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
user avatar
  • 155

1
2 3 4 5