Categories: Ubuntu

Ubuntu 20.04 Change Desktop Icon Size

If the icons on your Ubuntu desktop have unexpectedly become excessively large, you may have accidentally altered the rendering size. A few wrong mouse scroll wheel rolls, or even a touchscreen or touchpad, might cause this easy error. To fix the problem, rotate the scroll wheel while pressing a ctrl button. If it still doesn’t help, try the following methods to fix your problem.

In Ubuntu 19.04 Gnome 3.32, the desktop icons are now managed by a gnome-shell extension. Though this extension causes so many bugs, on the plus side, the size of desktop icons may now be customized.

Resize Icons on Ubuntu

Step 1:
Open Ubuntu Software and search for Gnome desktop configuration tool called Gnome Tweaks. Install this extension.

Step 2:
Launch Gnome Tweaks. On the left side, you’ll find the navigation bar. Go to Extensions.

Step 3:
Click on settings for changing the specific settings for “Desktop Icons”. There, you’ll see three different options to adjust the size of the icons.

  • Small (48 pixels)
  • Standard (64 pixels)
  • Large (96 pixels)

Choose from these three default options according to your requirements.

If these three default options do not match your preferences, you may change their default settings by changing the extension prefs file.

Open terminal by pressing Ctrl+Alt+T on the keyboard, then run command to edit the file with the help of Gedit text editor:

sudo -H gedit /usr/share/gnome-shell/extensions/desktop-icons@csoriano/prefs.js

When the file opens, search for the lines ‘ICON SIZE,’ ‘ICON WIDTH,’ and ‘ICON HEIGHT.’ You may modify any of them according to your requirements.

Changing “ICON SIZE” will affect the icon sizes of your desktop, changing ‘ICON WIDTH’ will affect the width and horizontal spacing and changing ‘ICON HEIGHT’ affects the height of the icon selection box and vertical spacing.

After making all the changes, save the file and press Alt+F2. Open the command box and type r. Now press Enter to apply changes and to restart Gnome Shell.

How to Resolve Errors while Resizing Icons in Ubuntu

There is a known problem that a regular system update will not allow the changes you made in the previous steps. As an alternative, you can disable the system’s “Desktop Icon” extension and make your own using the instructions below:

Open the terminal and disable the system desktop icons extension by using the following command:

gnome-extensions disable desktop-icons@csoriano

Now use the following command to create the local extensions directory.

install -d $HOME/.local/share/gnome-shell/extensions

Copy the system’s ‘Desktop Icons’ extension to your local directory and rename it using the following command:

cp -r /usr/share/gnome-shell/extensions/desktop-icons@csoriano $HOME/.local/share/gnome-shell/extensions/desktop-icons@csoriano-local

Now, open metadata.json file to edit, and run the following command to match the new name by changing the UUID value.

gedit ~/.local/share/gnome-shell/extensions/desktop-icons@csoriano-local/metadata.json

Change the size of icons and spacing between them using the following extension.

gedit ~/.local/share/gnome-shell/extensions/desktop-icons@csoriano-local/prefs.js

Enable the local extension using the following command:

gnome-extensions enable desktop-icons@csoriano-local

Finally, restart Gnome Shell.

Conclusion

It was a detailed explanation of the ways to resize icons in Ubuntu. We have included the best possible process, so we suggest you follow all steps carefully to eliminate the chances of error. After resizing your icon, please make sure you visit our website to read more blogs on Linux.

Ubuntu Server Admin

Recent Posts

Predict, compare, and reduce costs with our S3 cost calculator

Previously I have written about how useful public cloud storage can be when starting a…

24 hours ago

One Thread to Poll Them All: How a Single Pipe Made WaterDrop 50% Faster

This is Part 2 of the "Karafka to Async Journey" series. Part 1 covered WaterDrop's…

1 day ago

A year of documentation-driven development

For many software teams, documentation is written after features are built and design decisions have…

2 days ago

Announcing FIPS 140-3 for Ubuntu Core22

With the release of the FIPS 140-3 certified cryptographic modules for Ubuntu 22.04 LTS, Canonical…

3 days ago

The foundations of software: open source libraries and their maintainers

Open source libraries are repositories of code that developers can use and, depending on the…

6 days ago

From inspiration to impact: design students from Regent’s University London explore open design for their dissertation projects

Last year, we had the opportunity to speak at Regent’s UX Conference (Regent’s University London’s…

7 days ago