This is a simple python script meant to serve as a substitute for ReactBot.exe created by Jacksfilms, Cuyoya, and Camtoonist, written for Linux. Since the original program was built for Windows in Unity, and not everyone was able to make Wine or Proton compatibility layers work (including me), I thought that a simple script written especially for Linux would be good. This probably won't work on all Linux Distributions, but I hope it serves as a template for anyone who wants to help adjust it for specific distributions or window environments. I created this on Linux Mint so hopefully Debian-based distributions should work well.
Note: This program requires root permission. This is because I rely on the keyboard
module in python, which reads raw device files (/dev/input/inputX) but it requires root. If anyone knows how to read keyboard inputs system-wide without root, please submit a pull request.
I don't know how the "DLC" will be structured when it comes out, but I assume it's a similar setup to what is in the free version, so you probably won't have to do any different steps.
- VLC
- If the compiled executable does not work for you, Python (which may come with your distro)
- Download ReactBot.exe
- Extract it out to some directory, I will call this .../ReactBot
- Download this repo, click Code, Download ZIP, then extract it.
- Make the
reactbot
executable actually executable:chmod +x reactbot
- Place
reactbot
andconfig.json
in the same directory. It does not have to be the same directory as ReactBot - In
config.json
, edit "idle" to .../ReactBot/ReactBot_Data/sharedassets0.resource - In
config.json
, edit "phrases" to .../ReactBot/ReactBot_Data/StreamingAssets/GrabBag. Do not end the path with a "/"! - You can edit "phrase_key" to be whatever you want it to be, or leave it at the default F7
- You must edit "quit_key": The program will not stop if you close the VLC window. This leads to a leak of resources, so use the quit_key to exit properly.
- You can ignore "aout", it's for if you have problems later on.
- Save and close
config.json
, then run thereactbot
executable.
If you have problems with the vlc output not having any sound, try telling vlc which audio server you are using. Edit aout in the config to a valid aout for vlc, which you can get a list of by running vlc --list | grep "audio output"
. For example, you can set aout=pulse for pulseaudio.
- Try running the program from the terminal instead of through the GUI, look for specific error messages, make sure to run with sudo. I put my error messages there, so this should probably be the first thing you do when you start troubleshooting.
- Try running the program directly through python, instead of the pyinstaller version - see the Contributing instructions
- Ensure you have root access when running the program
- Ensure vlc is installed and in your $PATH, you should be able to run
vlc
in your terminal and a window should appear - Ask an LLM for help
- make an issue or send me a message idk
Contributions are welcome! Please help me fix my terrible code.
- Clone the repo
- Make a venv (virtual environment) directory for the modules:
mkdir venv
- Ensure that you are using a virtual environment:
python -m venv ./venv
- Get the dependencies:
./venv/bin/pip install keyboard python-vlc
, optionally also get pyinstaller - Make your changes
- Run the program with
sudo ./venv/bin/python main.py
- Make a pull request on GitHub
- If you want to use pyinstaller to make an executable, you probably need to modify vlc.py. Follow along with the instructions at the last comment of this GitHub issue; You'll know if you forgot this if you get some message along the lines of NoneType has no method media_player_new()
Thanks to Cuyoya for reacting positively to the original "How to get reactbot on linux" message which encouraged me to actually consider doing this
Thanks to u/MxPrime101 and u/ILikeMinecraft097 on the r/JacksFilms subreddit for making their posts about getting ReactBot on Linux