Similar to pulseaudio
slot, snaps that want to connect with discord via the discord-rich-presence, it needs to have write access to the unix socket that is exposed by discord. For discord snap, the rpc socket path is
/run/user/xxxx/snap.discord/discord-rpc-X
or may be in the $XDG_RUNTIME_DIR
, and this file needs to be allowed with write access. So, a new plug I think would be the best for this. More discussions here
opened 08:11AM - 12 Oct 24 UTC
bug
Fails with
```
thread 'frb_workerpool' panicked at /home/runner/.cargo/regis… try/src/index.crates.io-6f17d22bba15001f/discord-rich-presence-0.2.4/src/ipc_unix.rs:90:43:
Client not connected
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Instance of 'PanicException'
#0 FlutterRustBridgeBase._transformRust2DartMessage (package:flutter_rust_bridge/src/basic.dart:128)
#1 FlutterRustBridgeBase.executeNormal.<anonymous closure> (package:flutter_rust_bridge/src/basic.dart:70)
<asynchronous suspension>
#2 FlutterDiscordRPC.setActivity (package:flutter_discord_rpc/src/flutter_discord_rpc_base.dart:81)
<asynchronous suspension>
```
I am using this dart package which is using this rust package:
https://github.com/KRTirtho/frb_plugins/blob/main/packages/flutter_discord_rpc/native/Cargo.toml#L18C1-L18C22
in the rust package that is being there used this is the line where it wants to create a unix socket:
https://github.com/vionya/discord-rich-presence/blob/18ecbe78c7030a31932efb550e738fef94aa7a6b/src/ipc_unix.rs#L90
@kenvandine do you know if this doable with the snap with any plug/slot?
I disable this for now for linux and added a toggle setting for all inside settings
vionya:main
← soumyaDghosh:snap-fix
opened 06:20PM - 15 Oct 24 UTC
For snaps, XDG_RUNTIME_DIR is `/run/user/1000/snap.snap_name`, so, it needs to b… e normalized.
2 Likes