Linux

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 GitHub

Real-time Analysis

Automatic card detection every second

Terminal UI

Beautiful ASCII card display

Win Probabilities

See your odds to win, tie, or lose

Prerequisites

Python 3.10 or higher

Check your Python version:

Terminal
python3 --version

Window Management Tool (Required)

You need wmctrl for window listing and management on X11:

Terminal
sudo apt install wmctrl
Terminal
sudo dnf install wmctrl
Terminal
sudo pacman -S wmctrl

ImageMagick (Recommended)

For reliable card detection, install ImageMagick:

Terminal
sudo apt install imagemagick
Terminal
sudo dnf install ImageMagick
Terminal
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

1 Clone the Repository
Terminal
git clone https://github.com/aipokertools/AutomaticPokerOddsCalculator.git cd AutomaticPokerOddsCalculator
2 Create Virtual Environment
Terminal
python3 -m venv .venv source .venv/bin/activate
3 Install Dependencies
Terminal
pip install -r requirements_linux.txt
4 Verify Installation
Terminal
python calculator.py --help

You should see:

usage: calculator.py [-h] Poker Probability Calculator options: -h, --help show this help message and exit

Usage

Start the Calculator
Terminal
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:

Terminal
sudo apt install wmctrl

Also ensure your poker client is open and not minimized.

"Failed to capture window"

Install ImageMagick for reliable screen capture:

Terminal
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.