DSH Desktop Profile Switcher

August 16, 2026 · View on GitHub

One-click tool that switches a local DSH Desktop installation to the web profile, so it shows the same plugins/theme you installed in the browser (dsh web).

中文说明

Why

DSH Desktop (dsh-plugin-desktop) and the browser UI (dsh web) share the same data directory (~/.dsh), but plugins are stored per-profile. The desktop app defaults to the desktop profile, while the browser UI installs plugins into the web profile — so the two appear out of sync. This tool switches the desktop app's profile selection to web in one click.

What it does

  • Auto-locates the profile-selection/state.json used by DSH Desktop (no hardcoded username or path — works on any machine).
  • Backs up the original file to state.json.bak.
  • Sets active and lastKnownGood to web and removes any stale pending.
  • Writes valid JSON without a UTF-8 BOM (a BOM would make DSH's JSON.parse fail and silently roll back to desktop).
  • Optionally restarts a running DSH Desktop so the change takes effect immediately.

Requirements

  • Windows
  • PowerShell 5.1+ (built into Windows — no extra install)
  • DSH Desktop installed

Usage

Double-click switch-to-web.bat.

Or run from PowerShell:

powershell -ExecutionPolicy Bypass -File .\Switch-DSH-To-Web.ps1

If DSH Desktop was running, restart it (or let the tool restart it for you) for the change to take effect.

How it works

DSH Desktop reads its profile selection from %APPDATA%\DSH Desktop\profile-selection\state.json on startup. The script rewrites that file (active/lastKnownGoodweb). It is safe and idempotent — running it again simply reports that the profile is already web.

Files

FilePurpose
switch-to-web.batOne-click launcher (double-click this)
Switch-DSH-To-Web.ps1The actual logic

License

MIT