Rpi 4 program autostart issues
by aptgetknowledge from LinuxQuestions.org on (#5DKKJ)
Hi everyone, linux learner and first post.
Having a real problem getting a project to work as intended.
The project: Guitarix (guitar effects program) running on a raspberry pi 4 (8g ram) on the latest rasperry pi OS version. Guitarix should autostart on boot, interface with my hardware, automatically load my preferred settings, and start passing audio signal through the hardware.
This all works, and I have no problem with any of that when the X server is started and I'm in the desktop. Guitarix autostarts and does all I need it to do. However, in the end there won't be a display monitor on this, so I want to boot to CLI to save resources and reduce power consumption (in theory?). When I set the pi to boot to CLI, Guitarix does not start, because it can't start in GUI mode. It's easy to start without a gui from CLI by using "guitarix -N" as my command, then all works properly. However, still no autostart.
TRIED SOLUTIONS: I tried setting up a systemd service to start guitarix without GUI, to no avail. I checked multiple guides and assume I'm doing it correctly. I tried putting a .sh into init.d and updating defaults, to no avail. I tried making systemd run a .sh which has the command "guitarix -N" in it on startup, nothing (although on second thought, maybe systemd is making the script run before CLI is actually ready for commands and that's why it doesn't start?)
So I don't know where I'm going wrong here. It all works, but not together. My .sh works when I type or execute it in CLI, guitarix.service shows it's active, Guitarix itself does all I need it to do in GUI and CLI, the problem is simply that it will not autostart in CLI.
I can post my script/.service info here in the next post if needed.
Any help would be great, I think I'm stumped. I've spent hours on this one problem alone.


Having a real problem getting a project to work as intended.
The project: Guitarix (guitar effects program) running on a raspberry pi 4 (8g ram) on the latest rasperry pi OS version. Guitarix should autostart on boot, interface with my hardware, automatically load my preferred settings, and start passing audio signal through the hardware.
This all works, and I have no problem with any of that when the X server is started and I'm in the desktop. Guitarix autostarts and does all I need it to do. However, in the end there won't be a display monitor on this, so I want to boot to CLI to save resources and reduce power consumption (in theory?). When I set the pi to boot to CLI, Guitarix does not start, because it can't start in GUI mode. It's easy to start without a gui from CLI by using "guitarix -N" as my command, then all works properly. However, still no autostart.
TRIED SOLUTIONS: I tried setting up a systemd service to start guitarix without GUI, to no avail. I checked multiple guides and assume I'm doing it correctly. I tried putting a .sh into init.d and updating defaults, to no avail. I tried making systemd run a .sh which has the command "guitarix -N" in it on startup, nothing (although on second thought, maybe systemd is making the script run before CLI is actually ready for commands and that's why it doesn't start?)
So I don't know where I'm going wrong here. It all works, but not together. My .sh works when I type or execute it in CLI, guitarix.service shows it's active, Guitarix itself does all I need it to do in GUI and CLI, the problem is simply that it will not autostart in CLI.
I can post my script/.service info here in the next post if needed.
Any help would be great, I think I'm stumped. I've spent hours on this one problem alone.