Skip to content

Linux: PATH-install marker uses macOS Library path #1782

Description

@a1mrz

Preflight

  • I searched existing issues and this isn't a duplicate
  • I'm on the latest version (or I've noted my version below)

What happened?

On Linux the desktop app creates a macOS-style directory in the user's home: ~/Library/Application Support/OpenKnowledge/path-install.json. Deleting it doesn't stick, because the next launch writes it again.

pathInstallMarkerPath() returns the macOS location on every platform (path-shim.ts#L45-L47):

export function pathInstallMarkerPath(home: string): string {
  return join(home, 'Library', 'Application Support', 'OpenKnowledge', 'path-install.json');
}

On launch, ensureCliOnPath reads that marker. When it's missing, the app re-runs the PATH install, and writeMarker() recreates the directory with mkdirSync(dirname(path), { recursive: true }) (path-install.ts#L145-L148).

Everything else the app stores on Linux already lives in ~/.config/OpenKnowledge (Electron userData), so this one file is the only reason ~/Library exists. The only way to stop it today is OK_RECLAIM_DISABLE=1, but that also turns off the launch-time MCP-wiring repair and skill install.

Expected: on Linux, keep the marker under XDG, e.g. ${XDG_CONFIG_HOME:-~/.config}/OpenKnowledge/path-install.json. That's the same directory as Electron userData, and the CLI (ok uninstall) can compute it without Electron. Existing installs would need a one-time move: read ~/Library/... when the new file is missing, write the new one, then remove the old directories if they're empty.

Steps to reproduce

  1. Install the desktop app from the .deb on Linux, launch it and accept the CLI/PATH setup.
  2. ls ~/Library/Application\ Support/OpenKnowledge/ shows path-install.json.
  3. Delete ~/Library and launch the app again. Per the code above, the marker is missing, so the install flow runs again and writeMarker() recreates the directory.

Platform

Linux

How did you install OpenKnowledge?

Desktop app (.deb). This option isn't in the list.

Version

0.74.1 (.deb) on Ubuntu 26.04.1 LTS, GNOME. The marker path is unchanged on main (98da06c) and in v0.77.7.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions