How can I make Chromium start full-screen under X?
Ok, with help from this thread I got it working. Although that poster said it didn't work, I edited .config/chromium/Default/Preferences
and explicitly set the window size:
Before
"window_placement":
{
"bottom":1060,
"docked":false,
"left":10,
"maximized":true,
"right":950,
"top":10
// ...
After
"window_placement":
{
"bottom":1080,
"docked":false,
"left":0,
"maximized":true,
"right":1920,
"top":0
// ...
I wondered if maybe this had been set badly by the first load of the app not being fullscreen, but I tried deleting ~/.config
and then loading it again, but it just recreated it with the left half of the screen. I guess I'll have to script loading Chromium, killing it, then rewriting that part of the file in my setup script! ;(
even simpler that tweaking ~/.config/chromium/Default/Preferences
, just use --window-position=0,0
flag during chromium startup.
see Chromium Command Line Switches for full list of available chromium switches
Assuming your monitor is smaller then 7000px
chromium-browser --window-size=7000,7000 --start-fullscreen
This command will detect your screen height / width
Now you also can use it in a bash script:
/home/pi/full.sh
#!/bin/bash/
chromium-browser --window-size=7000,7000 --start-fullscreen
and then run
startx /home/pi/full.sh
It will launch a fullscreen browser, from a non-gui terminal :D.
NOT NEEDED,
but for fun I tested a bash code to get the screen resolution, but you don't need it..
#!/bin/bash
CMD="$(fbset -s | awk '$1 == "geometry" { print $2" "$3 }')"
echo "$CMD"