How can i set chrome to use system titlebars and border in preferences file?

Learn how can i set chrome to use system titlebars and border in preferences file? with practical examples, diagrams, and best practices. Covers google-chrome, chromium development techniques with ...

Enabling System Title Bars and Borders in Chrome on Linux

Hero image for How can i set chrome to use system titlebars and border in preferences file?

Learn how to configure Google Chrome to use native system title bars and window borders, enhancing integration with your Linux desktop environment.

Google Chrome, by default, uses its own custom title bar and window borders, which can sometimes feel out of place on Linux desktop environments. For users who prefer a more integrated look and feel, Chrome offers an option to utilize the system's native title bar and borders. This not only provides a consistent aesthetic with other applications but can also improve usability by leveraging familiar window controls and themes.

Understanding Chrome's Window Management

Chrome's default behavior of drawing its own title bar is part of its cross-platform design, aiming for a consistent user experience regardless of the operating system. However, on Linux, this often means sacrificing the visual and functional integration with the desktop environment's window manager. Native title bars typically offer better theme integration, consistent button placement (minimize, maximize, close), and sometimes even additional features provided by the window manager, such as tiling or advanced window snapping.

flowchart TD
    A[Chrome Default] --> B{Custom Title Bar}
    B --> C[Inconsistent Look]
    B --> D[Limited WM Features]
    A --> E[User Preference]
    E --> F{Enable System Title Bar}
    F --> G[Native Title Bar]
    G --> H[Consistent Look]
    G --> I[Full WM Features]

Comparison of Chrome's default vs. system title bar behavior

Configuring Chrome via Settings

The most straightforward way to enable system title bars is through Chrome's built-in settings. This method is generally preferred as it's officially supported and doesn't involve manual file editing. The setting is usually found under the 'Appearance' section.

1. Open Chrome Settings

Launch Google Chrome and click on the three-dot menu icon (⋮) in the top-right corner. From the dropdown menu, select 'Settings'.

2. Navigate to Appearance

In the Settings tab, use the left-hand navigation pane to find and click on 'Appearance'.

3. Toggle System Title Bar

Under the 'Appearance' section, locate the option 'Use system title bar and borders'. Toggle this option to the 'On' position. Chrome should immediately update its window appearance.

Advanced Configuration: Editing the Preferences File

While the GUI setting is the recommended approach, it's technically possible to achieve the same by directly modifying Chrome's Preferences file. This is generally not advised unless you are troubleshooting or automating configurations, as incorrect edits can corrupt your Chrome profile. The relevant setting is "use_system_title_bar": true within the browser section of the Preferences file.

The Preferences file is a JSON file located within your Chrome user profile directory. On Linux, this is typically found at ~/.config/google-chrome/Default/Preferences (for the default profile) or ~/.config/chromium/Default/Preferences for Chromium.

{
  "browser": {
    "window_placement": {
      "bottom": 1080,
      "left": 0,
      "maximized": false,
      "right": 1920,
      "top": 0,
      "work_area_bottom": 1080,
      "work_area_left": 0,
      "work_area_right": 1920,
      "work_area_top": 0
    },
    "use_system_title_bar": true
  },
  "extensions": {
    "last_update_check": "13350000000000000"
  }
}

Excerpt from a Chrome Preferences file showing the 'use_system_title_bar' setting