Introduction¶
Running dsh web requires opening a terminal every time, and the URL contains a one-time token that’s hard to retrieve after the terminal is closed. After installing this plugin, you can generate a desktop icon from the settings panel and simply double-click it to launch the GUI. All three platforms produce “native” entry points rather than obscure scripts.
What Is This¶
This is a desktop shortcut plugin designed for DeepSeek Harness (DSH), maintained by kenneth-kun. It generates platform-specific launchers across macOS, Windows, and Linux: a .app bundle on macOS, a .lnk shortcut on Windows, and a .desktop file on Linux. By coordinating between the host and the browser, the plugin enables one-click creation, updating, or removal of desktop shortcuts.
Core Features¶
- Desktop artifacts for three platforms
- macOS: Generates
DSH Web.app, a genuine app bundle with its own icon that can be dragged into the Dock. - Windows: Generates
DSH Web.lnk, launched viawscript.exe+ a VBS shim to avoid the black console window. -
Linux: Generates
DSH Web.desktop, and also writes to~/.local/share/applicationsso it can be found in the application menu. -
Launch flow
1. Checks whether a DSH instance is already serving on127.0.0.1:<port>to avoid spawning a duplicate process.
2. Attempts to reuse the last successfully token-exchanged URL (a 3xx redirect triggers reuse); otherwise falls back to the root address.
3. Runsdsh <profile> --no-open --port <port>in the background, extractsdsh web: http://…/?token=…from the logs, writes it to a state file, and opens the default browser. -
Port and concurrency
- The launch port follows the page port at the time the shortcut was created (e.g., 3080 or 3081) to avoid conflicts with other instances.
-
The launcher includes a file-lock mechanism so rapid successive clicks won’t spawn multiple instances.
-
Error notifications
-
On launch failure: macOS shows an
osascriptdialog, Windows shows a MessageBox, and Linux useszenity—each includes the log file path. -
Survives uninstallation
- Uninstalling the plugin does not affect already-created desktop icons.
launcher.cjshas been copied to the user directory and does not depend on the plugin’snode_modules.
Installation & Activation¶
The recommended method is installing from npm (version 0.1.0 is published):
dsh plugin --profile web add dsh-one-click-launcher
You can also search for dsh-one-click-launcher in Settings → Plugin Marketplace for a one-click install.
Install from GitHub source:
dsh plugin --profile web add github:kenneth-kun/dsh-one-click-launcher
Local development:
dsh plugin --profile web add /absolute/path/to/dsh-one-click-launcher
After installation, restart dsh web (or follow the prompt to refresh in the Plugin Marketplace). A “Desktop Shortcut” section will appear in Settings.
Typical Usage¶
- Open Settings → Desktop Shortcut to view the current system, shortcut path, launch port, launch profile, and status (Created / Not Created).
- Click Create / Update Shortcut to write or overwrite the desktop icon. After changing the port or profile, click again to sync.
- Double-click the desktop icon. It automatically detects whether to reuse an existing DSH process and opens the token-authenticated GUI.
For a more “formal” experience: on macOS, drag the icon into the Dock; on Windows, right-click and choose “Pin to Taskbar”; on Linux, launch directly from the application menu.
Configuration¶
The plugin’s behavior is controlled via a cordis.patch.yml config entry with three optional fields:
- insert:
- id: one-click-launcher
name: dsh-one-click-launcher
config:
port: 3080 # Port for the shortcut to launch on; defaults to the page port at creation time
profile: web # Profile for the shortcut to launch with; defaults to the current host
appName: DSH Web # Display name for the desktop icon
Directory Structure¶
dsh-one-click-launcher/
├── index.js # Host side: /plugins/one-click-launcher/{status,create,remove}
├── client.js # Browser side: the "Desktop Shortcut" section in the settings page (zh/en)
├── cordis.patch.yml # Bundle patch: inserts the plugin line into the profile
├── lib/
│ ├── launcher.cjs # Launcher copied to the user machine (zero dependencies, same file across platforms)
│ ├── platforms.js # Desktop dir / data dir / per-platform escaping
│ ├── command.js # Resolves node + dsh bin.js + profile + port
│ └── shortcuts.js # Generates .app / .lnk+.vbs / .desktop
├── assets/ # icon.png / icon.ico / icon.icns
├── scripts/make-icons.py # Maintainer icon rendering script (Pillow)
└── test/ # node --test, 19 test cases
Security & Privacy¶
- The host listens on the loopback address only. All three routes perform same-origin validation (
Hostmust be loopback,Originmust be absent or same-origin to pass, withdsh-app://on a separate allowlist) to prevent other web pages from creating files on the desktop via CSRF. - No telemetry, no outbound network requests. The plugin only writes to the Desktop,
%LOCALAPPDATA%/,~/.local/share, and the state directory. - Generated shortcuts contain no API keys. Credentials are still managed by DSH itself; the launcher merely directs the browser to the token-authenticated URL.
Known Limitations¶
- For sessions launched by the official desktop shell (Electron-hosted host),
argvdoes not includebin.js, so the generated shortcut falls back to thedshcommand. Ifdshis not on PATH, you must run it once from a terminal and add it to PATH. - The shortcut is only responsible for “launching and opening the GUI”—it does not set the host process to auto-start on boot.
- On Windows, if system policy disables
WScript.Shellin PowerShell, the shortcut falls back to a desktop.cmdfile (same functionality, but a brief command-line window flash will appear on launch).
Use Cases & Notes¶
Ideal for developers who want a desktop shortcut entry point for dsh web, especially in multi-platform (macOS, Windows, Linux) environments where a unified experience is needed. It is recommended to review the source code and license before use. The plugin runs with the permissions of the current dsh process—ensure you have write access to the Desktop directory and the state directory.
Summary¶
This plugin simplifies the DSH workflow by generating native desktop entry points with a single click. It supports three platforms, port following, session/token reuse, and cross-platform error notifications. For more details, visit the directory page and the GitHub repository.
- Directory page: https://www.skillhub.cn/plugins/kenneth-kun/dsh-one-click-launcher
- GitHub: https://github.com/kenneth-kun/dsh-one-click-launcher