diff --git a/docs/setup.md b/docs/setup.md index 25890126..a2bcc2bc 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -24,7 +24,7 @@ For more detailed Windows installation and troubleshooting, see [Windows Install ### 2. Start -Run the following command from your terminal to start the Khoj backend and open Khoj in your browser. +Run the following command in your terminal to start the Khoj backend and open the Khoj native GUI ```shell khoj --gui diff --git a/src/khoj/main.py b/src/khoj/main.py index 89623649..a1780e1b 100644 --- a/src/khoj/main.py +++ b/src/khoj/main.py @@ -12,7 +12,6 @@ import logging import threading import warnings from platform import system -import webbrowser # Ignore non-actionable warnings warnings.filterwarnings("ignore", message=r"snapshot_download.py has been made private", category=FutureWarning) @@ -100,15 +99,10 @@ def run(): server = ServerThread(start_server_func=lambda: start_server(app, host=args.host, port=args.port)) logger.info(f"🌗 Khoj is running at {url}") - try: - startup_url = url if args.config else f"{url}/config" - webbrowser.open(startup_url) - except: - logger.warning(f"🚧 Unable to open browser. Please open {url} manually to configure or use Khoj.") - # Show Main Window on First Run Experience or if on Linux - if args.config is None or system() not in ["Windows", "Darwin"]: - main_window.show() + # Show config window on first run and main window otherwise + startup_window = main_window.show_page() if args.config else main_window.show_page("config") + startup_window() # Setup Signal Handlers signal.signal(signal.SIGINT, sigint_handler)