Skip to content

Instantly share code, notes, and snippets.

@SkyyySi
Created February 22, 2025 13:43
Show Gist options
  • Save SkyyySi/03ed5beb270676c229b72beac0a9d070 to your computer and use it in GitHub Desktop.
Save SkyyySi/03ed5beb270676c229b72beac0a9d070 to your computer and use it in GitHub Desktop.

UI-less Firefox

This is a short guide on how to set up a Firefox profile with no UI (no tabs, no address-bar, no bookmarks, etc.). Note that it is written for and only tested on Arch Linux. You'll probably need to perform different steps on Windows.

  1. Create a new Firefox profile
    1. Run this shell command:
      firefox --no-remote --profilemanager
    2. In the Firefox - Choose User Profile-dialog, click Create Profile...
    3. In the Create Profile Wizard-dialog, click Next
    4. Type bare-ui as the profile name
    5. Click Finish
  2. Launch the profile
    1. In the Firefox - Choose User Profile-dialog, select the newly created bare-ui profile
    2. Un-select the Work offline and Use the selected profile without asking at startup options
    3. Click Start Firefox
    4. Complete the standard first-run experience
  3. Go to about:config and apply the following settings:
    Key Type Value
    toolkit.legacyUserProfileCustomizations.stylesheets Boolean true
    browser.tabs.inTitlebar Number 0
  4. Go to about:support and look for a column named Profile Directory and click the Open Directory butten next to it
  5. Close Firefox
  6. Create a new sub-directory called chrome and open it
  7. Create a new file called userChrome.css and paste the following CSS-code into it:
#nav-bar, #TabsToolbar, #PersonalToolbar, #toolbar-menubar {
    visibility: collapse !important;
}

#sidebar-header {
    display: none !important;
}

After this, you should be able to start a UI-less Firefox instance by simply running this shell command:

firefox --no-remote -P 'bare-ui' 'https://example.com'

A final note: You can call the profile anything you want, just replace any occurance of bare-ui in this document with your desired profile name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment