Preface¶
When running DeepSeek Harness (dsh web) on Linux, it is typically opened in a terminal or browser tab, lacking a desktop-level entry point and system tray integration. Frequent window switching, manual copying of login tokens, browser translation pop-ups, and external link redirect logic all interrupt the development and usage workflow.
What It Is¶
dsh-tray-desktop is a lightweight desktop integration suite for DeepSeek Harness, designed for the Linux / GNOME desktop environment and developed by maintainer lbg2002. Through system tray integration, single-instance windows, a streamlined Chrome container, and external link fallback to the main browser, it brings dsh web into the desktop workflow while maintaining 0% idle CPU/GPU consumption across the entire chain.
Core Features¶
System Tray Indicator¶
The tray icon is provided by bin/dsh-tray.py, mounted to the top bar via AyatanaAppIndicator3 (compatible with AppIndicator3), and generates a desktop autostart entry.
- Refreshes only when the menu is opened, supplemented by a lightweight 15-second status check. Idle CPU usage is 0.0%, with no persistent frontend polling.
- Supports one-click actions: “Open DeepSeek Harness,” “Start / Restart Background Service,” and “Stop Background Service.”
Single-Instance Window Locking and Wake-up¶
Window launch and wake-up are handled by bin/dsh-open.sh and deepseek-harness.desktop.
- Uses
flockconcurrency locks,wmctrl,xdotool, and_NET_STARTUP_IDfocus token passing. Whether triggered from the tray or the application launcher, clicking again will bring the already-opendeepseek-harnessmain window to the foreground and activate it, preventing duplicate pop-ups. - Cold starts default to maximized across the desktop workspace, with triple guarantees via
Preferences,--start-maximized, and_NET_WM_STATE_MAXIMIZED_{HORZ,VERT}, avoiding a half-screen initial window in XWayland HiDPI scenarios. - Automatically extracts the latest
?token=login URL fromjournalctl --user -u dsh.service, eliminating the need to manually copy tokens on cold start.
Streamlined Independent Application Container¶
The independent window uses minimal launch parameters and atomic configuration writes to suppress Chrome’s built-in translation and redundant background processes.
- Disables the local language detection model (
LanguageDetectionModel), spell check, casting scan (MediaRouter),OptimizationHints,Autofill, and Safe Browsing background polling. - Writes configuration atomically before launch and appends streamlined launch parameters, completely eliminating annoying Chrome web page translation pop-ups.
External Links Redirect to System Default Main Browser¶
External link fallback is implemented by lib/index.js, lib/client.js, and bin/dsh-open-external.sh.
- Embeds an approximately 12 KB event-driven Cordis plugin with zero
setIntervaland zeroMutationObserver. Idle resource consumption is 0%. - Automatically injects
<meta name="google" content="notranslate">andtranslate="no". - When an external
http(s)link is clicked orwindow.openis triggered within DeepSeek Harness, no additional isolated window is created. Instead, after safe validation, the link opens in the system default main browser (e.g., the daily-use Chrome main profile) and receives focus, fully inheriting the main browser’s login state and browsing history. - Compatible with both scenarios where the main browser is already running and cold start scenarios. Uses
systemd-run --user --collectwithexecto prevent child processes from being accidentally killed by cgroup on exit.
Systemd User-Level Background Daemon¶
The background daemon is managed by dsh.service.
- Automatically detects the system
node/dshexecutable paths, compatible withnvm/fnm/pnpm/ global installations. - Autostarts
dsh web --no-openat boot, and automatically preserves or writes proxy environment variables per--proxy.
Installation and Enablement¶
Environment Dependencies (Ubuntu / Debian GNOME)¶
Before installation, ensure the required system base packages for window focus switching and system tray support are in place:
sudo apt update
sudo apt install -y wmctrl xdotool x11-utils python3-gi gir1.2-ayatanaappindicator3-0.1
If using the Ubuntu / GNOME top-bar tray, ensure AppIndicator support is enabled in the desktop (Ubuntu ships the Ubuntu AppIndicators extension by default).
One-Click Installation¶
git clone https://github.com/lbg2002/dsh-tray-desktop.git
cd dsh-tray-desktop
./install.sh
Common optional flags:
# Specify DSH profile (default: web) and configure service proxy
./install.sh --profile web --proxy http://127.0.0.1:7890
# Do not preserve/write proxy variables
./install.sh --no-proxy
# Only update files and plugin registration; do not restart dsh.service immediately
./install.sh --no-restart-service
After installation completes, the following are deployed:
~/.local/bin/{dsh-open.sh,dsh-open-external.sh,dsh-tray.py}~/.local/share/icons/deepseek-harness.svg~/.local/share/applications/deepseek-harness.desktop~/.config/autostart/dsh-tray.desktop~/.config/systemd/user/dsh.service- Automatically registers
dsh-tray-desktopinto thebundlesof the correspondingdshprofile
Install as a DSH Plugin Only¶
If you only need the web-side “disable translation + external link redirect to default browser” bridge plugin (invoked via fallback from lib/index.js to the built-in bin/dsh-open-external.sh), you can also install the pre-built release package directly:
dsh plugin --profile web add https://github.com/lbg2002/dsh-tray-desktop/releases/download/v0.1.1/dsh-tray-desktop-0.1.1.tgz
Typical Usage¶
Via the tray menu:
- Click the tray icon and select “Open DeepSeek Harness.”
- If the service is not running, select “Start / Restart Background Service.”
- Clicking the tray icon or the application launcher again will wake up and focus the already-open
deepseek-harnessmain window. - On cold start, the
?token=login URL is automatically extracted fromjournalctl --user -u dsh.serviceand navigated to.
Within the independent window:
- Clicking any external
http(s)link or triggeringwindow.openwill open the URL in the system default main browser and bring it to focus. - No additional isolated window is created; the main browser’s login state and browsing history are inherited.
Applicable Scenarios and Notes¶
Suitable for developers and users on Linux / GNOME desktop environments who want to integrate dsh web into their desktop workflow and reduce window switching and manual operations.
Before installation, it is recommended to review the source code and license (MIT). The plugin runs with the current dsh process permissions. Ensure all environment dependencies (wmctrl, xdotool, python3-gi, gir1.2-ayatanaappindicator3-0.1, etc.) are satisfied.
Closing¶
dsh-tray-desktop brings DeepSeek Harness into the desktop workflow through system tray integration, single-instance windows, a streamlined container, and external link fallback to the main browser, while maintaining low resource consumption. For more details and source code, visit:
- Plugin directory page: https://www.skillhub.cn/plugins/lbg2002/dsh-tray-desktop
- GitHub repository: https://github.com/lbg2002/dsh-tray-desktop