12

I am looking for a way to launch Firefox from a script or command line without any window frame, address bar, or tabs. I'd like to be able to launch this at a given window size and position on screen.

Illustration:

firefox browser

I'd like to only be able to see the section that is comprised of the red box, and the area inside of it.

Using AutoHotKey in Windows, I've been able to launch FireFox at a given window size / position. However, If I try to launch Firefox in "chromeless" mode, and try to resize the window with AHK, I end up with a 0 px by 0 px browser window.

My AutoHotKey Script:

Run, C:\Program Files\Mozilla Firefox\firefox.exe -chrome http://www.google.com/
WinWait, Mozilla Firefox
WinMove,,,100,100,400,300

I've found related questions, but I've not found a solution:

How can I launch a browser with no window frame or tabs

How can I run Firefox with no tab bar, no top bar, no address bar

Sparky1
  • 221

4 Answers4

2

For that, there once was an addon called "Open Chromeless" – but it was removed from AMO. A work-around is described here; I've just checked it and it seems to work. Partly. Cannot get rid of the addressbar, and there's a frame around the window. If you can live with that:

  1. Press Shift-F4 to open the Scratchpad
  2. In the editor, enter

    window.open("https://superuser.com/", "_blank","width=800,height=600,resizable");
    

    (replace the URL with the one you want to use)

  3. Click "Run" on the scratchpad toolbar

Now a new "chrome-less" window should open with the page specified. Resize it to your needs:

screenshot
Screenshot of the "chromeless window" (click to enlarge)

Right-click next to the addressbar, as shown in the screenshot, lets you disable the address bar as well (untick "Navigation toolbar") – but note that would remove it from your main window as well.

I'm aware this does not fully match your request (it's not launching from the command line, and leaves at least a frame around the window), but it comes as close as I could get to it.

Izzy
  • 3,775
2

Wanted to leave this here, it seems to be a barely-documented feature of Firefox called "Single Site Browser":

https://support.mozilla.org/en-US/questions/1292666

Apparently, Firefox disallowed hiding of the location bar unless you launch Firefox with this mode. This SSB mode does still show the window frame (caption with window title, maximise, close buttons, etc.), but all other window chrome is gone.

Now I'm looking for a way to use add-ons in this mode... :(

Ra_Shoe
  • 39
  • 3
0

When I wanted to do this full screen I did something like this:

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

But I had to install an add-on to get rid of all the extra decorations.

"full fullscreen" if I remember the name correctly

For smaller geometries, I don't know

infixed
  • 819
0
Minimal Browser Chrome

The undermentioned ECMAScript:

  1. Script File
    #!/usr/bin/env xdg-open
    window.open(location.href, "detab", "toolbar=0"); window.close()
    
  2. Bookmark "URL"

    javascript:window.open(location.href, "detab", "toolbar=0"); window.close()

...renders a separate browser window without most standard chrome, especially the tab strip:

  1. firefox-135.0-1.fc41.x86_64

    Screenshot

  2. google-chrome-canary-135.0.7013.0-1.x86_64

    Screenshot

Notably:

  1. Despite the address bar remaining visible, the URI is directly unmodifiable - all navigation must be performed within the GUI.

  2. It doesn't function on any internal pages (like about:profiles). This includes rendered PDFs. [1]

To hide the address bar, the undermentioned may work:

#main-window[chromehidden*="toolbar"] #nav-bar {
  visibility: collapse;
}
Minimal Window Decoration

Removing window decoration as a user is a more complex task when the application does not hook into the native platform's APIs programmatically. I suggest that you read the "When it can" section of superuser.com/revisions/1863156/8, which I wrote specifically for situations like this. It focuses upon forcing it to be displayed, but every method is applicable in the reverse too.

As an example, for KWin on X11:

[Settings for firefox org.mozilla.firefox]
Description=Settings for firefox org.mozilla.firefox
noborder=true
noborderrule=2
wmclass=firefox org.mozilla.firefox
wmclasscomplete=true
wmclassmatch=1

Summarily, your best bet is to utilize a customisable window manager (like KWin) on an OS which supports a choice of window managers.

Otherwise, for , you have no choice except to modify the source and recompile, unless a useful answer appears at q/1262225.

Alternatively:

  1. You can always go fullscreen, or:

  2. Fork Firefox to enable CSD, and disable all chrome afterward.

    bugzilla.mozilla.org/show_bug.cgi?id=1701123 discusses some of the work necessary to do this, although you might as well just modify the CSS instead, as aforementioned.