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

0
1
Asked By MellowPine42 On

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?

3 Answers

Answered By QuietMarble18 On

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.

Answered By CopperLark7 On

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.

Answered By NorthwindEcho5 On

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.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.