Automate your browser startup on Linux with configurable tabs, health checks, and captive portal handling.
- 🚀 Auto-launch at boot - Opens your browser with organized tabs automatically
- 🏥 Health checks - Skip tabs for services that are down
- 📶 Captive portal support - Auto-accept WiFi login pages
- 🔧 Interactive setup - Easy configuration wizard
- 🌐 Multi-browser support - Works with Brave, Firefox, Chrome, Chromium
- 📝 YAML configuration - Simple file editing for tab management
- ⚙️ systemd integration - Proper service management
git clone https://github.com/yourusername/browser-launch.git
cd browser-launch
chmod +x browser-launch.py./browser-launch.pyThe setup wizard will:
- Detect installed browsers
- Configure captive portal (if needed)
- Set up your tabs and windows
- Install systemd service (optional)
Your browser will now launch automatically at boot with your configured tabs.
The configuration file is stored at ~/Documents/Configs/browser-launch.yaml
# Captive portal settings (optional)
captive_portals:
- ssid: "Corporate WiFi"
url: "https://login.corporate.com/"
accept_button_selector: 'input[value="Accept"]'
max_retries: 3
retry_delay: 2
- ssid: "Starbucks WiFi"
url: "https://portal.starbucks.com/"
accept_button_selector: 'button#accept'
max_retries: 3
retry_delay: 2
# Browser windows
windows:
# Development tools
dev:
delay: 0
health_check: true
tabs:
- name: "GitHub"
url: "https://github.com/"
- name: "Local API"
url: "http://localhost:3000"
- name: "Documentation"
url: "http://localhost:8080/docs"
# Monitoring
monitoring:
delay: 4
health_check: true
tabs:
- name: "Grafana"
url: "http://192.168.1.10:3000"
- name: "Prometheus"
url: "http://192.168.1.10:9090"
# General
general:
delay: 8
health_check: false
tabs:
- name: "Email"
url: "https://mail.google.com"
- name: "Calendar"
url: "https://calendar.google.com"
# General settings
settings:
wait_before_start: 20 # Wait for desktop environment
health_check_timeout: 3 # Timeout for service checks
log_file: "/var/log/browser-launch/startup.log"
brave_path: "/usr/bin/brave-browser"./browser-launch.py./browser-launch.py --setup./browser-launch.py --add-portal./browser-launch.py --install./browser-launch.py --uninstall./browser-launch.py --runsystemctl --user status browser-launchsystemctl --user disable browser-launchsystemctl --user enable browser-launchjournalctl --user -u browser-launch
# or
cat ~/.local/share/browser-launch/startup.logEdit ~/Documents/Coding/Configs/browser-launch.yaml and add or remove tab entries.
windows:
my_new_window:
delay: 5
health_check: true
tabs:
- name: "Example Site"
url: "https://example.com"windows:
dev:
tabs:
- name: "New Service"
url: "http://localhost:5000"Changes take effect on next boot (or next manual run).
The script supports multiple captive portals for different WiFi networks.
The setup wizard allows you to add one or more captive portals. You can add portals for all the WiFi networks you regularly use (work, coffee shops, home guest network, etc.).
When you connect to a new WiFi network with a captive portal:
./browser-launch.py --add-portalThis will:
- Keep your existing configuration
- Ask for the new portal details
- Add it to your config file
For each portal, you need:
- WiFi network name (SSID) - Exact name of the network
- Login page URL - The captive portal address
- Accept button selector - CSS selector for the accept button (default usually works)
The script will automatically accept the terms page before opening your tabs.
- Open the captive portal page in your browser
- Right-click the "Accept" button → Inspect
- Look for the button's HTML, e.g.,
<input type="submit" value="Accept"> - The selector is
input[value="Accept"]
When enabled for a window, the script pings each URL before opening it. If a service is down, that tab is skipped.
This is useful for:
- Local development servers that may not be running
- Home lab services that might be offline
- Network monitoring tools
Public HTTPS sites (like GitHub, Gmail) skip health checks automatically.
The script auto-installs required Python packages:
pyyaml- Configuration file handlingrequests- HTTP requests and health checksplaywright- (Optional) Captive portal automation
-
Check if service is enabled:
systemctl --user is-enabled browser-launch
-
Check service logs:
journalctl --user -u browser-launch -n 50
-
Verify config file exists:
ls -la ~/Documents/Coding/Configs/browser-launch.yaml
Run the setup wizard again:
./browser-launch.py --setup-
Check if health checks are failing:
cat ~/.local/share/browser-launch/startup.log -
Temporarily disable health checks in config:
windows: my_window: health_check: false
-
Verify Playwright is installed:
python3 -m playwright --version
-
Check the button selector is correct
-
Increase retry attempts in config:
captive_portal: max_retries: 5
The script will automatically fallback to ~/.local/share/brave-bootup/startup.log if it can't write to /var/log/.
Open monitoring tools and management interfaces:
- Home Assistant
- Proxmox
- Pi-hole
- pfSense
- Grafana
Launch your development environment:
- Local dev server
- API documentation
- Database admin panel
- GitHub
- Slack
Entertainment tabs:
- YouTube
- Jellyfin/Plex
- Streaming services
Market monitoring:
- Trading platforms
- News sites
- Portfolio trackers
- Market data
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - see LICENSE file for details
- 🐛 Report bugs: GitHub Issues
- 💡 Feature requests: GitHub Discussions
Created by [Your Name]
Inspired by the need to automate repetitive browser setup tasks on Linux systems.