Skip to main content

Questions tagged [systemd-startup]

Startup programs on boot with systemd services.

Filter by
Sorted by
Tagged with
1 vote
1 answer
9k views

How to start dnsmasq on boot?

I'm using my RaspberryPi with a 4g dongle as gateway for my wireless AP. The pi is connected to the AP through ethernet eht0 and the external internet comes from the dongle eth1. The dongle connects ...
0 votes
2 answers
46 views

systemd service not running, and there is no /var/log/syslog file at all

System is a Raspberry Pi 5 running bookworm. Using unison compiled from source 2.53.2 I have created several services for synching files between serverA and serverB when serverA starts up. There are ...
0 votes
2 answers
46 views

Why isn't the display environment starting with this script at boot?

I have a Raspberry Pi 4 running Debian GNU/Linux 12 (bookworm) I have a Python script in a shell file launcher.sh (with executable for all permissions) that runs happily without complaint if I ...
2 votes
2 answers
1k views

Unable to boot because mounting /boot fails during boot

My Raspbian/Debian buster fails booting with [ TIME ] Timed out waiting for device /dev/mmcblk0p1. [DEPEND] Dependency failed for /boot. If I disable mounting of the /boot partition by commenting ...
24 votes
4 answers
69k views

Make "iw wlan0 set power_save off" permanent

Q How can I make iw wlan0 set power_save off permanent for stretch? What's the proper way to do it? Edit I'm using an r-Pi 1 Mod. B with an Edimax wifi dongle and Raspian stretch.
0 votes
0 answers
151 views

Kiosk mode audio output problem

When the Raspberry Pi 4/5 boots, I automatically start the Chromium browser (kiosk mode) with systemd according to the configuration below. [Unit] Description=kiosk app After=graphical.target [...
0 votes
0 answers
53 views

Raspberry Pi boot time issue

I am using Raspberry pi 3b+ and trying to reduce the boot time from power-on, till the GUI is shown(desktop mode). What basically happens is after power-on it takes some time to show the splash screen ...
2 votes
2 answers
618 views

systemd user service shows status "dead" on boot, but runs when manually restarted

I'm writing some code to run a sound/light show from a raspberry pi 3 A+, using the latest Bullseye OS. I've been testing it manually, running via ssh, and all is well. However, it needs to run ...
2 votes
3 answers
2k views

Boot Raspberry Pi to GUI Qt app using OpenBox doesn't work

I'm trying to run Qt GUI application automatically when booting Raspberry Pi using Openbox but have problems and can't make it work. Steps I did: run raspi-config and changed Boot Options to Console ...
1 vote
1 answer
385 views

Starting problem after Buster upgrade to Bullseye [closed]

I have a Raspberri Pi 4 of 4Gb my Operating System was Debian Buster that I upgraded to Bullseye and since when I restart I have a whole bunch of messages see the screenshots attached it seems to me ...
-1 votes
3 answers
798 views

UART not working until after first log on

I'm trying to run a service which uses the UART to control some hardware. The UART is using pins 8/10 (GPIO 14/15). raspi-config has been used to disable the login shell over serial and enable the ...
2 votes
1 answer
2k views

Logging output from autostarted program (LXDE-pi/autostart)

So I have a headless Pi CM4 running standard Raspbian, its only function is to auto-start an application at boot which is invoked from /etc/xdg/lxsession/LXDE-pi/autostart I would like to log the ...
2 votes
4 answers
5k views

Start Python Script on Startup

I am having trouble getting what seems like a simple task to work. I have created a Python file that I want to begin on startup. I have followed the steps for rc.local and init.d found here. To test ...
2 votes
2 answers
267 views

Launch a Bluetooth Low Energy command after raspberry startup

I wrote a command in swift that uses the internal bluetooth low energy module of my Raspberry PI 4. This command must be launched as superuser. Everything works perfectly if I launch the executable ...
0 votes
2 answers
232 views

Configure GPIOs output upon system start [duplicate]

I'm using to systemd to launch my application and on starting the application the GPIO07 is configured as Output and set to High I want to set it to low as the system startup.
2 votes
0 answers
2k views

How to auto run moonlight-qt in console after auto login?

moonlight-qt runs in the terminal without desktop environment fine but I would like it to auto launch after auto login. I tried creating systemd service to do this but nothing happened. [Edit] This is ...
1 vote
2 answers
4k views

Connect to vpn network on startup

I have installed openvpn on my raspberry pi: sudo apt-get install openvpn I can connect to my VPN server with command: sudo openvpn confyg.ovpn Everything runs fine, but what is the best way to ...
0 votes
0 answers
336 views

Start mono application on startup

This is my first time using a linux/rasbperry pie and I am trying to start a program I made in c# on my windows on startup. It has a graphical user interface, and can run from the command line using ...
0 votes
1 answer
495 views

Systemd service not updating

I have a service on my Raspberry Pi which runs a bash file on boot. I recently updated the bash file (run.sh) but the service is not reflecting the update. So far I have tried: sudo systemctl disable/...
9 votes
4 answers
17k views

What is the earliest place in the boot process where I can put my script?

For my application, I need to cut off the USB power at the earliest possible stage. Right now it starts early in init.d but I would like it, if possible, to start before the init.d stuff starts. I ...
2 votes
1 answer
3k views

Raspberry Pi4 systemctl suspend or systemctl hibernated not supported?

I need to get my Pi4 running Raspbian to sleep or hibernate. The when I type the commands systemctl suspend or systemctl hibernated I get the error 'not supported'. Is it possible to enable this ...
1 vote
0 answers
930 views

Sound playback trough bluealsa-aplay not working as a service

I am trying to manually setup my raspberry pi 4 as a Bluetooth audio receiver, but there is no sound playback when I start the bluealsa-aplay service I created. It only works when I run the bluealsa-...
1 vote
1 answer
1k views

Why remove systemd random seed in read-only filesystems?

I'm following this excellent tutorial. In it, he guides through creating a read-only filesystem for raspberry pis. One of the steps is to remove the systemd/random-seed $ sudo rm /var/lib/systemd/...
2 votes
1 answer
3k views

autostart application on raspberry pi 4 (systemd)

I am working with raspberry pi os lite on raspberry pi 4. I wanted to autostart a Qt application. I created under /etc/systemd/system a .service file named application_one.service this is what the ....
0 votes
1 answer
1k views

Raspberry Pi Auto-start Executable with Systemd, Loaded but Inactive (Dead)

I am trying to run a CPP client application to connect to a server when Raspberry Pi is booted and connected to the Internet. I validated this CPP executable (Asio_Client_Main) works fine when ...
0 votes
2 answers
491 views

Execute A Jupyter notebook file using runipy -o myfile.ipynb command upon Raspberry PI 4(Raspbian OS) boot-up

My research regarding this issue: All methods available on the internet are about running .py files on Raspberry Pi boot. NO ACTUAL HELP ABOUT RUNNING JUPYTER NOTEBOOK FILES .ipynb ON RASPBERRY BOOT ...
0 votes
1 answer
5k views

Running a Python script as a service file on boot

I have a Python script (that works) set up and I want to run it automatically every time the Raspberry Pi is on. I have read that I need to create a unit file and I have done so, but whenever I try ...
2 votes
1 answer
436 views

Running Hologram cellular network from startup issues [cannot run on rc.local or .bashrc]

I’m playing around with the hologram Nova cellular USB kit and I’m trying to create an automatic connection using the /etc/rc.local file. Hologram uses it's own way of connecting to a ppp0 network ...
-1 votes
1 answer
240 views

mpiexec with mpi4py not executing on startup raspberry pi

I have a python programme that works out primes that I have set up with mpi4py, for it to run on my raspberry pi cluster, and I can normally run the command from any directory but when I put it in rc....
2 votes
2 answers
5k views

Disable LAN Interface duirng boot

Is there any option to disable LAN and USB interfaces during boot. I found options to disable the interfaces using the Following command. echo 0 | sudo tee /sys/devices/platform/soc/3f980000.usb/...
1 vote
1 answer
408 views

Unable to start a script as a service at boot using openvt (Pi 4)

Before I describe the problem, I just want to mention that I was able to get this working on a Pi 3 under Raspbian Buster. For some reason it's not firing on a Pi 4 under the same OS. I have a basic ...
0 votes
3 answers
3k views

Crontab suddenly doesn't start jobs

I'm suddenly having crontab issues, I didn't do anything other than change the script names and then change them in crontab as well so they all natch, the scripts work if I start them manually, so i'm ...
2 votes
4 answers
189 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 ...
0 votes
1 answer
854 views

How do I change runlevel without keyboard or screen?

I am setting up a RPi Zero W with Adafruit's 3.5" PiTFT touchscreen and my only input to the Pi is either through ssh or by editing files from another system running Ubuntu. On my latest run, in ...
37 votes
3 answers
183k views

How to get PulseAudio running?

I would like to use my Raspberry Pi as an PulseAudio sink that can play audio via the network. For starters I want to get Pulseaudio running locally and have run into various errors. I am using the ...
1 vote
1 answer
2k views

Running a camera script on startup - Raspberry Pi Zero W

I'm creating a time-lapse camera to attach to a pair of glasses. I tried out my script (python 3) and it works, but I need to get my script to work upon startup up since it will powered by a ...
2 votes
2 answers
346 views

Run a python script when start up and SSH not log in

I am new to programming and doing a simple academic project with Raspberry Pi, I have a script which will monitor the changes of database and output the change with 2 different color LED. I want it ...
0 votes
1 answer
522 views

How to clear the screen and auto-mount device on startup?

I have a Raspberry Pi connected to my TV, which I use to read videos stored on an external hard drive. I have 2 commands that I run everytime the Raspberry Pi reboots: This one, to clear the prompt ...
2 votes
1 answer
198 views

Connect to Wifi for 10 minutes then disconnect

I use one of my Raspberry Pi as a headless desk clock and, apart from a reboot once a day which forces the OS to synchronise time to an NTP server, I would like to turn the WiFi off after that stage ...
-2 votes
3 answers
240 views

says i don't have wiringpi module when runing code at startup

I have a code set up to run at boot, and it works fine when I start it via terminal, but it doesn't run at boot. I opened the terminal, and this is what I saw: Running at boot Traceback (most recent ...
0 votes
1 answer
289 views

Service in systemd dies when logging rotated

I have a Python program that I start on boot with a service in systemd. It works fine until Unix tries to rotate the system log file, and I get an error: "Journal has been rotated since unit was ...
0 votes
1 answer
1k views

/etc/rc.local fail on boot with "Failed at step STDOUT spawning /etc/rc.local: No such device" in /var/log/syslog

I am trying to diagnose why /etc/rc.local is not successfully executing on boot of a raspberry pi. I have stripped the content of /etc/rc.local to a minimal version, and still cannot get it to touch ...
2 votes
1 answer
3k views

How to start a systemd service as a non-root user?

I've been using qbittorrent-nox on a headless Raspberry Pi 3 B+. The setup was a breeze. But then I wanted to autostart qbittorrent after boot, so I wrote a systemd service unit and enabled it. It ...
1 vote
1 answer
5k views

Access Point service is not starting on boot with systemd

I've followed this guide to enable both AP and client modes in my RPi 3 at the same time, and it's working fine (some tweaking involved). But now I'm trying to start the AP on boot, which is covered ...
2 votes
2 answers
2k views

systemd service enabled doesnt start on boot

Im having troubleshooting configuring systemd with rtorrent and screen in my raspberry pi. I have the service unit file configured and when i start it manually with systemctl start rtorrent it starts ...
1 vote
1 answer
744 views

Earliest systemd target for running Python script

I have an LED strip connected to my Raspberry Pi Zero W, and I would like to run a Python script to turn on the LED’s as soon as possible after boot. In my systemd unit file, I’m using After=multi-...
5 votes
2 answers
5k views

SystemD unit dependencies to start wiringPi GPIO application

I want to start an application on system boot as early as possible. I am using Debian jessie. The application makes use of GPIO pins with the help of the wiringPi library. When using the following ...
0 votes
0 answers
137 views

systemd unit help

I have a python script that imports GPIO, json, smtplib, requests and threading. The script POSTs JSON to an API, sends alerts via smtp server and logs data to a TXT file. Program runs OK from ...
0 votes
1 answer
3k views

How can I start x11vnc headless?

Currently, I am starting x11vnc on my Pi 400 (stock Raspbian) after it boots up (with no display attached) via ssh with command x11vnc -forever -display :0 How can I do it with systemd? I am trying ...
2 votes
1 answer
895 views

Pigpio won't initialise when used by a script started by a service even with root privilege

Problem: I'm writing a Homebridge plugin that needs access to the Pi's GPIO. This plugin uses the pigpio javascript wrapper (https://github.com/fivdi/pigpio) of the pigpio C library (https://github....