systemd service to run apps headlessly in gamemode
I am trying to run some apps headlessly in steam game mode (pcloud, openrgb, discord, and jamesdsp)
all these apps except openrgb should ONLY be run headlessly when in steam game mode, otherwise they start up as normal by kde's autostart.
so far this is what I have
and then I just modifed the Return.desktop file on the desktop to
so my services are started when I switch to steam game mode but
gamescopeApps.service
persits into the kde session as well which I don't want (since kde is starting these same apps with its autostart)Solution:Jump to solution
so went back to my original idea with a few changes
first I actually had a typo with
&
in the Return.desktop
file
so what I did was add a Requires=openrgb.service
and After=openrgb.service
to the gamsecopeapps.service so I don't have to chain so many &
...2 Replies
in openrgb case its fine that service starts in kde because its just running the openrgb server not the gui. so I can still autostart the gui with kde autostart but the others are running with
xvfb-run
and I don't want that when i am on KDE
according to chat gpt this service would do exatcly what I want
and then I just remove the modifcations I did to the desktop file.
lets see if its right....
Edit: nope didn't have high hopesSolution
so went back to my original idea with a few changes
first I actually had a typo with
&
in the Return.desktop
file
so what I did was add a Requires=openrgb.service
and After=openrgb.service
to the gamsecopeapps.service so I don't have to chain so many &
the finally result looks like this
.config/systemd/user/openrgb.service
cat .config/systemd/user/gamescopeApps.service
cat Desktop/Return.desktop
cat Scripts/startGamescopeAppsBazzite.sh
the reason why it was autostarting in plasma for me before is because I had the gamescopeApps.service
previously enabled with the default.target
all I had to do was systemctl --user disable gamescopeApps.service
and it was fixed no more auto starting in plasma
now jamesdsp, pcloud, discord, and openrgb are all started headlessy when ever I switch to gamemode from the desktop
and I have my system setup to auto start to plasma instead of game mode with ujust _toggle-autologin
so I will always run the desktop file anyway to go into gamemode. no need to complicate things and make it "achtually" start with gamemode