Questions tagged [bash]
For questions pertaining to the `bash` shell command processor.
268 questions
2
votes
1
answer
87
views
Play different playlists of music on a music player, changing playlist at fixed time of the day [closed]
I have a Raspberry Pi 4 Rev 1.5, with Linux version 6.6.62-rpt-rpi-v8.
I want to use this system to stream music to a icecast server, and I am using BUTT and Rhythmbox.
I would like to change the ...
0
votes
1
answer
86
views
Can't use tkinter, and may have multiple versions of python at once?
Unfortunately, I wasn't able to make this post with all the information I wanted to give. I was originally going to post it from the RPi 400 that I was having all these problems on, but apparently ...
1
vote
1
answer
866
views
Cross compiling file cannot execute: required file not found
I am struggling in trying to cross compile C program using wiringpi library in the ubuntu host, then transfer it to raspberry pi 4. My instruction used old version of wiringpi, which is not available ...
0
votes
1
answer
91
views
Writing bash script to reboot pi 10 times and log output
I have written a Python script and scheduled it to run @reboot using cronjob. Sometimes this script throws an exception sometimes it works perfectly. I want to write test scripts for this.
Preferably, ...
0
votes
2
answers
112
views
Cronjob not executing when raspberry pi reboots
The following is the Python script that I want to execute every time Raspberry Pi reboots. When I run this Python script directly from the terminal it works. Not only does IP gets stored in the file ...
1
vote
1
answer
151
views
How to put Raspberry Pi into shutdown by keypress/hold?
I am running latest retropie on a rpi3b+. I am also using retrogame to map GPIO pins the keyboard keys to arcade buttons.
What I would like to do is run the sudo shutdown command if a designated key (...
1
vote
0
answers
141
views
bash who command does not give datetime correctly on testing
Edit : We are still looking for differences that would explain why who does not work on testing for user lines (it works for boot lines for instance), this is differences on the code for following ...
2
votes
1
answer
199
views
Error mounting drive at service startup (ExecStartPre)
As a precondition for starting my Syncthing service, I wish to mount an external USB drive (label MyBook). The action must be synchronous, so putting it anywhere else besides the service's ...
1
vote
0
answers
545
views
Install latest MariaDB properly via apt
Currently I'm running this helper function in my synced shell environments on all my Linux/macOS devices;
install_mariadb() {
local mariadb_version_test
local mariadb_version
local ...
0
votes
1
answer
762
views
help with /etc/os-release echo $VERSION_CODENAME' [closed]
How can i make this :
bash -c '. /etc/os-release; echo $VERSION_CODENAME'
so it look like this :
get_codename() {
local VERSION_CODENAME
VERSION_CODENAME=$(. /etc/os-release | awk '{print $1}')
echo &...
1
vote
1
answer
257
views
Change the background color when the pi starts up
I have a setup with a headless Raspberrypi Zero attached to a screen and the pi user is automatically signed in so a Bash prompt is shown.
The black shell background now interferes with how I want to ...
0
votes
1
answer
204
views
Save continuous data printed in a bash shell in a file [closed]
we are working with a Sensor (Sensirion SDC41) connected to a Raspberry Pi 4.
We have a .c file provided by Sensirion, that, when called in the bash shell, it outputs a continuous flux of data (one ...
0
votes
1
answer
299
views
MOTD Statistics
I am attempting to create a MOTD using Bash that gives me some specific information about this machine. I’ve figured out how to get a lot of what I want, but is there a way to get available upgrades, ...
0
votes
0
answers
160
views
What can I do? Installing software "E: Unable to fetch some archives" (Pure Data)
I'm trying to install Pure Data on my Pi with the command:
sudo apt-get install puredata
However, it isn't working and I'm getting the message:
E: Unable to fetch some archives, maybe run apt-get ...
0
votes
1
answer
187
views
Where can I get the current TLS_FINGERPRINT for pandora (pianobar)?
I've ran into this issue twice this month, where my auth would fail due to the TLS_FINGERPRINT.
The first time, I found the key online on a forum. Now, I can't find the updated key anywhere. I've ...
-1
votes
1
answer
516
views
How to UNDO unwanted changes on my raspberry pi 4. Bash_profile not found
Updated Question.
I was trying to add this directory "/usr/local/opt/python-3.9.0/bin" to PATH on raspberry pi 4 and so I edited the bash file by adding the line: PATH = "/usr/local/...
-1
votes
1
answer
59
views
Script declared in rc.local doesn't run after soft reboot
I have a Raspberry Pi 3 and two scripts that handle the updates of an app.
download.sh
update.sh
download.sh downloads the new version of the app, prepares it for deployment and restarts the device.
...
0
votes
0
answers
169
views
How to install .deb of virtual keyboard on rpi zero (no internet)
I'm following this answer: https://raspberrypi.stackexchange.com/a/121642/74564 on how to install a virtual keyboard on rpi zero without internet access.
cd /boot
sudo dpkg -i matchbox*
<- don't ...
2
votes
0
answers
409
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
2
answers
602
views
Using shell with cron
I have an app controlling a piece of connected hardware that displays a few lines of info and requires user input (on stdio). The app runs fine from a shell.
I set up the RPi to auto-login with CLI ...
-2
votes
2
answers
1k
views
How do I run a bash script at startup that stays open? [closed]
I have a bash script which is in this directory:
/home/pi/darkCove/radio/start.sh
It basically transmitts an FM signal. Here is the code:
#!/bin/bash
sudo ./pi_fm_rds -freq 87.5 -audio pulses.wav -...
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
1
answer
250
views
gallery-dl script doesn't work with crontab or rc.local but works manualy
I wrote a simple script that cycles through a file and grabs some links from a file to run through a program called gallery-dl. This script works fine if i run it manually but just wont work with ...
-1
votes
1
answer
274
views
How to restore /bin/sh
Sup yall,
I was trying to fix GUI login or restore password issue on Raspberry Pi 4. There are so many topics and several solutions to solve a problem where you're stuck into a loop asking for a ...
0
votes
1
answer
329
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 ...