[GH-ISSUE #406] Multiple instances launched when opening lan-mouse GUI repeatedly #211

Open
opened 2026-05-05 22:14:07 -06:00 by gitea-mirror · 0 comments
Owner

Originally created by @tyvsmith on GitHub (Mar 29, 2026).
Original GitHub issue: https://github.com/feschber/lan-mouse/issues/406

Description

When launching lan-mouse (GUI mode, no args) multiple times, each invocation spawns a new daemon child process and opens a new GTK window. While the daemon detects the AlreadyRunning condition and the duplicate exits, the GUI layer does not check for an existing instance before spawning.

This results in:

  • Unnecessary daemon child processes being spawned (they exit immediately, but it's wasteful)
  • Duplicate GTK windows with separate IPC connections
  • No window re-activation / raise behavior when the app is already open

Environment

  • OS: Arch Linux
  • Desktop: Hyprland (Wayland)
  • lan-mouse version: 0.10.0

Expected Behavior

Launching lan-mouse when an instance is already running should:

  1. Detect the existing daemon and reuse it (no new child process)
  2. Raise/present the existing GTK window instead of creating a duplicate

Current Behavior

Each lan-mouse launch unconditionally:

  1. Spawns a new lan-mouse daemon child process
  2. Creates a new GTK window with a new IPC connection
Originally created by @tyvsmith on GitHub (Mar 29, 2026). Original GitHub issue: https://github.com/feschber/lan-mouse/issues/406 ## Description When launching `lan-mouse` (GUI mode, no args) multiple times, each invocation spawns a new daemon child process and opens a new GTK window. While the daemon detects the `AlreadyRunning` condition and the duplicate exits, the GUI layer does not check for an existing instance before spawning. This results in: - Unnecessary daemon child processes being spawned (they exit immediately, but it's wasteful) - Duplicate GTK windows with separate IPC connections - No window re-activation / raise behavior when the app is already open ## Environment - **OS:** Arch Linux - **Desktop:** Hyprland (Wayland) - **lan-mouse version:** 0.10.0 ## Expected Behavior Launching `lan-mouse` when an instance is already running should: 1. Detect the existing daemon and reuse it (no new child process) 2. Raise/present the existing GTK window instead of creating a duplicate ## Current Behavior Each `lan-mouse` launch unconditionally: 1. Spawns a new `lan-mouse daemon` child process 2. Creates a new GTK window with a new IPC connection
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/lan-mouse#211
No description provided.