Questions tagged [script]
non-compiled programs written in scripting languages (e.g. perl, python or tcl) or command line interpreters such as Unix shell.
246
questions
0
votes
1
answer
28
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 ...
1
vote
1
answer
35
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 ...
0
votes
0
answers
20
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 ...
0
votes
1
answer
47
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 ...
-1
votes
1
answer
53
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 ...
1
vote
2
answers
190
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=...
0
votes
0
answers
107
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 ...
0
votes
2
answers
176
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....
0
votes
1
answer
97
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 ...
1
vote
1
answer
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 ...
0
votes
1
answer
80
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/...
-1
votes
2
answers
64
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 ...
0
votes
0
answers
85
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 ...
-2
votes
1
answer
95
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(...
0
votes
1
answer
63
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
0
answers
68
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
0
answers
188
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
1
answer
576
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
1
answer
105
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 ...
2
votes
0
answers
265
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
1
answer
199
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 ...
2
votes
1
answer
2k
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 ...
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 ...
0
votes
0
answers
525
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
2
answers
184
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
1
answer
277
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
0
answers
176
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
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 )....
1
vote
2
answers
432
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
4
answers
1k
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 ...
1
vote
1
answer
614
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
1
answer
215
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
2
answers
99
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
2
answers
488
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
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, ...
-2
votes
1
answer
257
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
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?
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:...
2
votes
1
answer
163
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 ...
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 ...
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 ...
2
votes
1
answer
732
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
1
answer
84
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
0
answers
219
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
1
answer
113
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
1
answer
791
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
0
answers
391
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
1
answer
59
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
3
answers
191
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
1
answer
727
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 ...