4

I have installed Ubuntu GNOME 16.04 LTS

  • On Intel® Desktop Board DH55TC
  • With Intel® Core™ i3 CPU 540 @ 3.07GHz
  • 500 GB SATA hard drive
  • Connected to 42" LG TV with HDMI cable
  • TP-Link 300 MB USB wireless LAN
  • Wireless keyboard & mouse

Everything is fine and smoothly. But I want to reduce the icon size in "Show Application" grid.

Middle Part in below Screen enter image description here

How can I do it !!

Milind
  • 225

2 Answers2

6

The themes are now in binary files gresource, you would need to either unpack the gresource file, make your change and put it back together.

mkdir ~/shell-theme and create extractgst.sh inside this directory and paste the following to that file.


#! /bin/sh

workdir="${HOME}/shell-theme" gst="/usr/share/gnome-shell/gnome-shell-theme.gresource" mkdir theme

for r in gresource list $gst; do gresource extract $gst $r >$workdir${r/#/org/gnome/shell/} done

Execute above script you will get all source file from gnome-shell-theme.gresource.

Use your editor and edit gnome-shell.css file.

And fix values as the following(You can choose other values).

.icon-grid {
    spacing: 18px;                       /* was 36px */
    -shell-grid-item-size: 35px;         /* was 70px */
}

.all-app .icon-grid { -shell-grid-item-size: 59px; /* was 118px */ }

.all-app .overview-icon { icon-size: 48px; /* was 96px */ }

Now you have to build new gnome-shell-theme.gresource

Download gnome-shell-theme.gresource.xml from github and put it into your ~/shell-theme/theme directory

cd ./theme
glib-compile-resources gnome-shell-theme.gresource.xml

Then copy the resulting gnome-shell-theme.gresource file to the /usr/share/gnome-shell directory.

Detail: HERE and here and bbs.archlinux.org

Pablo Bianchi
  • 15,657
thangdc94
  • 940
-1

For those wanting to reduce desktop and nautilus icons here's what you need to do, at least for Ubuntu Gnome 17.04:

Going below 48px requires changing the Nautilus source code and recompiling. (Yes, they hard-coded icons sizes.)

**** INSTRUCTIONS FOR NAUTILUS 3.20.4 ON UBUNTU-GNOME 17.04 ****

  1. Install the following dependencies:

    sudo apt install libgd-dev autotools-dev libexif-dev libexempi-dev libselinux1-dev libtracker-sparql-1.0-dev libext-dev libxml2-dev libgnome-desktop-3-dev
    

    Each one installs a bunch of other stuff, so hopefully I've given you the correct parent package name. I apologize for not recalling with 100% accuracy exactly what I installed, but this looks fairly correct to me immediately after my install. (Notify me if I'm inaccurate anywhere.)

  2. Download from the Nautilus snapshots website the version of Nautilus that you are currently using. To find that out, run "nautilus --version" from the terminal. After downloading the archive, unzip it to whatever directory you want to work from.

  3. From within the unzipped package, open the file "nautilus-icon-info.h". Within the first several lines you will see various sizes designated for the particular scroll-setting options. For instance, within the file for version 3.20.4 the icon sizes start on line 36. Change each of those levels to whatever you want to use so that you can make the icons much smaller (or larger).

  4. After editing and saving the file, it's time to configure, compile, and install. Run the following commands from the terminal from within the base directory of the version of nautilus that you have downloaded and unzipped. Make sure that you are within the base of the folder structure of the nautilus directories!

    ./configure  
    make  
    sudo make install
    

    This can be run altogether with the command ./configure && make && make install.

    If the ./configure command fails it's because you are missing some other dependencies. I apologize if my list of dependencies above was incomplete. Google (or whatever search engine you want) to find what package it is that you need. You can use Synaptic to search for what you need if you're unsure even after Googling.

  5. Once installed, I suggest a reboot just to make sure that every single thing is reloaded properly. You can now tweak your icon sizes as you wish.

karel
  • 114,770
CSmanic
  • 19
  • There's no ./configure in Nautilus sources. Meson or jhbuild are used now, via: http://kevlopez.com/blog/compiling-nautilus-with-meson/ . It seems this though is the way to build GNOME apps: https://wiki.gnome.org/Newcomers/BuildProject – David Oct 03 '18 at 02:58