I have tried editing the application startup commands, but it gives me error for not having rights to do so.
So i have opened application menu searched for Steam and then right clicked it and pressed Edit application. There im not able to save it. Is there a way to open it with sudo rights or how could i add gamemoderun to be launched every time when Steam opens?
With kmenuedit it does not save the changes to the application even when i press save. I can’t run kmenuedit with sudo.
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’
kf.i18n: KLocalizedString: Using an empty domain, fix the code. msgid: “KDE Menu Editor” msgid_plural: “” msgctxt: “”
kf.dbusaddons: DBus session bus not found. To circumvent this problem try the following command (with bash):
export $(dbus-launch)
I might guess this is specifically because you are usingthe flatpak.
Its meant to be ‘containerized’.
Sounds like you were trying to edit the steam .desktop file directly?
That will not be allowed without root/sudo … and probably should not be done at all.
Normally to overwrite (or add) some things in a .desktop file we would
Copy the .desktop file to HOME, ex: cp /usr/share/applications/steam.desktop ~/.local/share/applications/
Edit the desktop file micro ~/.local/share/applications/steam.desktop
Though this is also odd.
I think this should be set - here it is.
$ echo $XDG_RUNTIME_DIR
/run/user/1000
And this
Does this mean something is wrong with your dbus in general?
Maybe something to do with the switch to dbus-broker a while ago?
I found a .desktop file in /var/lib/flatpak/app/com.valvesoftware.Steam/x86_64/stable/173cd565d98d4951bd858bad290e8481a9e72dbf5f7c9c980165a060666184b1/files/share/applications/
Now there is line Exec=steam steam://open/friends
or
Exec=/app/bin/steam %U
After copying it to ~/.local/share/applications
Edit the Exec line to include gamemoderun
Exec=gamemoderun /app/bin/steam %U
Though full paths are probably best
Exec=/usr/bin/gamemoderun /app/bin/steam %U
But also sometimes we might need to give the parser a little help and run it as a shell command
(especially useful with older/minimal utilities like xfce autostart or to add environment variables)
There is one issue with it though. When i make a panel icon from it. It does not launch for some reason unknown to me. I did sort of jank fix it by making sh script that starts gamemode and steam and pointing that to the panel icon.
With the overriding .desktop file in place it should supplant other iterations of ‘normal’ launching it.
That is - from your desktop application menu etc, just the regular “Steam” entry should now use gamemoderun.
There should be no need to explicitly use the new .desktop file when, for example, pinning the app to the panel. Conversely it should not be a problem to use it either.
Using a start script is also an acceptable solution if you need to do that for whatever reason.