How to Customize the Size of Desktop Icons in Ubuntu 22.04

Last updated: May 2, 2022 — 5 Comments

Want to set a certain size of your desktop icons and/or change the spacing between them? Here’s how to do the job in Ubuntu 22.04.

Ubuntu 22.04 defaults to GNOME desktop 42 and uses an extension called “Desktop Icons NG” (DING in short) to handle shortcut icons on desktop.

It provides 4 icon sizes (“Tiny”, “Small”, “Normal”, and “Large”) in ‘Appearance‘ settings for choose from.

Change icon size via Appearance settings page

If somehow the default icon sizes do not meet you need, then you may edit the source file and customize the 4 sizes manually.

1. Edit the config file

Firstly, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run command to edit the file which is located in ‘/usr/share/gnome-shell/extensions/ding@rastersoft.com/’ directory:

sudo gedit /usr/share/gnome-shell/extensions/ding@rastersoft.com/enums.js

sudo is required as it’s a system wide extension and you need to type user password to authenticate when running the command.

When file opens, you’ll see the first line (except the comments) defines the icon sizes in pixels:

var ICON_SIZE = { ‘tiny’: 36, ‘small’: 48, ‘standard’: 64, ‘large’: 96 };

Just change the number 36, 48, 64 and 96 will replace the corresponding ‘tiny’, ‘small’, ‘normal’, and ‘large’ icon sizes.

And, change the numbers in lines of “ICON_WIDTH” and “ICON_HEIGHT” will adjust how large the square area that each icon takes. It’s the orange area when you drag and drop an icon, which can be useful if you want to change the icon spacing.

NOTE: The change will take place for all system users. For single user only, you may copy the extension folder to local directory ‘.local/share/gnome-extensions’. However, the option in “Appearance” won’t work for the local copy.

2. Apply change

After editing and saving the config file, search for and open “Gnome Extensions” app.

App to Manage your extensions

Install the tool via sudo apt install gnome-shell-extension-prefs command if you don’t have it.

When the app opens, turn off “Desktop Icons NG” extension and turn it on again will apply the changes you made in previous step.

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via ubuntuhandbook1@gmail.com Buy me a coffee: https://ko-fi.com/ubuntuhandbook1

5 responses to How to Customize the Size of Desktop Icons in Ubuntu 22.04

  1. Great, thank you!

  2. Francis Cagney May 10, 2022 at 8:22 am

    I have spent 30 minutes trying to work out how to change the icon size.

    It used to be in gnome tweak-tool, last time I did it. I even took a screen shot of the single pane gnome-tweaks with the settings just how I wanted them.

    Said screen shot is useless, gnome-tweaks has changed. Split into 6 sections none of which control icon size.
    Some pages told me there was an extensions section of gnome-tweaks
    Other pages told me the extensions application was to be found in activities

    Finally I got to your page which told me it was extensions in settings.
    It is. Thankyou wonderful! Even quite a logical place for it.

    But this is why I hate but still use Ubuntu. Something as fundamental as icon size can move from gnome-tweaks to a page in gnome-tweaks to its own application to the extensions tab in settings over the course of 2 years!

    But of course there are web pages describing the situation from 2, 4, 6, 8, 12, 15, 22 months ago. And you have to try each one to find it doesn’t work anymore.

    So thanks for this page but I’m sure in 3 months it will be useless because now icon size is in the new app gui-awesomeness. And in 9 months it will be back in gnome-tweaks under the tab gui-awesomeness

  3. Thanks for the post, but it only changes the size, width and height on desktop and not inside any open directory.

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*