4

I've just upgraded from Ubuntu 18.04 to its newest LTS version - 20.04. While it comes with some interesting changes, the Desktop icon system was messed up in my opinion. When you hover the mouse cursor over the icons, you see a huge space marked around them that cannot be violated (as you can see in the image below) so that they need to be placed very far apart from each other.

18.04 allowed you to place icons much closer to each other and didn't have that marked space around them. This new way leaves much less space on the Desktop to organize large amounts of icons - including folders, files and shortcuts. Is there a way I can significantly reduce the size of icons and their "spaces" or go back to the old system of organizing files? On "Settings", there is a tool to change the size of Dock icons, but not of Desktop icons.

Also, every time I move or delete something, the Desktop "flashes" and the icons seem to rearrange themselves automatically, nothing of which happened in 18.04. I also can't move anything directly to the Desktop; I need to move to the Desktop folder on Nautilus. This makes me start to think about downgrading Ubuntu back to 18.04.

enter image description here

  • the second paragraph question is somehow possible.. – UnKNOWn Apr 30 at 3:40
7

Since some previous versions of Ubuntu..

Desktop Icons are handled by desktop-icons gnome-shell extension.

you can achieve the sizes and spacing you mentioned in Question by editing the extensions prefs.js file. Take backup of the file before editing.

the extensions directory is /usr/share/gnome-shell/extensions/desktop-icons@csoriano

Original Content:

const ICON_SIZE = { 'small': 48, 'standard': 64, 'large': 96 };
const ICON_WIDTH = { 'small': 108, 'standard': 116, 'large': 116 };
const ICON_HEIGHT = { 'small': 86, 'standard': 102, 'large': 134 };

Edited Content:

const ICON_SIZE = { 'small': 48, 'standard': 64, 'large': 96 };
const ICON_WIDTH = { 'small': 52, 'standard': 116, 'large': 116 };
const ICON_HEIGHT = { 'small': 60, 'standard': 102, 'large': 134 };

I Have Configured the sizes for 'small', you can achieve with other sizes 'standard' and 'large' also.

enter image description here


Above method requires root privileges.. If you need to make changes locally..

Disable the system extension desktop-icons.

gnome-extensions disable desktop-icons@csoriano

create the local extensions directory.

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

Copy the system extension desktop-icons to local extensions directory and rename it as desktop-icons@csoriano-local

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

Edit the metadata.json file of the local extension like below contents. Observe that "local" is the main change

{ we need to edit the metadata.json file because extensions directory name and the UUID field in the metadata.json file must match }

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

Already Edited Content:

{
    "name": "Desktop Icons-local",
    "description": "Add icons to the desktop",
    "uuid": "desktop-icons@csoriano-local",
    "shell-version": ["3.34.0"]
}

Enable the local extension with below command

gnome-extensions enable desktop-icons@csoriano-local

Refresh the gnome-shell with Alt+F2 'r' Enter method.

enter image description here

Make sure you never turn on both the extensions desktop-icons@csoriano (System Extension) and desktop-icons@csoriano-local (Local Extension)

| improve this answer | |
  • 1
    Thanks! That worked for me. Do you know how to reduce the size of the text below the icons too? – Anvos Gorbs Apr 30 at 21:55
  • 2
    Excellent that you also explain how to do this for a single user without needing root permissions. – vanadium Jun 18 at 5:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.