A MagicMirror² module that creates clickable launcher icons to open websites in your default browser or in kiosk mode.
- Customizable icons - Use emoji, Unicode symbols, or HTML icons
- Flexible browser control - Launch browsers with custom commands and flags
- Kiosk mode support - Perfect for full-screen displays
- Configurable zoom - Set browser zoom level from 30% to 300% on launch
- Built-in home button - Floating overlay button to close browser and return to MagicMirror
- Easy styling - Built-in CSS classes for customization
- Multiple launchers - Add as many launcher instances as you need
- Fully configurable - Control button position, size, colors, and behavior
┌─────────────┐
│ 🌐 │ ← Icon (emoji/Unicode)
│ YouTube │ ← Optional label
└─────────────┘
Navigate to your MagicMirror modules directory and clone this repository:
cd ~/MagicMirror/modules
git clone https://github.com/Aws505/MMM-LaunchBrowser.gitThe home button overlay requires Python 3 and a few packages:
# Install Python dependencies
pip3 install psutil
# Make the home button executable
chmod +x ~/MagicMirror/modules/MMM-LaunchBrowser/home_button.pyNote: Node.js dependencies are built-in - no npm install needed!
Add the module to your config/config.js file:
{
module: "MMM-LaunchBrowser",
position: "top_left",
config: {
url: "https://youtube.com",
label: "YouTube",
icon: "📺",
browserCommand: "firefox --kiosk"
}
}{
module: "MMM-LaunchBrowser",
position: "top_left",
config: {
url: "https://youtube.com",
label: "YouTube",
icon: "📺"
}
},
{
module: "MMM-LaunchBrowser",
position: "top_left",
config: {
url: "https://gmail.com",
label: "Gmail",
icon: "📧"
}
},
{
module: "MMM-LaunchBrowser",
position: "top_left",
config: {
url: "https://netflix.com",
label: "Netflix",
icon: "🎬",
browserCommand: "chromium-browser --kiosk"
}
}| Option | Type | Default | Description |
|---|---|---|---|
url |
string |
"https://example.com" |
The URL to open when clicked |
label |
string |
"" |
Text label displayed below the icon |
icon |
string |
"🌐" |
Icon to display (emoji, Unicode, or HTML) |
browserCommand |
string |
"firefox --kiosk" |
Browser command with flags |
cssClass |
string |
"" |
Additional CSS class for custom styling |
fontSize |
string |
"40px" |
Size of the icon |
zoom |
number |
100 |
Browser zoom level percentage (30, 50, 67, 80, 90, 100, 110, 120, 133, 150, 170, 200, 240, 300) |
enableHomeButton |
boolean |
true |
Enable/disable the home button overlay |
Configure the floating home button that appears when the browser is open:
| Option | Type | Default | Description |
|---|---|---|---|
homeButton.position |
string |
"top-right" |
Button position: "top-right", "top-left", "bottom-right", "bottom-left" |
homeButton.size |
number |
60 |
Button size in pixels |
homeButton.margin |
number |
10 |
Margin from screen edge in pixels |
homeButton.bgColor |
string |
"#222222" |
Background color of button container |
homeButton.buttonBg |
string |
"#444444" |
Button background color |
homeButton.buttonFg |
string |
"white" |
Button foreground/text color |
homeButton.buttonText |
string |
"🏠" |
Button text/emoji |
homeButton.fontSize |
number |
24 |
Button font size |
Firefox (Kiosk Mode):
browserCommand: "firefox --kiosk"Chromium (Kiosk Mode):
browserCommand: "chromium-browser --kiosk"Default Browser (Normal Window):
browserCommand: "xdg-open"Custom Browser with Multiple Flags:
browserCommand: "firefox --kiosk --private-window"The home button is a floating overlay that appears when the browser is running. It provides a convenient way to close the browser and return to MagicMirror.
- When you click a launcher, the browser opens
- The home button automatically appears as a floating overlay
- Click the home button to close the browser and return to MagicMirror
- The button monitors the browser process and hides when the browser is closed
{
module: "MMM-LaunchBrowser",
position: "top_left",
config: {
url: "https://youtube.com",
label: "YouTube",
icon: "📺",
browserCommand: "firefox --kiosk",
enableHomeButton: true // Enable home button (default)
}
}{
module: "MMM-LaunchBrowser",
position: "top_left",
config: {
url: "https://youtube.com",
icon: "📺",
enableHomeButton: false // Disable home button
}
}{
module: "MMM-LaunchBrowser",
position: "top_left",
config: {
url: "https://youtube.com",
icon: "📺",
homeButton: {
position: "bottom-right", // Position in bottom-right corner
size: 80, // Larger button
margin: 20 // More margin from edge
}
}
}{
module: "MMM-LaunchBrowser",
position: "top_left",
config: {
url: "https://youtube.com",
icon: "📺",
homeButton: {
position: "top-right",
size: 70,
bgColor: "#1a1a1a", // Dark background
buttonBg: "#ff4444", // Red button
buttonFg: "white", // White text
buttonText: "✕", // X instead of home icon
fontSize: 28 // Larger font
}
}
}{
module: "MMM-LaunchBrowser",
position: "top_left",
config: {
url: "https://youtube.com",
icon: "📺",
homeButton: {
buttonText: "⬅" // Left arrow
// or: "↩", "⏎", "✕", "⨯", "←", "🔙"
}
}
}The zoom feature allows you to set the browser zoom level when launching. The zoom is applied immediately after the browser window opens using keyboard shortcuts (Ctrl+Plus/Minus).
- The browser launches with your specified URL
- After a brief delay (2 seconds), the zoom is automatically applied
- The module uses xdotool to send keyboard shortcuts to the browser
- Works with Firefox, Chromium, Chrome, Brave, Opera, and Vivaldi
The following zoom levels are supported (standard browser zoom steps):
| Zoom Level | Description |
|---|---|
| 30% | Minimum zoom (very small) |
| 50% | Half size |
| 67% | Two-thirds size |
| 80% | Slightly smaller |
| 90% | Slightly smaller |
| 100% | Default (no zoom) |
| 110% | Slightly larger |
| 120% | Larger |
| 133% | Significantly larger |
| 150% | 1.5x size |
| 170% | Large |
| 200% | Double size |
| 240% | Very large |
| 300% | Maximum zoom (3x size) |
{
module: "MMM-LaunchBrowser",
position: "top_left",
config: {
url: "https://youtube.com",
label: "YouTube",
icon: "📺",
browserCommand: "firefox --kiosk",
zoom: 150 // Launch at 150% zoom
}
}Use larger zoom levels for better readability:
{
module: "MMM-LaunchBrowser",
position: "top_left",
config: {
url: "https://news.ycombinator.com",
label: "News",
icon: "📰",
zoom: 200 // Double size for easier reading
}
}Some websites have very small text by default:
{
module: "MMM-LaunchBrowser",
position: "middle_center",
config: {
url: "https://github.com",
label: "GitHub",
icon: "💻",
browserCommand: "firefox --kiosk",
zoom: 120 // Slightly larger for comfort
}
}Use smaller zoom for dashboards to see more content:
{
module: "MMM-LaunchBrowser",
position: "bottom_left",
config: {
url: "http://homeassistant.local:8123",
label: "Home Assistant",
icon: "🏡",
browserCommand: "firefox --kiosk",
zoom: 80 // Zoom out to see more dashboard widgets
}
}// YouTube - Larger for viewing from distance
{
module: "MMM-LaunchBrowser",
position: "top_left",
config: {
url: "https://youtube.com",
icon: "📺",
zoom: 150
}
},
// Gmail - Normal size
{
module: "MMM-LaunchBrowser",
position: "top_left",
config: {
url: "https://gmail.com",
icon: "📧",
zoom: 100
}
},
// Analytics Dashboard - Smaller to see more data
{
module: "MMM-LaunchBrowser",
position: "top_left",
config: {
url: "https://analytics.example.com",
icon: "📊",
zoom: 67
}
}Zoom doesn't apply:
- Ensure
xdotoolis installed:sudo apt-get install xdotool - Check MagicMirror logs:
pm2 logs MagicMirror | grep zoom - Try increasing the delay in node_helper.js (default is 2000ms)
Wrong zoom level applied:
- Verify you're using a supported zoom level (see table above)
- Unsupported zoom values will default to 100%
Zoom works on some browsers but not others:
- Check the browser window class name:
xdotool search --class firefox - Some browsers may use different window class names
xdotoolmust be installed on your system- Works in X11 environments (Linux desktop)
- Browser must support standard zoom keyboard shortcuts (Ctrl+Plus/Minus/0)
Install xdotool:
sudo apt-get install xdotool// Top-right corner (default)
homeButton: { position: "top-right" }
// Top-left corner
homeButton: { position: "top-left" }
// Bottom-right corner
homeButton: { position: "bottom-right" }
// Bottom-left corner
homeButton: { position: "bottom-left" }- Python 3 installed
psutilPython packagehome_button.pymust be executable
Installation:
pip3 install psutil
chmod +x ~/MagicMirror/modules/MMM-LaunchBrowser/home_button.pyTest the home button manually:
# Start the home button
python3 ~/MagicMirror/modules/MMM-LaunchBrowser/home_button.py
# Open Firefox
firefox --kiosk https://youtube.com
# The home button should appear. Click it to close Firefox.You can run the home button script manually with custom options:
python3 home_button.py --browser firefox \
--position bottom-right \
--size 80 \
--button-bg "#ff0000" \
--button-text "✕"Available command-line options:
--browser- Browser process name (default: firefox)--position- Button position (default: top-right)--size- Button size in pixels (default: 60)--margin- Margin from edge in pixels (default: 10)--bg-color- Background color (default: #222222)--button-bg- Button background (default: #444444)--button-fg- Button foreground (default: white)--button-text- Button text (default: 🏠)--font-size- Font size (default: 24)
Create or edit ~/MagicMirror/css/custom.css:
/* Change icon size */
.mmm-launchbrowser-icon {
font-size: 60px;
}
/* Style the label */
.mmm-launchbrowser-label {
color: #fff;
font-weight: bold;
margin-top: 5px;
}
/* Add hover effect */
.mmm-launchbrowser:hover {
opacity: 0.7;
transform: scale(1.1);
transition: all 0.2s ease;
}
/* Style specific launcher using cssClass */
.youtube-launcher {
color: #ff0000;
}
.gmail-launcher {
color: #ea4335;
}{
module: "MMM-LaunchBrowser",
position: "top_left",
config: {
url: "https://youtube.com",
cssClass: "youtube-launcher",
icon: "📺",
label: "YouTube"
}
}{
module: "MMM-LaunchBrowser",
position: "middle_center",
config: {
url: "https://music.youtube.com",
icon: "🎵",
label: "Music",
fontSize: "50px"
}
},
{
module: "MMM-LaunchBrowser",
position: "middle_center",
config: {
url: "https://calendar.google.com",
icon: "📅",
label: "Calendar",
fontSize: "50px"
}
},
{
module: "MMM-LaunchBrowser",
position: "middle_center",
config: {
url: "https://photos.google.com",
icon: "📷",
label: "Photos",
fontSize: "50px"
}
}{
module: "MMM-LaunchBrowser",
position: "top_left",
config: {
url: "https://home-assistant.io",
icon: "⌂", // Unicode house symbol
label: "Home",
fontSize: "45px"
}
}First, include Font Awesome in your MagicMirror (if not already included):
{
module: "MMM-LaunchBrowser",
position: "top_left",
config: {
url: "https://github.com",
icon: '<i class="fab fa-github"></i>',
label: "GitHub",
fontSize: "40px"
}
}-
Check that the browser is installed:
firefox --version # or chromium-browser --version -
Check MagicMirror logs:
pm2 logs MagicMirror
-
Test the command manually:
firefox --kiosk https://youtube.com
- Verify the URL in your config includes
https://orhttp:// - Check for typos in the URL
- Ensure your font supports the emoji/Unicode character
- Try a different emoji or use HTML icons instead
- Check browser console for errors (F12)
- Ensure you're clicking directly on the icon/label area
- Check browser console for JavaScript errors
- Verify the module is properly loaded in config.js
-
Check Python dependencies:
python3 -c "import psutil; print('psutil installed')" -
Check if script is executable:
ls -l ~/MagicMirror/modules/MMM-LaunchBrowser/home_button.py # Should show: -rwxr-xr-x (executable)
-
Check MagicMirror logs:
pm2 logs MagicMirror | grep "home button"
-
Test manually:
python3 ~/MagicMirror/modules/MMM-LaunchBrowser/home_button.py firefox --kiosk https://youtube.com # Button should appear
-
Check if already running:
pgrep -f home_button.py # If running, kill it: pkill -f home_button.py
-
Check browser process name:
ps aux | grep firefox # Process name should match config
-
Verify configuration:
- Ensure
browserCommandmatches the actual browser - For Chromium: use
browserCommand: "chromium-browser --kiosk" - The script extracts browser name from the command
- Ensure
- Check
homeButton.positionin config - Valid values:
"top-right","top-left","bottom-right","bottom-left" - Restart MagicMirror after config changes
# Install psutil
pip3 install psutil
# Or use pip (without 3)
pip install psutil
# On some systems, use apt
sudo apt-get install python3-psutil- Smart Home Control Panel - Launch Home Assistant, Node-RED, etc.
- Media Center - Quick access to YouTube, Netflix, Spotify
- Productivity Dashboard - Gmail, Calendar, Todoist shortcuts
- Kiosk Display - Full-screen web apps for public displays
- Family Hub - Easy access to family-friendly websites
MIT License
Copyright (c) 2025
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Contributions are welcome! Please feel free to submit a Pull Request.
- Added configurable zoom feature (30% to 300%)
- Support for multiple browsers (Firefox, Chromium, Chrome, Brave, Opera, Vivaldi)
- Automatic browser window detection for zoom application
- Enhanced documentation with zoom examples
- Initial release
- Basic browser launching functionality
- Customizable icons and labels
- Kiosk mode support
Created for the MagicMirror² platform by MagicMirror² Community