Coder Social home page Coder Social logo

discord-plays-linux's Introduction

Discord Plays Linux

A shared Linux container that can be controlled by anyone on Discord.

Bot commands

Command Description
m<x>,<y> Move the mouse by the given offset.
M<x>,<y> Move the mouse to the given position.
l<x>,<y> Drag the mouse by the given offset.
L<x>,<y> Drag the mouse to the given position.
f <text> Move mouse cursor to the given text (uses OCR).
c Click the mouse.
rc Right-click the mouse.
mc Middle-click the mouse.
u, uu, … Scroll the mouse wheel up (by the number of us).
d, dd, … Scroll the mouse wheel down (by the number of ds).
k <key> … Press the keyboard key.
t <text> Type the given text.
e Press the enter key.
y <text> Copy the given text to the clipboard.

Components

  • Two desktop Linux containers:
    • discord for connecting to Discord and share the screen.
    • desktop for the actual desktop.
  • An agent to control the VM.
  • A Discord bot that talks to the agent.

Notes for server operators

# Start all services
docker-compose up -d

# Tail logs
docker-compose logs --tail=100 -f

# Access desktop as root
docker-compose exec desktop bash

# Access desktop as desktop user
docker-compose exec desktop su desktop

# Restart agent (sometimes required when transparency is not working)
docker-compose exec desktop supervisorctl restart agent

# Stop OCR system (when CPU overloaded)
docker-compose exec desktop supervisorctl stop ocr

# Recreate the Desktop docker container (when someone `rm -rf`’d it)
docker-compose up -d --force-recreate desktop

# Tail agent logs
docker-compose exec desktop supervisorctl tail -f agent

# Show overlay
docker-compose exec discord sudo -u desktop -H /opt/overlay/start.sh

# Pipe sound from desktop to Discord
pacmd load-module module-tunnel-source server=desktop source=virtual.monitor source_name=desktop

# Pipe video from desktop to Discord
ffplay -fs -f x11grab -video_size 1280x720 -i desktop:1.0

discord-plays-linux's People

Contributors

dtinth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.