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

Beginners • Re: auto starting programs

$
0
0

User and Group default to root so there is no need to specify them. You also shouldn't need to set the WorkingDIrectory to /usr/bin. If that is a requirement of kaiengine it would need to be done when started from the command line which I doubt is the case.

And if it is the case I'd class that as a bug that needs to be fixed.
ok I will edit it and see how it behaves that was just what I came up with that worked how I wanted it to from a couple templates I was using as guides.

The kaiengine does in fact (if launched manually) run from the command line after install by typing kaiengine, afterwards you right click an IP in the command line and select OPEN URL to use their servers.

details on that here:
https://www.teamxlink.co.uk/wiki/Instal ... spberry_Pi

If that is not what you meant by your statement and still feel that the

Code:

WorkingDirectory=/usr/bin
field is not required I will remove it and check its behavior.

So if I understand you correctly I should be able to do this instead and get the same results (with or without the working directory field):

Code:

[Unit]Description=XLink Kai EngineAfter=network-online.target[Service]Type=simpleWorkingDirectory=/usr/binExecStart=/usr/bin/kaiengineRestart=always[Install]WantedBy=default.target

Yes. And you can remove "WorkingDirectory=...". from what you've said it isn't necessary.
then followed steps 3 through 9 here:
https://linuxtldr.com/create-systemd-service/
Not going to comment on that except to say that steps 8 and 9 undo steps 4 and 6.
oops I realize that after giving it a quick glance lol. I followed steps 3 threw 6 on that page. Good catch
Now for the second part of this, getting my web browser to launch on start up. Off to do some more reading and sorting. i will post my progress with this part once i either need help or achieve what I am after.
I'm pretty sure I have this sorted out as well. From what I have found this far I need to edit a file called autostart located in

Code:

/etc/xdg/lxsession/LXDE-pi/
No. For a number of reasons:
  • That's the global (all users) file. Use the one specific to your user.
  • It'll only work if you're using X11 with Bookworm.
to contain the following lines at the end of the file:

Code:

@xset s off@xset -dpms@xset s noblank@chromium-browser --kiosk --start-maximized https://yoururl.com

Im in the process of figuring out what some of those lines are now currently to see if they even apply to what I'm doing

Code:

@xset s off

Tells the computer to not go to sleep or turn on a screen saver

Code:

@xset -dpms

Disables DPMS which I believe is Display Power Management Signaling if i understand correctly

Code:

@xset s noblank

Prevents the screen from blanking

Code:

@chromium-browser --kiosk --start-maximized https://myurl.com

This one confuses me a little. I don't understand why or if I even need the

Code:

 --kiosk
portion as I'm not certain what this does or changes.

It does appear that I can set the first page it loads up with the

Code:

 https://myurl.com
portion without having to select a homepage within the browser which is super convenient and exactly what I want any way.

I'm curious if all of the following lines are absolutely needed though as it does all seem pretty redundant

Code:

@xset s off@xset -dpms@xset s noblank

Can't comment on most of that except to say that you don't want or need the @ on those three xset lines. @ is lxde specific shorthand for "if the this thing exits run it again" and those commands only need to be run once each session.

As for "--kiosk", I can't be certain as I've not used it but my guess is that it tells chromium not to display things like the window decorations, the address bar, menu bar, etc. Check the documentation to be sure.

Lastly, you are aware of the security implications of doing it this way? With the "standard" RPiOS configuration and a keyboard* attached I can get a terminal with three keys. Once I have that I can get root level access with just eight more.

*: Doesn't have to be a keyboard. There are lots of devices available that can pretend to be a USB keyboard and insert key presses

Statistics: Posted by thagrol — Wed Feb 11, 2026 12:24 am



Viewing all articles
Browse latest Browse all 8037

Trending Articles