Giter Club home page Giter Club logo

vm-rpc's Introduction

vm-rpc

Discord RPC for VMs.

This software is still in alpha development

pypresence

Works with VMware Workstation 14/15, VMware Fusion 14/15, Hyper-V and VirtualBox 7. VMware Workstation Player 14/15 users, see here.

How to use

  1. Create a Discord app. https://discordapp.com/developers/
  2. Install Python 3.
  3. Install pypresence and python-dateutil by running pip -r requirements.txt.
  4. Rename sample-settings.json to settings.json and configure your settings as neccessary.
  5. Run main.py. Hyper-V support requires adminstrator privileges.

Note: If you get Access is denied, restart Discord.

Note: Discord has a 15 second ratelimit in sending Rich Presence updates.

TO-DO

  • Hyper-V library
  • Add Hyper-V to code
  • Wait for Discord to open instead of erroring out
  • Stopped running VMs message
  • Multi-platform support
  • Add VirtualBox to code
  • Allow user to enable/disable hypervisor support
  • Add custom hypervisor priority
  • Switch client IDs based on current hypervisor
  • Switch large image based on current OS for VMware, and a image of Hyper-V for Hyper-V
  • Small image of VMware if VMware is current hypervisor
  • Unified settings file using JSON

Credits

vm-rpc's People

Contributors

dhinakg avatar foxt avatar them8thy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vm-rpc's Issues

File not Found

PS C:\Users\user\vm-rpc> python main.py
Connected to RPC.
Please note that Discord has a 15 second ratelimit in sending Rich Presence updates.
Traceback (most recent call last):
File "C:\Users\user\vm-rpc\main.py", line 143, in
vmware.updateOutput()
File "C:\Users\user\vm-rpc\vmware.py", line 18, in updateOutput
output = subprocess.run([str(self.vmrunpath), "list"], stdout=subprocess.PIPE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\subprocess.py", line 546, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\subprocess.py", line 1022, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Python311\Lib\subprocess.py", line 1491, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] Das System kann die angegebene Datei nicht finden

no idea if I'm the problem, a small solution would be nice!

Doesn't work

When trying to run it, it gave me one-time that two of them were running but every other start after that wouldn't lead me to success.
It either gives me "Stopped running VM's" which means it detects that no VM's where running, while they were. Even restarting, every possible program, changing them as an startup routine (Starting VMWare first, then the program et cetera)

It doesn't work for me somehow (I am using VMWare Workstation Pro 17.x), I am pretty sure it is possible. But I don't know why it doesn't work and it did before..
Could you please help me? :)

No module named 'pypresence'

Using:

from pypresence import Presence, InvalidPipe # For rich presence

But getting the following error

    from pypresence import Presence, InvalidPipe # For rich presence
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'pypresence'

Doesn't run

When trying to run i get this:

Connected to RPC.
Please note that Discord has a 15 second ratelimit in sending Rich Presence updates.
Traceback (most recent call last):
  File "X:\Desktop\vm-rpc-master\main.py", line 218, in <module>
    virtualbox.updateOutput()
  File "X:\Desktop\vm-rpc-master\virtualbox.py", line 25, in updateOutput
    output = subprocess.run([str(self.vmrunpath), "list", "runningvms"], stdout=subprocess.PIPE)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Python311\Lib\subprocess.py", line 1538, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] Das System kann die angegebene Datei nicht finden

Das System kann die angegebene Datei nicht finden means The system couldn't fin the file specified
Here's a screenshot:
grafik

Big Thank you

Hey, I normally don't do this and I feel like it is a bit rude to do this in an issue, but I don't know how I could thank you either.
This is basically directly the solution I needed, I wanted to show what VM I'm working on in Workstation without people needing to ask me, and having it all here is a nice thing.
There's not really a lot I can say, thank you for the repository though, even if the last release was made in October.
Might as well add that I had no issues with the 0.5.0 release and everything has been running smoothly.

I'll immediately close the issue since it's not an issue.

Name 'hypervisor' is not defined when trying to start script

Hi!

So, I am having a little problem, when I try to start this python script, it has this error:

Traceback (most recent call last):
  File "main.py", line 52, in <module>
    if hypervisor == []:
NameError: name 'hypervisor' is not defined

I am on Windows 10 using Python 3.7.4 with VMWare Workstation 15. I did install pypresence but it still doesn't work.

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.