Skip to content

Multiple instances launched when opening lan-mouse GUI repeatedly #406

@tyvsmith

Description

@tyvsmith

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions