Linux Installation Guide
Get the Automatic Poker Odds Calculator running on your Linux system in minutes. This terminal-based application automatically detects cards from your poker client and displays real-time hand probabilities.
View on GitHubReal-time Analysis
Automatic card detection every second
Terminal UI
Beautiful ASCII card display
Win Probabilities
See your odds to win, tie, or lose
Prerequisites
Check your Python version:
python3 --version
Window Management Tool (Required)
You need wmctrl for window listing and management on X11:
sudo apt install wmctrl
sudo dnf install wmctrl
sudo pacman -S wmctrl
ImageMagick (Recommended)
For reliable card detection, install ImageMagick:
sudo apt install imagemagick
sudo dnf install ImageMagick
sudo pacman -S imagemagick
X11 Required: This tool currently works with X11 window systems. Wayland users may need to run their poker client under XWayland or use an X11 session.
Installation
git clone https://github.com/aipokertools/AutomaticPokerOddsCalculator.git
cd AutomaticPokerOddsCalculator
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements_linux.txt
python calculator.py --help
You should see:
Usage
source .venv/bin/activate
python calculator.py
This will:
- List all open windows
- Let you select your poker client
- Start the live probability display
Controls: Use ↑ / ↓ arrows to adjust opponent count (1-9). Press Ctrl+C to exit.
Display Preview
╭────────────────── Automatic Poker Odds Calculator ♥ ♦ ♣ ♠ ───────────────╮ │ Window: PokerStars │ Opponents (↑↓): 2 │ Scan #42 │ Ctrl+C exit │ ╰──────────────────────────────────────────────────────────────────────────╯ ╭─────── Your Hole Cards ───────╮╭──────────── Community Cards ────────────╮ │ ┌─────┐ ┌─────┐ ││ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ │ │ │J │ │2 │ ││ │9 │ │5 │ │K │ │7 │ │ │ │ ♦ │ │ ♣ │ ││ │ ♠ │ │ ♦ │ │ ♣ │ │ ♦ │ │ │ │ J│ │ 2│ ││ │ 9│ │ 5│ │ K│ │ 7│ │ │ └─────┘ └─────┘ ││ └─────┘ └─────┘ └─────┘ └─────┘ │ ╰───────────────────────────────╯╰─────────────────────────────────────────╯ ╭────────────────────────── Hand Probabilities ────────────────────────────╮ │ Hand You Opp │ │ Straight Flush 0.0% ░░░░░░░░░░░░░░░░░░ 0.0% ░░░░░░░░░░░░░░░░░░ │ │ Four of a Kind 0.0% ░░░░░░░░░░░░░░░░░░ 0.1% ░░░░░░░░░░░░░░░░░░ │ │ Full House 0.0% ░░░░░░░░░░░░░░░░░░ 2.5% ░░░░░░░░░░░░░░░░░░ │ │ Flush 0.0% ░░░░░░░░░░░░░░░░░░ 3.2% ░░░░░░░░░░░░░░░░░░ │ │ Straight 0.0% ░░░░░░░░░░░░░░░░░░ 9.9% ▓░░░░░░░░░░░░░░░░░ │ │ One Pair 39.0% ▓▓▓▓▓▓▓░░░░░░░░░░░ 47.9% ▓▓▓▓▓▓▓▓░░░░░░░░░░ │ │ High Card 60.9% ▓▓▓▓▓▓▓▓▓▓▓░░░░░░░ 5.8% ▓░░░░░░░░░░░░░░░░░ │ ╰──────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────── Win Probability ──────────────────────────────╮ │ ██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │ │ WIN: 6% TIE: 2% LOSE: 92% │ ╰──────────────────────────────────────────────────────────────────────────╯
Troubleshooting
"No visible windows found!"
Make sure wmctrl is installed:
sudo apt install wmctrl
Also ensure your poker client is open and not minimized.
"Failed to capture window"
Install ImageMagick for reliable screen capture:
sudo apt install imagemagick
The window may also have moved off-screen or been minimized.
"API request timed out"
Check your internet connection. The API server may be temporarily unavailable.
Display looks garbled
Make sure your terminal supports Unicode and 256 colors. Recommended terminals: GNOME Terminal, Konsole, Alacritty, or kitty. Try resizing your terminal to be wider.
Using Wayland?
This tool requires X11. If you're using Wayland, you can either:
- Run your poker client under XWayland
- Log out and select an "X11" or "Xorg" session at the login screen
API Information
Endpoint: https://aipokertools.com/api/v1/detect-cards
Rate: 1 request per second
License Key: Prompted at first run and saved to calculator_license_key.txt
You're all set! Open your poker client and start the calculator to see real-time odds.