# Installing OVLS

OVLS (Vortex Linux Support) is distributed as a standalone installer folder called `OVLS Installer`. This page explains how to install it on SteamOS/Linux.

## What the installer package contains

After downloading or building the publication package, you will have a folder named `OVLS Installer`. Inside it:

| File | Purpose |
|------|---------|
| `install.sh` | Entry point script. Starts the OVLS package manager. |
| `OVLS Installer.desktop` | Desktop shortcut that launches `install.sh`. |
| `OVLS - GitHub Repository.desktop` | Shortcut that opens the project's GitHub repository. |
| `README.md` | Short readme for the installer package. |
| `ovls/` | OVLS Python code and Vortex Extension files. Contains `ovls.py` and subdirectories. |

**Do not copy `install.sh` or `OVLS Installer.desktop` separately.** They must stay inside the package folder together with `ovls/`.

## System requirements

- **SteamOS 3.x**, Desktop Mode (KDE Plasma)
- **Steam** installed
- **Official Vortex** installed in a Proton prefix
- **DW-Proton Latest and Proton-GE Latest** — both recommended for use with OVLS, not required (case-insensitive GE-Proton name match: starts with `GE-Proton` or contains `Proton-GE`); both worked normally with Vortex in our tests
- **Any other installed Proton** — works; OVLS first uses the tool selected in Steam via `config/config.vdf → CompatToolMapping`; if there is no entry for that appid, it uses the installed tool recorded in `compatdata/<appid>/config_info`. The fallback is applied only when neither source gives an installed tool.
- **Python 3**
- **kdialog** or **zenity** (required for graphical dialogs; the command-line interface works without them)

OVLS does not require root access.

## Step 1: Check your Proton prefix

The usual way to install official Vortex on SteamOS is to add `vortex-setup-*.exe` to Steam as a non-Steam game, select a Proton compatibility tool and run it once. Vortex is then installed to `C:\Program Files\Vortex` inside the prefix Steam created for that game. **DW-Proton and GE-Proton are recommended choices**; they are recommendations only, not a requirement of OVLS.

**Install / Update** in OVLS Installer and OVLS Manager searches for real Vortex installations: the saved prefix, `~/Windows/prefix`, every `<Steam root>/steamapps/compatdata/<appid>` that contains both `pfx/drive_c/users/` and `pfx/drive_c/Program Files/Vortex/Vortex.exe`, and Vortex prefixes found in Heroic Games Launcher configuration (native and Flatpak installations).

- One Vortex found: its prefix is selected and used automatically, no folder search is required.
- Several found: the graphical tools show a list of prefix paths and install only into the one you pick; cancelling aborts the installation.
- None found: OVLS explains how to install Vortex as a non-Steam game and opens a directory chooser so you can find the prefix yourself. On the command line, pass `--prefix /path/to/compatdata`. The chosen directory is validated before installation.
- **Select Vortex prefix (pfx)** is a separate Manager action: it always opens the directory chooser, even when a valid prefix is configured, and cancelling it leaves the configuration unchanged.

Prefixes in additional Steam libraries (another disk or SD card) are scanned when those libraries are present and mounted. Staging targets for such libraries are included in `host.json` v2. If a library is temporarily unmounted, its existing staging target is retained only while it remains registered in Steam; removing the registration is detected by `verify`.

## Step 2: Close Vortex

Close the official Vortex application before installing or updating OVLS. The installer will refuse to modify components while Vortex is running.

## Step 3: Copy the package

Copy the entire `OVLS Installer` folder to any location on your system, for example:

```bash
cp -r "OVLS Installer" ~/Downloads/OVLS
```

## Step 4: Run the installer

Open a terminal in the `OVLS Installer` folder and run:

```bash
bash install.sh
```

This starts the graphical installer menu (using kdialog or zenity). Choose **Install / Update**.

Alternatively, you can run the command-line form:

```bash
bash install.sh install --prefix /path/to/your/prefix
```

Replace `/path/to/your/prefix` with the actual path to your Proton prefix directory (the one that contains `pfx/`).

## Step 5: Verify the installation

After installation completes, run:

```bash
bash install.sh verify
```

This checks that the OVLS copy, Vortex Extension, NXM handler, desktop shortcuts, the Steam non-Steam shortcut and its Steam Library artwork are correctly installed. Shortcut/artwork problems are reported as `skipped` or `attention_required` and do not abort installation.

## What gets installed

The installed copy is placed in `$XDG_DATA_HOME/ovls` (default `~/.local/share/ovls/`). It contains the managed OVLS Python code, the bundled Vortex Extension files, and `MANIFEST.sha256` listing the files of the managed installed copy (used for verification and safe removal), plus `VERSION`. The manifest does not list other OVLS files that may physically reside in the same directory.

OVLS also creates integration files **outside** the installed copy:

- Desktop/application entries for OVLS Manager and for Vortex; the `ovls-vortex.desktop` entry is not a supported launch path, use the Steam non-Steam shortcut described below
- An NXM handler so `nxm://` links can be passed to the official Vortex. Full NXM support in SteamOS Game Mode is not guaranteed; see [Known limitations](limitations.md).

OVLS does **not** modify the official Vortex executable, settings, game files, mods, or your staging directory during installation. It installs its own Extension into Vortex's plugin directory; that Extension can write `settings.mods.installPath[gameId]` only when you accept its `Move staging folder` notification.

### Shortcuts installed by OVLS

After installation, OVLS creates three shortcuts:

| Shortcut | Location | Purpose |
|----------|----------|---------|
| `ovls-vortex.desktop` | Applications menu **and** desktop | Not a supported way to launch Vortex: in testing it did not start Vortex. Use the Steam non-Steam shortcut below. Name: `Vortex`. Comment: `Official Vortex on Linux`. Categories: `Game;`. |
| `ovls-manager.desktop` | Applications menu | Opens OVLS Manager for install/update/verify/uninstall and prefix changes. Name: `OVLS Manager`. Comment: `OVLS Manager (Official Vortex Linux Support)`. Categories: `Utility;`. |
| `ovls-nxm.desktop` | Protocol-handler entry (not shown as a regular application) | Registers the `nxm://` protocol handler for “Download with Vortex” buttons on Nexus Mods so the link can be passed to the official Vortex. Name: `OVLS NXM Handler`. Categories: `Game;`. In Game Mode this is verified only when Vortex is already open; see [Known limitations](limitations.md). |

The OVLS Manager appears in the `Utility;` category of your application menu.

### Steam non-Steam shortcut

For a Steam prefix, when you install or update OVLS, it also updates the existing Steam non-Steam shortcut for the Vortex prefix you selected. The shortcut is renamed to `Vortex (OVLS)` and starts `~/.local/share/ovls/bin/ovls-vortex` with the OVLS icon; its Steam appid and Proton prefix are kept, so your Proton version and prefix settings stay in place. This is the supported way to launch Vortex. Other shortcuts and other Steam users are not changed, and a backup of the modified `shortcuts.vdf` is kept with the other OVLS backups.

Before the first integration, OVLS saves the original values of the four shortcut fields (`AppName`, `Exe`, `StartDir`, `icon`) and the state of the four artwork files in `$XDG_DATA_HOME/ovls/backups/steam-baseline.json`. This baseline is never overwritten by updates. A shortcut that already carries OVLS integration from an older installation is treated as legacy: no baseline is invented from its current values. On uninstall, OVLS can still use the oldest surviving timestamped backup that contains that shortcut from before OVLS changed it; the copy is used only for that uninstall and never written as a new permanent baseline.

In the same Steam user profile, OVLS installs the bundled Library artwork for that shortcut's appid into `userdata/<SteamUserID>/config/grid/`: `<appid>p.png` (vertical cover), `<appid>.png` (wide header), `<appid>_hero.png` (hero) and `<appid>_icon.png` (separate icon). Only these four appid-prefixed files are written; artwork of other games and other Steam users is not touched. Existing files are backed up before replacement, and files with identical contents are left alone.

For a Steam prefix, Steam must be closed while these files are changed. Install / Update first shows an information dialog if Steam is running, then waits up to about five minutes for Steam to exit. If Steam closes in time, the operation continues. If Steam is still open after the timeout, the whole install/update is cancelled before any component is changed; Steam is never killed or restarted. If a pending restore of the previous Steam state fails, OVLS reports the reason, leaves the shortcut and artwork unchanged, and retries on the next install/update. `Verify` shows the Steam shortcut and Steam artwork status for a Steam prefix.

### Heroic sideload shortcut

For a Heroic prefix, OVLS does not touch Steam shortcuts or artwork. Instead, Install / Update waits up to five minutes for Heroic to close, then updates the existing Heroic sideload Vortex entry (executable path, title, and OVLS artwork) and stores an immutable baseline for restore. If Heroic is still running after the timeout, the whole install/update is cancelled before any component is changed. `Verify` shows the Heroic sideload shortcut status for a Heroic prefix.

## Updating OVLS

To update OVLS to a new version:

1. Obtain a new `OVLS Installer` folder (rebuild the package or unpack a new release).
2. Copy it to any location.
3. Run `bash install.sh` and choose **Install / Update**.

The update refreshes the OVLS copy and its components. Inside the Vortex prefix it only touches OVLS-owned Extension files and may create or update only OVLS-owned service data used for Heroic Epic/GOG discovery when applicable; it repairs the Vortex uninstall key when missing or broken, adds `libraryfolders.vdf` if missing, and removes leftover `OVLS_IPC_V2` data created by older OVLS versions as legacy cleanup — not as an active IPC channel. Games, mods, and Vortex settings are not changed.

Alternatively, use the OVLS Manager from the application menu (Install / Update). It may check GitHub Releases for updates:
- If you decline the GitHub update, Manager can continue with a normal update from the already installed copy.
- If the GitHub update check is unavailable (for example, offline), Manager can use the normal update path from the already installed copy.
- If you confirm the GitHub update but download, SHA-256 verification, preparation, or installation fails, Manager reports the error; there is no automatic fallback to the normal update.

## Uninstalling OVLS

Run:

```bash
bash install.sh uninstall
```

Or use the OVLS Manager from the application menu (Uninstall).

Uninstall removes only OVLS-owned files: the installed copy, shortcuts, the NXM handler, and the installed OVLS Extension from the Vortex plugin directory in the selected prefix (only Extension files owned by OVLS), the OVLS-managed Epic/GOG discovery records it created (GOG registry entries verified by the OVLS ownership marker, Epic manifests inside the OVLS managed directory, and the managed shared registry values only when they still hold the managed path), and leftover data of the former JSON IPC channel (`OVLS_IPC_V2` in the Vortex folder) created by older OVLS versions; other files in that folder are kept. It does **not** remove:

- Vortex and its prefix
- Games, user mods, and staging folders
- User settings

For a Steam prefix, before removing anything, Uninstall waits up to five minutes for Steam to close (Steam is never killed or restarted). If Steam is still running after the timeout, uninstall is blocked before any component is removed. After Steam closes, OVLS restores the four shortcut fields and the four artwork files from the baseline. Shortcut fields that were changed after OVLS are left alone and reported as conflicts; artwork whose hash differs from the OVLS version is kept as a user file. The Non-Steam shortcut itself is never created or deleted. If the baseline is missing (legacy installation), OVLS looks for the oldest surviving timestamped backup that contains the same shortcut before OVLS changed it and restores from that temporary copy; if no such copy exists, it reports that the original Steam state is unknown and cannot be restored automatically.

For a Heroic prefix, Uninstall waits up to five minutes for Heroic to close, then restores the OVLS-managed Heroic sideload Vortex entry from its baseline before removing OVLS components. Steam shortcut/artwork restore is not used.

Every element that could not be restored is listed in the uninstall result before its backup is removed.

Uninstall also removes the OVLS launch and NXM logs with their rotated copies (`launch.log`, `nxm.log`, `.1`, `.2`), the update cache, recognized OVLS temporary files (tagged `ovls-update-*` and `ovls-help-*`, shortcut/artwork atomic leftovers and diagnostic probes), `mimeapps.list.ovls-backup-*` copies, recognized registry backups, the Steam baseline and pending files, and recognized timestamped backup directories under the default `backups/` root. It removes the OVLS entry from both `mimeapps.list` files even when another application is the default NXM handler, preserving other handlers. Unknown files in `backups/`, unrelated temporary files such as `.ovls-stage-*` or `.libraryfolders-*.tmp`, and a custom `--backup-root` outside the default directory are not removed by Uninstall. If `$XDG_DATA_HOME/ovls`, `$XDG_STATE_HOME/ovls` and `backups/` are empty afterwards, those directories are removed too; if they contain files not owned by OVLS, they are kept. No manual cleanup is needed for the components listed above.

## Directory layout

After installation, the **managed installed copy** is in `$XDG_DATA_HOME/ovls` (default `~/.local/share/ovls/`). Its layout is:

```
$XDG_DATA_HOME/ovls/
  install.sh
  README.md
  VERSION
  MANIFEST.sha256
  ovls/*.py
  ovls/assets/ovls.png
  ovls/assets/steam-artwork/*.png
  ovls/extension/{index.js,info.json}
```

`VERSION` and `MANIFEST.sha256` are generated during installation; every other path in this block comes from package staging.

`steam-artwork/` ships the Steam Library artwork set (grid, header, hero and the shortcut icon) with the managed copy. During install/update OVLS copies these PNGs into the `config/grid/` directory of the Steam user that owns the selected Vortex shortcut, using that shortcut's appid as the filename prefix.

### Additional files under the OVLS data directory

These files live inside `$XDG_DATA_HOME/ovls`, but are created by separate mechanisms and are not part of the managed copy in `MANIFEST.sha256`:

- `$XDG_DATA_HOME/ovls/bin/ovls-vortex` — wrapper that launches the official Vortex through Proton.
- `$XDG_DATA_HOME/ovls/bin/ovls-manager` — wrapper that opens OVLS Manager.
- `$XDG_DATA_HOME/ovls/ovls/ovls.log` — OVLS log written next to the installed `ovls.py` (the path shown is the one used by the release package).
- `$XDG_DATA_HOME/ovls/ovls-nxm` — wrapper that passes an `nxm://` URI to Vortex.
- `$XDG_DATA_HOME/ovls/nxm-previous-default` — saved previous `nxm://` handler for each `mimeapps.list`; restoration on uninstall is possible only when the conditions described in the NXM section (`nxm.md`) are met.
- `$XDG_DATA_HOME/ovls/backups/steam-baseline.json` — original shortcut fields and artwork state, created once before the first Steam integration.
- `$XDG_DATA_HOME/ovls/backups/steam-pending.json` — reason and element list when a restore could not be completed.

OVLS-owned service data for Heroic Epic/GOG discovery may also be stored in the selected Proton prefix and under the OVLS data directory; it is removed on uninstall.

### Integration files outside the OVLS data directory

- `$XDG_DATA_HOME/applications/ovls-vortex.desktop` (applications menu; also copied to `XDG_DESKTOP_DIR`, default `~/Desktop`)
- `$XDG_DATA_HOME/applications/ovls-manager.desktop` (applications menu only)
- `$XDG_DATA_HOME/applications/ovls-nxm.desktop` (hidden NXM protocol-handler entry)
- `$XDG_DATA_HOME/icons/hicolor/256x256/apps/ovls.png` (OVLS icon)
- `$XDG_CONFIG_HOME/ovls/config.json` (selected Proton prefix; default `~/.config/ovls/config.json`)
- `$XDG_CONFIG_HOME/mimeapps.list` and `$XDG_DATA_HOME/applications/mimeapps.list` (NXM handler registration)
- `$XDG_STATE_HOME/ovls/launch.log` (default `~/.local/state/ovls/launch.log`) and `$XDG_DATA_HOME/ovls/nxm.log`
- `<prefix>/pfx/drive_c/users/<profile>/AppData/Roaming/Vortex/plugins/ovls-json-ipc-v2/{info.json,index.js,host.json}` (Extension inside the selected Proton prefix; `host.json` is generated on install)

### Backups

Backup copies are stored separately from the managed installed copy:

```
$XDG_DATA_HOME/ovls/backups/<timestamp>/
  app/         (when the installed copy receives changed files)
  extension/   (only when Extension files are backed up)
  registry/    (only when the Vortex registry is repaired)
  steam/       (when an existing Steam shortcut or artwork file is replaced)
```

These subdirectories are conditional: none is guaranteed after every installation, and more than one can exist in the same snapshot.

All timestamp-named snapshot directories under the selected backup root are counted and only the three newest are kept; pruning runs after `copy_tree()` completes successfully, not necessarily after the whole install or update finishes. The install/update path uses the default `backups/` root; the separate CLI command `ovls.py install --backup` prunes the root given by `--backup-root` with the same retention limit. A timestamp directory may hold `app/`, `extension/`, `registry/` and `steam/` backups; those subdirectories do not affect counting. `install.sh` does not accept that flag: `package install`/`update` creates an `app/` snapshot not only when files change, but also when files are stale (removed from the manifest), the old `MANIFEST.sha256` is absent, `VERSION` is a symlink, or the installed version does not match the staged one. `dry_run` and `unchanged` create no `app/` snapshot and do not trigger the prune; an `unchanged` copy can still get a timestamp directory with `extension/`, `registry/` or `steam/` backups from prefix integration. A self-refresh from the installed copy skips `copy_tree()` entirely, so it neither creates an `app/` snapshot nor prunes old ones, but it can add prefix-integration backups under a new timestamp. Uninstall removes recognized OVLS backup entries and then the `backups/` directory only if it is empty; unknown files are kept.
