Giter Site home page Giter Site logo

Comments (4)

prochy-exe avatar prochy-exe commented on May 27, 2024 2

@thebitwise hello, i would like to propose a solution (if you still need it lol). By using a client such as Vesktop, you can use jellyfin-rpc just fine since it uses arRPC which is an opensource reimplementation of RPC for custom discord clients. However you can also use the original client as well.

I have made a systemd file. The key for this to work is to make sure XDG_RUNTIME_DIR is defined in the env and as well the DISPLAY variable. Before running discord or vesktop we'll use Xvfb (sudo apt install xvfb) to make sure discord runs even though we dont have gui (or if you want to run it as an service)

systemd file:

[Unit]
Description=Discord
After=network.target

[Service]
Type=simple
ExecStart=/home/prochy/Documents/discord.sh
User=prochy
Restart=on-failure
Environment=DISPLAY=:99
Environment=XDG_RUNTIME_DIR=/run/user/1000
WorkingDirectory=/home/prochy/Documents

[Install]
WantedBy=multi-user.target

discord.sh:

#!/bin/sh
Xvfb -ac :99 -screen 0 640x640x24 > /dev/null 2>&1
vesktop

By making discord a service you can for example turn the service on and off using a webhook which might be useful if you don't want to be online on discord 24/7.

Obviously you need to come up with a way to run jellyfin-rpc. Imo you can just make a another systemd service and add it into discord.sh, if you server is slower (like mine) i highly suggest adding a timeout before running jellyfin-rpc so it doesn't have to do unnecessary attempts to connect to the IPC socket.

from jellyfin-rpc.

Radiicall avatar Radiicall commented on May 27, 2024

You need to have discord open on the computer running jellyfin-rpc, this doesnt really work on headless servers…

from jellyfin-rpc.

 avatar commented on May 27, 2024

You need to have discord open on the computer running jellyfin-rpc, this doesnt really work on headless servers…

I see. Thank you

from jellyfin-rpc.

Radiicall avatar Radiicall commented on May 27, 2024

Obviously you need to come up with a way to run jellyfin-rpc. Imo you can just make a another systemd service and add it into discord.sh, if you server is slower (like mine) i highly suggest adding a timeout before running jellyfin-rpc so it doesn't have to do unnecessary attempts to connect to the IPC socket.

Another suggestion is to add After=discord.service (or whatever you called the discord service) to the jellyfin-rpc service file

from jellyfin-rpc.

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.