

If logged as root, we must add the –no-sandbox flag. We can inspect the other available command-line parameters with firefox –help.


:-$ firefox -headless -screenshot myscreenshot.png -window-size 360 #!!! Error: (msgtype=0x390078,name=PContent::Msg_DestroyBrowsingContextGroup) Closed channel: cannot send/recv :-$ firefox -headless -screenshot myscreenshot.png -window-size 360,640 We can also specify only the window’s width to get the entire page: $ firefox -headless -screenshot myscreenshot.png -window-size 360 įirefox is quite verbose, but it does save screenshots correctly even if we get messages like these: :-$ firefox -headless -screenshot myscreenshot.png Let’s get only the visible portion of the screen: $ firefox -headless -screenshot myscreenshot.png -window-size 360,640
