Cemu icon indicating copy to clipboard operation
Cemu copied to clipboard

Running Cemu creates a `~/.local/share/applications/discord.desktop` file.

Open Samueru-sama opened this issue 1 year ago • 2 comments

Current Behavior

Running Cemu creates a ~/.local/share/applications/discord.desktop file.

Expected Behavior

It should use $XDG_DATA_HOME/applications instead, the current behavior violates the XDG Base Dir specification, as it is using a hardcoded path to place that file.

Cemu already correctly follows the specification for other stuff like its own config directory as well.

Steps to Reproduce

Simply define XDG_DATA_HOME to anything other than the default ~/.local/share, run Cemu, it will place files in ~/.local/share instead of XDG_DATA_HOME

System Info (Optional)

OS: Artix Linux GPU: AMD RX 580

Emulation Settings (Optional)

No response

Logs (Optional)

No response

Samueru-sama avatar Aug 11 '24 07:08 Samueru-sama

This seems to be a bug in https://github.com/discord/discord-rpc which is not maintained anymore. There are forks of it with newer commits but I am not sure if any of them fix this specific issue.

Officially Discord wants everyone to move to GameSDK and we looked into that years ago but imho it's just no-go. It is closed source and hosted on discords server and we really don't want our build system to depend on yet another external server. Plus GameSDK forces dynamic linking while on Windows we exclusively use static linking. It's also bloated way beyond our needs, for example it comes with a full voice chat stack and we really only care about rich presence.

We'll have to look if there are any other RPC libraries or it may be even feasible to just handle the presence requests ourselves since their API is simple enough. Or alternatively we fork discord-rpc and fix this bug but it is a pretty aged library and more issues will keep popping up.

Exzap avatar Aug 11 '24 12:08 Exzap

I see, yeah I also don't agree in moving to a close source solution.

Is there a way to disable the generation of such file on startup?

Samueru-sama avatar Aug 11 '24 23:08 Samueru-sama

We are no longer using discord-rpc as of c1c2962b6633017cd956c6925288e2529c532ee4 I am closing this as completed

Exzap avatar Jul 19 '25 22:07 Exzap