Software & AppsOperating SystemLinux

How To View All Available Icons on Ubuntu with Names and Thumbnails

Ubuntu 11

In this guide, we will walk through different methods on how to view all available icons on your Ubuntu system, complete with their names and thumbnails. This can be particularly useful for developers and designers who want to utilize these icons in their projects.

Quick Answer

To view all available icons on Ubuntu with names and thumbnails, you can use the gtk3-icon-browser graphical application, create links to icons manually, or use the find command to search for icon files. Each method provides a different approach to browsing and accessing the icons on your system.

Method 1: Using gtk3-icon-browser

gtk3-icon-browser is a handy graphical application that lists all the themed icons available on your system. It provides a well-organized list of icons, complete with their names, preview thumbnails, and the origin of the icon theme.

Installation

To install gtk3-icon-browser, open your terminal and run the following command:

sudo apt-get install gtk-3-examples

This command uses the apt-get package handling utility to install the gtk-3-examples package, which includes the gtk3-icon-browser tool.

Usage

To launch gtk3-icon-browser, simply type the following command in your terminal:

gtk3-icon-browser

You should now see a window displaying all the available icons, along with their names and thumbnails.

Method 2: Creating Links to Icons Manually

If you prefer a more hands-on approach, you can manually create links to all the icons on your system and browse them in a directory.

Script

You can use the script provided in this Ask Ubuntu answer to create links to icons from different themes. This script creates a directory ~/foo containing links to each unique icon file.

Browsing the Icons

After running the script, you can browse the icons in the ~/foo directory. Here, you can see their names, thumbnails, and the original locations of the icons.

Method 3: Using the Find Command

The find command is a powerful tool that can search for icon files in the /usr/share/icons/ directory.

Command

Run the following command in your terminal:

find /usr/share/icons/ -iname '*.png' -or -iname '*.svg' -printf '%h %f %p\n' | sed -r 's;^/usr/share/icons/([^/]*)/[^ ]* ;\1 ;' | sort -u -k1,2 | column -t

This command does several things:

  • find /usr/share/icons/ -iname '*.png' -or -iname '*.svg' searches for all PNG and SVG files in the /usr/share/icons/ directory.
  • -printf '%h %f %p\n' prints the directory path, file name, and full file path of each file found.
  • sed -r 's;^/usr/share/icons/([^/]*)/[^ ]* ;\1 ;' uses the sed stream editor to extract the icon theme name from the full file path.
  • sort -u -k1,2 sorts the output and removes duplicate lines.
  • column -t formats the output into a table.

This method provides a list of icons with their names and locations, but it does not provide preview thumbnails.

Finding the Package of an Icon

If you want to find out from which package an icon originates, you can use the dpkg-query -S command. For example, to find the package name of the bash executable in the /bin directory, run:

dpkg-query -S /bin/bash

To find all installed packages for all files in a directory, run:

dpkg-query -S /path/to/directory

This command will list all the packages associated with the files in the specified directory.

Conclusion

In this guide, we have explored three different methods to view all available icons on an Ubuntu system, along with their names and thumbnails. Whether you prefer a graphical application like gtk3-icon-browser, a hands-on approach with a custom script, or the powerful find command, there’s a method to suit your needs. Happy icon hunting!

How can I install gtk3-icon-browser on Ubuntu?

To install gtk3-icon-browser on Ubuntu, open your terminal and run the command sudo apt-get install gtk-3-examples. This command will install the gtk-3-examples package, which includes gtk3-icon-browser.

How do I launch gtk3-icon-browser?

To launch gtk3-icon-browser, open your terminal and type gtk3-icon-browser. This will open a window displaying all the available icons on your system, along with their names and thumbnails.

Can I manually create links to icons on my Ubuntu system?

Yes, you can manually create links to icons on your Ubuntu system. You can use the script provided in the guide to create links to icons from different themes. After running the script, you can browse the icons in the specified directory and see their names, thumbnails, and original locations.

How can I use the find command to search for icon files?

To use the find command to search for icon files, open your terminal and run the command mentioned in the guide: find /usr/share/icons/ -iname '*.png' -or -iname '*.svg' -printf '%h %f %p\n' | sed -r 's;^/usr/share/icons/([^/]*)/[^ ]* ;\1 ;' | sort -u -k1,2 | column -t. This command will provide a list of icons with their names and locations, but it does not provide preview thumbnails.

How can I find the package of an icon?

To find the package of an icon, you can use the dpkg-query -S command. For example, to find the package name of a specific icon file, run dpkg-query -S /path/to/icon/file. This command will list the package associated with the specified icon file.

Which method should I choose to view all available icons?

The method you choose depends on your preferences and requirements. If you prefer a graphical application with names and thumbnails, gtk3-icon-browser is a good option. If you prefer a more hands-on approach and want to manually create links to icons, you can use the provided script. If you only need a list of icons with their names and locations, the find command can be useful. Choose the method that best suits your needs.

Leave a Comment

Your email address will not be published. Required fields are marked *