Icons
Related articles
A computer icon is a pictogram displayed on a computer screen in order to help the user navigate a computer system or mobile device and is used in graphical user interfaces to improve their usability by taking advantage of the fact, that for humans pictures can be more expressive than texts are. The freedesktop project provides the icon-theme-spec, which applies to most linux desktop environments and tries to unificate the look of a whole bunch of icons in an icon-theme. Freedesktop also provides the icon-naming-spec, which catalogizes a set of icons believed to be installed on any system. The default theme hicolor should include them all.
Contents
Installation
Icons and emblems
To append a custom icon to an existing icon theme xdg-icon-resource
can be used. This will basicly resize and copy the icon to $HOME/.local/share/icons/
. With this method also custom emblems can be added. Examples:
/etc/fstab
xdg-icon-resource install --size 128 --context emblems archuser-example.png ;# add as emblem xdg-icon-resource install --size 128 archuser-example.png ;# add as normal icon
Mime type icons
Todays file managers do not rely on the traditional mime type which file --mime
outputs. Instead definitions from /usr/share/mime/
are used. Calling an icon according to the definition found there and copying it to ~/.local/share/icons
will cause the file manager to display the custom mime type icon. This command illustrates the method:
Creates a custom icon for keepass database files (*.kdb)
# grep kdb /usr/share/mime/globs | egrep -o '.+\/[^:]+' | tr '/' '-' application-x-keepass ;# rename your icon according to this output xdg-icon-resource install --size 128 --context mimetypes application-x-keepass.png
Icon themes
From a package
Manually
If you cannot find a package for the icon theme you are looking for, you will need to install it manually.
- Firstly, find and download your desired icon pack. Many different icon themes can be downloaded from the following sites: Customize.org, Opendesktop.org and Xfce-look.org.
- Then navigate to the directory which contains the icon pack and extract it. Example
tar -xzf /home/user/downloads/icon-pack.tar.gz
.
- Move the extracted folder containing the icons to either
~/.icons
(user only) or to/usr/share/icons
(systemwide).
- Optional: run
gtk-update-icon-cache -f -t ~/.icons/<theme_name>
to update the icon cache.
- Select the icon theme using the appropriate configuration tool for your desktop environment or window manager.
fstab / gvfs
According to this document file managers using GVFS (like nautilus or thunar) can display icons for custom locations, like NFS shares. All you need are some extended mount options inside /etc/fstab
with icon names supported by your selected icon theme:
/etc/fstab
hostname:/ /mnt/ nfs4 defaults,_netdev,user,rw,exec,comment=x-gvfs-show,x-gvfs-name=Network%20Attached%20Storage,x-gvfs-icon=network-server,x-gvfs-symbolic-icon=network-server,timeo=14,noatime 0 0
Xfce icons
Not all icon themes provide a complete set of icons for the Xfce environment. Listed below are a number of icon themes that do.
- faenza-icon-theme and faience-icon-theme (depends on faenza) are available in the Official repositories.
- gnome-colors-icon-theme - a set of icons, similar to the GNOME icon theme, with good Xfce support.
- echo-icon-theme-git - previously the default icon theme for Fedora. The non git version does not contain all of the Xfce icons.
- gnome-icon-theme-xfce - a small package in the which adds the missing icons to the GNOME icon theme.
- elementary-xfce-icons - the default icon theme in Xubuntu.