bnetctl

command module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

bnetctl

Install, manage, and run Battle.net on Linux via Wine. Native Wayland is the default; X11/XWayland is available for compatibility. GPU-specific settings are applied automatically for AMD, NVIDIA, and Intel.

Requirements

  • Wine, >= 11.19 for Wayland. On Arch Linux, install either:
    sudo pacman -S wine-staging
    # Or: sudo pacman -S wine
    
  • Vulkan drivers for your GPU, plus DXVK and VKD3D-proton package data. On CachyOS these are available as dxvk-mingw-git and vkd3d-proton-mingw-git; other distributions may package them differently.
  • Optional: icoutils to extract the Battle.net icon for desktop entries.
  • Optional: CachyOS Wine installed at /opt/wine-cachyos as a fallback.

Install

With Go installed:

go install github.com/bnema/bnetctl@latest

Make sure your Go binary directory (usually ~/go/bin) is on PATH.

Usage

bnetctl install                         # Download and install Battle.net
bnetctl launch                          # Launch with native Wayland
bnetctl install --display-driver x11     # Install through X11/XWayland
bnetctl launch --display-driver x11      # Launch through X11/XWayland
bnetctl launch --no-hdr                  # Disable automatic HDR settings
bnetctl desktop add                     # Add Wayland and X11 menu entries
bnetctl desktop remove                  # Remove menu entries
bnetctl kill                            # Stop Battle.net and leftover Wine processes
bnetctl stop                            # Alias for kill
bnetctl clean                           # Remove cache and prefix
bnetctl clean -a                        # Also remove desktop entries and data
Wine selection
  1. BNETCTL_WINE, when set, selects the Wine executable for every display mode.
  2. Otherwise, use wine on PATH, falling back to /opt/wine-cachyos/bin/wine.
  3. A tracked prefix requires Wine at least as new as its recorded version, including for stop; an older explicit override is rejected.
  4. wineboot and wineserver must be beside the resolved Wine binary; Wayland warns below 11.19.

For example: BNETCTL_WINE=/usr/bin/wine bnetctl launch.

HDR

Native Wayland automatically enables HDR for supported World of Warcraft executables through per-executable DXVK settings, not for the Battle.net launcher. Use Wine >= 11.19, an HDR-capable compositor with HDR enabled, and an HDR-capable monitor; also enable HDR in the game.

An existing DXVK_HDR takes precedence. --no-hdr disables automatic settings and unsets inherited DXVK_HDR, but leaves user-provided DXVK_CONFIG intact. X11 mode leaves the user's HDR environment untouched.

Troubleshooting

  • Wayland rendering or login problems: try --display-driver x11 and check your Wine version and Vulkan drivers.
  • Wine version changes: close Battle.net and its games before switching. bnetctl updates the prefix and verifies graphics DLLs when needed. Pending RunOnce/RunServicesOnce tasks can block maintenance; resolve the reported tasks before retrying. Stop and clean do not run migration preflight.
  • Prefix busy: maintenance, shutdown, and deletion share an exclusion lock. Stop/clean wait up to 10 seconds for the lock; retry after maintenance finishes. Launch releases its lock once Wine starts, not at the end of the game session.
  • More detail: run bnetctl --verbose launch to see runtime selection and maintenance diagnostics. Logs are saved to ~/.cache/bnetctl/bnetctl.log.

Directories

Paths are based on your home directory; XDG_DATA_HOME and XDG_CACHE_HOME are not currently honored. Full cleanup retains the data directory and its prefix.lock file so concurrent invocations keep using the same lock inode.

Type Default path
Data ~/.local/share/bnetctl
Prefix ~/.local/share/bnetctl/prefix
Cache ~/.cache/bnetctl
Log ~/.cache/bnetctl/bnetctl.log

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL