Skip to content

Instantly share code, notes, and snippets.

@jctanner
Created June 20, 2026 21:50
Show Gist options
  • Select an option

  • Save jctanner/d5be0be1a4cbe656d9a14a1b1d1c5c85 to your computer and use it in GitHub Desktop.

Select an option

Save jctanner/d5be0be1a4cbe656d9a14a1b1d1c5c85 to your computer and use it in GitHub Desktop.
cnc-generals-zero-hour-linux.md

Zero Hour Linux NVIDIA Runbook

This document collects the local Linux launch paths for Command & Conquer Generals Zero Hour, Generals Online, and the adapter build on this machine.

System Baseline

  • OS: Fedora 44
  • Steam app ID: 2732960
  • Steam game name: Command & Conquer Generals Zero Hour
  • Working Proton tool: Proton - Experimental
  • NVIDIA PRIME offload target observed: NVIDIA T500
  • Steam install:
/home/jtanner/.local/share/Steam/steamapps/common/Command & Conquer Generals - Zero Hour
  • Convenient symlink:
/home/jtanner/GeneralsZeroHour
  • Proton prefix:
/home/jtanner/.local/share/Steam/steamapps/compatdata/2732960/pfx

NVIDIA Optimus / PRIME

Use these environment variables to force rendering on the NVIDIA GPU:

export __NV_PRIME_RENDER_OFFLOAD=1
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __VK_LAYER_NV_optimus=NVIDIA_only

Useful verification commands:

nvidia-smi
ps -eo pid,ppid,stat,comm,args | rg -i '2732960|generals|game\.dat|proton|wine|GeneralsOnline|GameAdapter'

Expected NVIDIA-visible processes include one or more of:

game.dat
GeneralsOnlineZH_60.exe
GameAdapter.exe

Steam Launch Options

For launching the Steam game directly, set Steam launch options to:

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus=NVIDIA_only %command% -win

The equivalent terminal launch is:

__NV_PRIME_RENDER_OFFLOAD=1 \
__GLX_VENDOR_LIBRARY_NAME=nvidia \
__VK_LAYER_NV_optimus=NVIDIA_only \
steam -applaunch 2732960 -win

Zero Hour is normally capped around 30 FPS. That is expected for the classic SAGE simulation; forcing higher FPS can affect speed, animations, or multiplayer sync.

Generals Online Installer

The local Generals Online installer is:

/home/jtanner/Downloads/GeneralsOnline_setup_042826_QFE5_EAC.exe

Run it inside the Zero Hour Proton prefix:

protontricks-launch --appid 2732960 /home/jtanner/Downloads/GeneralsOnline_setup_042826_QFE5_EAC.exe

When the installer asks for the Zero Hour install, use:

Z:\home\jtanner\GeneralsZeroHour\Generals.exe

Installed Generals Online executables live under:

/home/jtanner/GeneralsZeroHour/GeneralsOnlineZH.exe
/home/jtanner/GeneralsZeroHour/GeneralsOnlineZH_60.exe
/home/jtanner/GeneralsZeroHour/EAC_LaunchGeneralsOnline.exe

Generals Online Launcher Script

Local script:

/home/jtanner/bin/generals-online-windowed

Current contents:

#!/usr/bin/env bash
set -euo pipefail

export __NV_PRIME_RENDER_OFFLOAD=1
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __VK_LAYER_NV_optimus=NVIDIA_only

exec protontricks-launch --appid 2732960 \
  "/home/jtanner/.local/share/Steam/steamapps/common/Command & Conquer Generals - Zero Hour/GeneralsOnlineZH_60.exe" \
  -win -xres 1280 -yres 720

Run it manually:

/home/jtanner/bin/generals-online-windowed

Desktop launcher:

/home/jtanner/.local/share/applications/generals-online-windowed.desktop

Current contents:

[Desktop Entry]
Type=Application
Name=Generals Online Windowed
Comment=Launch Generals Online directly in windowed mode with NVIDIA PRIME
Exec=/home/jtanner/bin/generals-online-windowed
Terminal=false
Categories=Game;

Adapter Game Launch

The adapter build is copied to:

/home/jtanner/GeneralsZeroHour/GameAdapter.exe

The project launcher is:

projects/scripts/launch-match.py

Its start_game() path launches the adapter with desktop session variables, NVIDIA PRIME variables, and Proton:

protontricks-launch --appid 2732960 /home/jtanner/GeneralsZeroHour/GameAdapter.exe -win -xres <width> -yres <height>

The current shell wrappers are:

run.sh
run-lan.sh

run.sh builds the game and launches a local skirmish:

./run.sh

run-lan.sh builds the game and launches a LAN host flow:

./run-lan.sh

Skip the build step for LAN launch:

./run-lan.sh --no-build

Both wrappers call projects/scripts/launch-match.py, which starts the game in a detached tmux session and uses NVIDIA PRIME offload.

Codex / Shell Desktop Variables

When launching from a non-desktop shell, the game may need the active desktop environment explicitly:

DISPLAY=:0
XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.44LNP3
XDG_RUNTIME_DIR=/run/user/1000
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus

Manual foreground adapter launch:

env \
  DISPLAY=:0 \
  XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.44LNP3 \
  XDG_RUNTIME_DIR=/run/user/1000 \
  DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus \
  __NV_PRIME_RENDER_OFFLOAD=1 \
  __GLX_VENDOR_LIBRARY_NAME=nvidia \
  __VK_LAYER_NV_optimus=NVIDIA_only \
  protontricks-launch --appid 2732960 \
  /home/jtanner/GeneralsZeroHour/GameAdapter.exe \
  -win -xres 1280 -yres 720

Detached tmux form:

tmux new-session -d -s gameadapter \
  'env DISPLAY=:0 XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.44LNP3 XDG_RUNTIME_DIR=/run/user/1000 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus=NVIDIA_only protontricks-launch --appid 2732960 /home/jtanner/GeneralsZeroHour/GameAdapter.exe -win -xres 1280 -yres 720 2>&1 | tee /tmp/gameadapter-launch.log'

GenTool Status

There is currently no local GenTool installer script or GenTool artifact documented in this workspace. Searches found source-code compatibility references to GenTool behavior, but not an installed GenTool directory, installer, or setup wrapper under:

/home/jtanner/GeneralsZeroHour
/home/jtanner/bin
/home/jtanner/Downloads

If GenTool support is added later, document:

  • the downloaded installer/archive path
  • the Proton prefix command used to install it
  • any copied DLLs or GenTool/ files under /home/jtanner/GeneralsZeroHour
  • the verification command or in-game indication that GenTool loaded

Related Docs

  • projects/docs/zero-hour-setup.md
  • projects/docs/notes/DEV-BUILD-CONTEXT.md
  • projects/docs/plans/LINUX-ADAPTER-PLAN.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment