From b806a42bcdc257947d274b982931e740b9aa0c6f Mon Sep 17 00:00:00 2001 From: jim800121chen Date: Wed, 25 Mar 2026 01:01:10 +0800 Subject: [PATCH] fix: remove --tray flag for Linux server launch The Linux server binary is built with CGO_ENABLED=0 and -tags notray, so --tray is not available. The systemd service and LaunchServer now start the server without the --tray flag on Linux. Co-Authored-By: Claude Opus 4.6 (1M context) --- edge-ai-platform/installer/app.go | 8 +++++--- edge-ai-platform/installer/platform_linux.go | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/edge-ai-platform/installer/app.go b/edge-ai-platform/installer/app.go index abc9850..84e6f44 100644 --- a/edge-ai-platform/installer/app.go +++ b/edge-ai-platform/installer/app.go @@ -648,11 +648,13 @@ func (inst *Installer) LaunchServer() (string, error) { // Read config to get relay args // Windows: use --gui (web-based controller, no CGO needed) - // macOS/Linux: use --tray (system tray, CGO-enabled build) + // macOS: use --tray (system tray, CGO-enabled build) + // Linux: no flag (headless server, no tray/gui) var args []string - if runtime.GOOS == "windows" { + switch runtime.GOOS { + case "windows": args = append(args, "--gui") - } else { + case "darwin": args = append(args, "--tray") } cfgPath := filepath.Join(platformConfigDir(), "config.json") diff --git a/edge-ai-platform/installer/platform_linux.go b/edge-ai-platform/installer/platform_linux.go index feada96..19280d8 100644 --- a/edge-ai-platform/installer/platform_linux.go +++ b/edge-ai-platform/installer/platform_linux.go @@ -85,7 +85,7 @@ func installAutoRestart(installDir string) error { "", "[Service]", "Type=simple", - "ExecStart=" + binPath + " --tray", + "ExecStart=" + binPath, "WorkingDirectory=" + installDir, "Restart=on-failure", "RestartSec=5",