Skip to content

Background Launch Support #1

@osteele

Description

@osteele

Current Status

  • ✅ macOS: Implemented
  • ❌ Windows: Not yet implemented
  • ❌ Linux: Not yet implemented

Implementation Notes

Windows (Not Implemented)

A possible implementation could use:

start /b anki.exe

where:

  • start launches a new process
  • /b runs the process in the background without creating a new window

Linux (Not Implemented)

A possible implementation could use:

subprocess.Popen(
    ["anki"],
    stdout=subprocess.DEVNULL,
    stderr=subprocess.DEVNULL,
    start_new_session=True,  # Creates a new session
)

Note: The effectiveness of background launch on Linux may vary depending on the desktop environment and window manager.

Testing Requirements

For each platform:

  1. Verify Anki launches successfully
  2. Verify the Anki window does not steal focus
  3. Verify AnkiConnect becomes available
  4. Test behavior when Anki is already running

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions