Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4921

Troubleshooting • Re: Can Open Browser from Terminal but Not from Systemd Service

$
0
0
Thank you for the pointers - will do some reading and work on those lines.

Already have your guide in hand thank you - it is what got me started!

Agree re the delay, it was more to give the comms with the microcontroller started in the previous .service to get established and not really necessary.

Make this service dependent on the other one by using apropriate "Wants", "WantedBy", "After" etc.
Is the issue narrowed down at all given that, even once the desktop is running, manually starting the service via sudo systemctl start still results in failure to start chromium?

One key issue is this "You don't appear to have specified which desktop to connect to." Unlike a terminal started from the desktop, a systemd service has no default value for which DISPLAY to connect to. That applies wherever the service is started from.

One option is to change your ExecStart to:

Code:

ExecStart=DISPLAY=:0 /home/mad/mad-page.sh
(I've removed "./" from your current oen as it is unnecessary).

Another is to add the following to your [Service] section:

Code:

Environment="DISPLAY=:0"

Statistics: Posted by thagrol — Sat Apr 20, 2024 11:47 am



Viewing all articles
Browse latest Browse all 4921

Trending Articles