Hi guys! Recently installed an application that’s adding custom RPC in discord while doing smth on the internet (app name is PreMID if you wonder).
I added it to autostart, but soon realized that it won’t run correctly without parameter --no-sandbox. How could I add this parameter to autostart to run app correctly?
You would need to define your own desktop entry file for that application. The desktop entry specification contains all the information you need. Refer to the Exec key (the command to run and its parameters are specified there as a string)
Not exactly. You’re using a desktop environment, which has its own way to autostart applications. Lightweight tools like dex are only needed if you don’t run a desktop environment (if you’re using a window manager like dwm or i3, for example).
That doesn’t sound right. Which application is overwriting the desktop file? Is it because you didn’t add the --no-sandbox flag inside kde’s GUI and the GUI will overwrite that desktop file with its settings everytime?
Can you try to run the premid executable from the command line with the --no-sandbox flag? Are there still errors?
Yeah. I think this is the issue. Because you set the autostart definition in the KDE GUI, KDE will use that same setting in the GUI to create the ~/.config/autostart/premid.desktop every time the desktop environment starts. That’s why the changes you made manually to the desktop file keeps disappearing—because the GUI is overwritting it with its own settings (without --no-sandbox) every time.
What you need to do is go to the KDE GUI and remove the setting. After that, add the desktop file for premid into ~/.config/autostart yourself.
That makes no sense at all. The settings gui should not modify any file that it is not configured to modify. Take a screenshot of your KDE autostart settings.