How to Stop Ubuntu Linux from Automatically Expanding the Dock

The “Panel Mode” Problem

By default, Ubuntu Linux (using the GNOME desktop environment) features a dock on the left side of the screen. In its standard configuration, this dock operates in “Panel Mode.” This means the dark background of the dock stretches from the very top of the screen to the very bottom, regardless of how many app icons are actually pinned to it. If you only use three or four applications, having a massive, empty black bar consuming the entire left edge of your monitor is an inefficient use of screen real estate. Many users prefer a floating dock that only expands exactly as much as necessary to contain the active icons, similar to the macOS Dock.

How to Disable Panel Mode in Ubuntu Settings

You can easily shrink the dock so that it only spans the length of your app icons, centering them dynamically on the edge of the screen.

1. Click the network/battery icons in the top-right corner of the screen to open the system menu.

2. Click the Settings (gear) icon.

3. In the left-hand navigation sidebar, click on Appearance (in older versions of Ubuntu) or Ubuntu Desktop (in newer versions like 24.04).

4. Locate the section titled Dock.

5. Look for the toggle switch labelled Panel mode.

6. Click the toggle switch to turn it Off.

The dock will instantly shrink, abandoning the edges of the screen and forming a floating pill shape that perfectly hugs your application icons. As you open new apps, the dock will gracefully expand to accommodate them, and shrink back down when they are closed.

Advanced Customization with dconf Editor

If you want even more precise control over how the dock expands—for example, keeping it in panel mode but limiting its maximum height—you can use the advanced configuration tool.

Open your terminal and install the tool by typing: sudo apt install dconf-editor. Once installed, open dconf Editor from your app grid. Navigate through the tree to /org/gnome/shell/extensions/dash-to-dock/. Here, you will find dozens of hidden settings. Look for extend-height (which is the backend toggle for Panel Mode) and height-fraction, which allows you to manually set the maximum percentage of the screen the dock is allowed to consume. Proceed with caution, as changing the wrong value in dconf can cause graphical glitches.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.