I’d add the command to the sudoers for your user, to be able to run that command withoput a password and then just add the command the a .desktop file in $HOME/.config/autostart/
Or you can add the command with a systemd unit.
Or you can use your DE’s way of configuring it. (Which I suspect will do #1)
@megavolt@Mirdarthos +Ben
Thank you. I entered the command into the console.
After that I created a file with the name ryzen-controller-startup.sh in my personal folder.
Inside is:
#!/bin/bash
sudo ‘/opt/Ryzen Controller/ryzen-controller’ --no-sandbox
exit 0
I made the file executable through Dolphin
added the script into KDE Autostart
rebooted and nothing happend.
Executing the file with terminal says: sudo: ‘/opt/Ryzen’ not found (also without the ’ it says sudo: /opt/Ryzen not found)
When posting terminal output, copy the output and paste it here, wrapped in three (3) backticks, before AND after the pasted text. Like this:
```
pasted text
```
Or three (3) tilde signs, like this:
~~~
pasted text
~~~
This will just cause it to be rendered like this:
Sed
sollicitudin dolor
eget nisl elit id
condimentum
arcu erat varius
cursus sem quis eros.
Instead of like this:
Sed sollicitudin dolor eget nisl elit id condimentum arcu erat varius cursus sem quis eros.
Alternatively, paste the text you wish to format as terminal output, select all pasted text, and click the </> button on the taskbar. This will indent the whole pasted section with one TAB, causing it to render the same way as described above.
Thereby increasing legibility thus making it easier for those trying to provide assistance.
For more information, please see:
Additionally
If your language isn’t English, please prepend any and all terminal commands with LC_ALL=C. For example:
LC_ALL=C bluetoothctl
This will just cause the terminal output to be in English, making it easier to understand and debug.
Thank you! That works now in the console, but in the terminal still asks me for a sudo password AND the script is not starting after login.
Should the script also work, when I execute it through Dolphin file manager, because Dolphin gives an error message at the top: execvp: Error in the format of the program file
When you say you placed it in autostart, I’m presuming you added it in System Settings → Workspace → Startup and shutdown. → Autostart, as in the screenshot below?
Copy that script to ~/.config/plassma-workspace/env/:
I “think” you need to fix your sudoers entry to use the same path as you use in your script
sudoedit /etc/sudoers.d/nopw
But TBH, if a script needs to run as root you should make your service file as a system-service instead of a user-service, because system-services are executed as root already.
Does that ryzen-controller provide a GUI window or status icon? (If that is the case you will run into problems with system-services because it would need access to your GUI-Session.)