Code Monkey home page Code Monkey logo

Comments (5)

FichteFoll avatar FichteFoll commented on May 17, 2024 1

That's fine, I can work with this. I need to add snap support as well, as I have done somewhere else already.

from discordrp-mpris.

FichteFoll avatar FichteFoll commented on May 17, 2024

If someone who uses discord vial flatpak would provide some instructions or submit them as a pull request, I would be glad to add that.

from discordrp-mpris.

Atrate avatar Atrate commented on May 17, 2024

I use Discord through Flatpak and have so far had no success getting it to work.

Background: Flatpak does not let processes discover other running processes, and there is no workaround: flathub/com.discordapp.Discord#11 .

It is possible to allow a Flatpak application to access the following features, though:

  • IPC (share=ipc)
  • D-Bus Session Bus (socket=session-bus)
  • D-Bus System Bus (socket=system-bus)

As well as specified names on the system and session buses (divided by "talks" and "owns).

So far, I've enabled Discord to use IPC, the Session and System buses and I've had no luck. What name does drp-mpris use on the session/system bus?

from discordrp-mpris.

FichteFoll avatar FichteFoll commented on May 17, 2024

We communicate with Discord over the UNIX Domain Socket it provides in a temporary directory.

def _get_pipe_pattern() -> str:
env_keys = ('XDG_RUNTIME_DIR', 'TMPDIR', 'TMP', 'TEMP')
for env_key in env_keys:
dir_path = os.environ.get(env_key)
if dir_path:
break
else:
dir_path = '/tmp'
return os.path.join(dir_path, 'discord-ipc-{}')

I'm not aware of any other mechanism of communication that Discord exposes currently, but I also haven't revisited this topic in a while.

from discordrp-mpris.

Atrate avatar Atrate commented on May 17, 2024

The Discord Socket when Discord is ran in Flatpak can be found here:

$XDG_RUNTIME_DIR/app/com.discordapp.Discord/discord-ipc-0

Update: creating a symlink from $XDG_RUNTIME_DIR/app/com.discordapp.Discord/discord-ipc-0 to $XDG_RUNTIME_DIR/discord-ipc-0 works, so getting drp-mpris to recognize the first path should also work.

I can try creating a PR for that, but I am not too experienced with Python.

from discordrp-mpris.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.