How can I launch a browser in full-screen kiosk mode after login?

August 4, 2026 3 answers
Asked by MellowPine42
I'm building a minimal Arch Linux system intended to function as a browser-only OS, installed on an SSD. I want the browser to launch automatically after the user logs in and open in full-screen or kiosk mode. For laptops, I'd also like it to return to that state when the lid is opened, while desktops should do it during startup. I'm still fairly new to Bash, although I'm more comfortable with Python. What's the simplest and most reliable way to set this up?

Answers

NorthwindEcho5
If the browser does not reliably stay maximized, tools such as devilspie2 can apply window rules after it opens. On X11, you can also inspect the display dimensions with `xrandr` and pass an appropriate window geometry to the browser, although the exact command-line options vary by browser. On Wayland, X11 utilities such as `xrandr` generally wonโ€™t apply, so use the compositor or window managerโ€™s configuration instead.
Reply to this answer
CopperLark7
The feature youโ€™re looking for is usually called kiosk mode. For example, Firefox can be launched with its Linux kiosk option: `firefox --kiosk https://example.com`. Put that command in your desktop sessionโ€™s autostart configuration or in a user service that starts after login. The exact setup depends on whether youโ€™re using X11 or Wayland.

MellowPine42: That makes senseโ€”kiosk mode is the term I was missing. Iโ€™ll check how autostart works with the display system I choose.

Reply to this answer
QuietMarble18
You may not need a Bash script at all. Run a lightweight window manager such as bspwm, configure it to start automatically, and have its startup file launch the browser. If the system has no other applications or panels available, the browser effectively becomes the entire interface. This is often simpler and more reliable than manually calculating screen dimensions.

AmberQuill63: Iโ€™ve used a similar setup for a simple public-access computer, and keeping the environment minimal made it much easier to maintain.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions