How do I open chromium full screen?

26,829

As many of chromium's command-line options are “added and removed at the whim of the developers”, man chromium-browser only documents a few “relatively stable flags.”

A developer How-to however links to this list of options, where among many others you find:

--start-fullscreen
        Specifies if the browser should start in fullscreen mode,
        like if the user had pressed F11 right after startup.

A quick test with Chromium 61.0.3163.100 reveals that this option works at least with this version:

chromium-browser --start-fullscreen
Share:
26,829

Related videos on Youtube

Rob
Author by

Rob

Updated on September 18, 2022

Comments

  • Rob
    Rob almost 2 years

    I need to open chromium full screen from the terminal.

    I have tried editing ~/.config/chromium/Preferences as described, for example in an answer to this thread: How to open Chromium in full screen kiosk mode in minimal windows manager environment

    As such:

    "window_placement": {
       "bottom": 1080,
       "left": 0,
       "maximized": true,
       "right": 1920,
       "top": 0,
       "work_area_bottom": 1080,
       "work_area_left": 0,
       "work_area_right": 1920,
       "work_area_top": 0
    }
    

    The problem is, Chromium changes the file back to its original contents! I have tried setting root to owner with sudo chown root Preferences Then running sudo chmod -R 755 Preferences. The file is then displayed as belonging to root and user can only read and execute. I start an X session as root, and chromium is started as user:

    sudo xinit -e "su user chromium-browser"
    

    and yet the browser opens with borders at the top and bottom as before. I then check the file and it now belongs to user again with rw permissions!

    How do I stop Chromium from editing the file?

  • Rob
    Rob over 6 years
    This just makes the browser start without the taskbar, but only occupying the same area as before.
  • dessert
    dessert over 6 years
    @RobCh Wait, so you want to maximize it before? Try chromium-browser --start-fullscreen --start-maximized, or flip these options.
  • Rob
    Rob over 6 years
    I would like it to take up the full extent of the X display, there is a border on the left, right and a large border on the top
  • dessert
    dessert over 6 years
    Are you talking about borders of chromium or about task bars n stuff? Does --kiosk help?
  • Rob
    Rob over 6 years
    The borders of chromium itself and kiosk has the same effect as --start-fullscreen
  • dessert
    dessert over 6 years
    @RobCh Are those borders from your window manager?
  • Rob
    Rob over 6 years
    I start the X server with sudo xinit This opens the X server full screen, running xterm in the top left hand corner. In the xterm I run su pi chromium-browser.
  • Rob
    Rob over 6 years
    The border is about 2 pixels on the left, 20 pixels at the bottom, 20 pixels at the right and about 60 pixels at the top. The border is black, and xterm is still visible in the top left hand corner, except where covered by chromium. The border is because the Preferences file tells chromium to open with a certain size window, and I can't resize the window.. Surely if I could stop chromium from writing the preferences file then this would be solved.
  • matanster
    matanster about 4 years
    This prompts the user for setting chromium as the default browser, and shows a message about how to exit full-screen mode. Scavenging the Internet for additional controls I find that this combination makes it a clean full-screen without those prompts. Maybe some of these flags are redundant to mutually specify but it goes like this: chromium-browser --start-fullscreen --start-maximized --no-default-browser-check --kiosk