27

How do I start Firefox 4 in fullscreen mode (the one activated by pressing F11)?

11 Answers 11

32

on Linux (works on debian jessie):

firefox -url http://superuser.com &
xdotool search --sync --onlyvisible --class "Firefox" windowactivate key F11

firefox line - starts firefox with url and detaches from terminal ("&"). "&" is required, otherwise following script won't execute while firefox exits.

xdotool line searches window with partial name "Firefox" (partial name of running app window can be determinated by xwininfo), activates firefox window, sends key F11 to Firefox.

This code is bit better than YumYumYum's solution (sending key only when firefox actualy started. sleep is not really usable approach, cause can miss firefox on slow/overloaded computers or too late on fast computers)

sorry for late answer (missed 6 years)

4
  • Works like a charm on Ubuntu 16 Sep 12, 2017 at 6:39
  • 1
    If you don't want to fork Firefox off you can simply invert the order of these commands and xdotool will still dutifully wait for Firefox to show up before it presses F11.
    – Liz
    Jun 22, 2019 at 5:18
  • @Ekevoo can you give an example?
    – eekfonky
    Sep 9, 2019 at 8:25
  • @eekfonky xdotool $PARAMS & firefox -url http://superuser.com
    – Liz
    Sep 20, 2019 at 19:13
7

Many useful plugins mentioned in other answers, but not many that work on Firefox 57 (Quantum). If you're stuck, try ForceFull. For bonus points, it goes fullscreen instantly on startup by default. No config necessary to get that behavior.

1
  • That combined with --kiosk did the job!
    – Fusseldieb
    Jan 12 at 14:41
6

Create a new profile by running:

firefox -ProfileManager

Run firefox with the new profile, move to full screen using F11 and then close it by alt + f4

Each time you will use this profile it will be opened in full screen.

7
  • 1
    Do not forget the "-no-remote" option if you already have a running instance of Firefox: "firefox -ProfileManager -no-remote"
    – Wilbert
    Nov 15, 2012 at 8:31
  • After making the profile and closing Firefox in full screen mode you can use "firefox -P 'Session Name' -no-remote" to start Firefox in full screen mode.
    – Wilbert
    Nov 15, 2012 at 8:37
  • 3
    Does not work for me (in 2016) Feb 4, 2016 at 11:37
  • 3
    Does not work on Firefox 55.0.2 on Arch Linux Aug 25, 2017 at 12:06
  • 4
    Doesn't work at Firefox 56.0.2 (in 2017)
    – Yohanes AI
    Nov 10, 2017 at 10:28
5

Command Line

Firefox command line option -fullscreen didn't work for me:

"firefox.exe" -url http://superuser.com -fullscreen

Extension

But the use of R-kiosk 0.9.0 extension by Kimmo Heinaaro works like a charm.

Real Kiosk is a Firefox extension that defaults to full screen, disables all menus, toolbars, key commands and right button menus. Alt+Home still takes you home.

2
  • 3
    Does not work anymore (in 2016) Feb 4, 2016 at 11:36
  • @KarelBílek just installed it and it works! Feb 16, 2016 at 10:48
4

Also you can try to use the following command:

firefox -kiosk 'http://your.url'

https://support.mozilla.org/en-US/kb/firefox-enterprise-kiosk-mode

1

If you're using firefox 3 you can use this extension. It allows fullscreen on start. Tons of others do as well, see here.

I'm not aware of a command-line switch though.

1

Full-screen me dad!

$ cat /var/tmp/firefoxfullscreen.sh 
#!/bin/bash
export DISPLAY=:0.0 # eye
cat > /var/tmp/index.html << \EOF
<html>
<head><meta http-equiv="refresh" content="3" />
<style>
html { 
  background: url("http://192.168.0.142:7007/video/vnc.jpeg") no-repeat center center fixed; 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}
</style>
</head>
<body>
</body>
</html>
EOF

ps aux | grep firefox | awk '{print $2}' | xargs kill -9; # kill me
firefox "/var/tmp/index.html" & # leave me alone
sleep 5 # hehehe
xdotool key F11 # hit full screen
1

You may try R-KIOSK with work really good.

3
  • 2
    I would give you +1 if you would explain a little more if you explain a little more what it is, what it does and what your personal experience is.
    – MadMike
    Sep 14, 2015 at 12:49
  • 2
    I agree with @MadMike. +1 after a nice explanation :-)
    – AlexGreg
    Sep 14, 2015 at 13:01
  • 2
    This extension is not available anymore.
    – Linkid
    Apr 7, 2019 at 14:39
1

I used the useful solution of @Zero in Raspberry PI 3b.
It works well, but sometimes the Firefox is not "ready" to receive the F11 keypress event.

Then I did a little change: a delay before Window activation and F11 key press:

firefox -url http://superuser.com &
xdotool search --sync --onlyvisible --class "Firefox" windowactivate key F11
1
  • 1
    Where's the delay? This is an exact copy of Zero's answer Apr 30, 2022 at 22:04
1

I cannot install xdotools, and for me, starting firefox in kiosk mode alone did not open it in fullscreen and still showed bars and the list of open tabs.

firefox -kiosk -private-window [URL]

does the trick for me, it shows the website I enter in fullscreen mode. Even though I was starting firefox in kiosk mode, I sometimes received a firefox popup on the things that were updated (new colortheme etc). Launching firefox with the flag --new-window helped me avoid these messages:

firefox -kiosk -private-window [URL] --new-window

Tested with Mozilla Firefox 103.0.1.

0

After scouring the web for days, I found the Auto Fullscreen plugin.

It's just a simple script which does what it says.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .