Introduction¶
DSH’s philosophy is “everything is a plugin”. In actual use of the DSH Web GUI, the common practice is to start a local HTTP service via dsh web and manually open a browser to access it. For those who use DSH locally for a long time, this process adds an extra step: remembering the port, opening the browser, and managing tabs every time.
dsh-desktop-shell solves this entry problem: dsh web automatically pops up an Electron window upon startup, and instead of exiting the dsh process when the window is closed, it hides to the system tray; the entire dsh web process is terminated only when exiting from the tray.
What is it¶
dsh-desktop-shell is an MIT-licensed DSH desktop shell plugin. After installing it into the web profile, it enables dsh web to have an Electron desktop window entry while keeping the existing DSH HTTP service unchanged.
Verified facts listed: Zero changes to the dsh engine.
The repository address is:
https://github.com/Funnyvalentine00/dsh-desktop-shell
Verified materials do not list a separate maintainer field; the repository address points to Funnyvalentine00.
Core Features¶
Below are the verified features:
dsh webautomatically pops up an Electron window and loads the existing DSH HTTP service upon startup.- Hides to the system tray when the window is closed, and the dsh process continues running.
- The tray menu supports opening the main window and exiting the dsh process.
- When running
dsh webrepeatedly, it focuses the existing window via a single-instance lock instead of popping up a new window. - Remembers window position and size, maintaining them when reopening after exiting.
- Automatically falls back to browser mode when Electron is missing, spawn fails, or window loading fails, without blocking
dsh web. - Optional desktop shortcuts to launch
dsh weband bring up the existing window with a double-click.
Installation and Enablement¶
Verified materials do not provide a single official installation command like dsh plugin add ..., only the profile integration method. The following explains the steps based on verified information.
1. Integrate web profile¶
Add the dsh-desktop-shell dependency to package.json in the profile and write dsh-desktop-shell into dsh.profile.bundles:
dependencies
dsh-desktop-shell
dsh.profile.bundles
dsh-desktop-shell
2. Install link in profile directory¶
Execute in the profile directory:
npm install
3. Start verification¶
Execute:
dsh web
If the plugin works, dsh web will start the existing DSH HTTP service and automatically pop up an Electron window.
Typical Usage¶
Launch desktop window¶
dsh web
Temporarily disable desktop window¶
If you only want to use browser mode, you can execute:
dsh web --no-desktop
Or set an environment variable in PowerShell:
$env:DSH_DESKTOP="0"; dsh web
You can also disable the desktop window in the profile configuration:
enabled: false
Use the tray¶
After startup, closing the window only hides it to the system tray, and the dsh process continues running. The tray menu supports:
- Opening the main window
- Exiting the dsh process
Verified facts indicate that the tray “Exit” relies on the interface provided by the launcher to terminate the dsh process:
ctx.appExit(0)
Use desktop shortcuts¶
If you are not used to typing commands in the terminal, you can use the startup scripts provided by the plugin:
scripts/launch-dsh-web.cmd
scripts/launch-dsh-web.ps1
Double-clicking the corresponding script will launch dsh web; if an instance is already running, it will bring up the existing window instead of starting a new one.
Fallback and Exit Behavior¶
The key fallback strategy of dsh-desktop-shell is as follows:
- Automatically returns to browser mode when Electron is missing, spawn fails, or window loading fails.
- When window loading fails, Electron exits, and DSH remains in browser mode.
- The tray “Exit” will terminate the entire
dsh webprocess.
Verified materials emphasize: any Electron missing, spawn failure, or loading failure will automatically return to browser mode without blocking dsh web.
Uninstallation¶
To restore pure browser mode, first remove the configuration, then reinstall the profile dependencies:
- Remove
dsh-desktop-shellfromdependenciesanddsh.profile.bundlesin profilepackage.json:
dsh-desktop-shell
- Execute in the profile directory:
npm install
- Restart:
dsh web
Applicable Scenarios and Notes¶
Suitable for those who use DSH Web GUI locally for a long time and want dsh web to automatically pop up a desktop window. It will not change the core of DSH’s web service, only adding an Electron window entry and tray management.
Please note: The plugin runs together with the current dsh web process and executes local behaviors with the current DSH process permissions. You should check the source code, dependencies, and license before installation.
Also, if maintaining the desktop shortcut script, launch-dsh-web.cmd must remain in pure ASCII content. Embedded Chinese paths will appear as garbled text on GBK systems.
If Electron binary download is slow, verified materials mention setting:
ELECTRON_MIRROR
Conclusion¶
dsh-desktop-shell provides desktop entry, tray management, and fallback capabilities, without changing the core of DSH’s web service and process. If you only need local HTTP access, you can continue using browser mode; if you want dsh web to automatically pop up a manageable window, it can be integrated as a profile plugin.
Verified materials did not provide a community directory page URL, so a confirmed link cannot be given. See GitHub repository:
https://github.com/Funnyvalentine00/dsh-desktop-shell