The problem is that qBittorrent's .desktop
file sets the icon based on the localization:
sed -n '/^Icon\(\[[^]]*\]\)\?=.*$/p' /usr/share/applications/qBittorrent.desktop
Icon=qbittorrent
Icon[be]=qbittorrent
Icon[cs]=qbittorrent
Icon[el]=qbittorrent
Icon[en_GB]=qbittorrent
Icon[es]=qbittorrent
Icon[eu]=qbittorrent
Icon[fi]=qbittorrent
Icon[gl]=qbittorrent
Icon[it]=qbittorrent
Icon[ja]=qbittorrent
Icon[lt]=qbittorrent
Icon[nb]=qbittorrent
Icon[pl]=qbittorrent
Icon[pt]=qbittorrent
Icon[pt_BR]=qbittorrent
Icon[ro]=qbittorrent
Icon[ru]=qbittorrent
Icon[sv]=qbittorrent
Icon[uk]=qbittorrent
Icon[vi]=qbittorrent
Icon[zh_TW]=qbittorrent
Icon[en_AU]=qbittorrent
So changing the icon set by the first generic Icon=
entry doesn't help:
You'll have to set the Icon=
entry matching your current locale; however since localizing the icon by setting the very same icon for each locale is a very silly thing to do in first place, you might as well just change all the Icon=
entries by running this command (it will create a qBittorrent.desktop.bak
backup file in /usr/share/applications
):
sudo sed -i.bak 's|^Icon\(\[[^]]*\]\)\?=.*$|Icon\1=/path/to/icon|' /usr/share/applications/qBittorrent.desktop
Insert the path to the icon here-------------------^-----------^
user@user-X550CL ~ % sudo sed -i.bak 's|^Icon\(\[[^]]*\]\)\?=.*$|Icon\1=/home/user/icon.png|' /usr/share/applications/qBittorrent.desktop
user@user-X550CL ~ % sed -n '/^Icon\(\[[^]]*\]\)\?=.*$/p' /usr/share/applications/qBittorrent.desktop
Icon=/home/user/icon.png
Icon[be]=/home/user/icon.png
Icon[cs]=/home/user/icon.png
Icon[el]=/home/user/icon.png
Icon[en_GB]=/home/user/icon.png
Icon[es]=/home/user/icon.png
Icon[eu]=/home/user/icon.png
Icon[fi]=/home/user/icon.png
Icon[gl]=/home/user/icon.png
Icon[it]=/home/user/icon.png
Icon[ja]=/home/user/icon.png
Icon[lt]=/home/user/icon.png
Icon[nb]=/home/user/icon.png
Icon[pl]=/home/user/icon.png
Icon[pt]=/home/user/icon.png
Icon[pt_BR]=/home/user/icon.png
Icon[ro]=/home/user/icon.png
Icon[ru]=/home/user/icon.png
Icon[sv]=/home/user/icon.png
Icon[uk]=/home/user/icon.png
Icon[vi]=/home/user/icon.png
Icon[zh_TW]=/home/user/icon.png
Icon[en_AU]=/home/user/icon.png
Or delete the localized Icon=
entries and change the generic Icon=
entry by running this command (it will create a qBittorrent.desktop.bak
backup file in /usr/share/applications
):
sudo sed -i.bak '/^Icon\(\[[^]]*\]\)\=.*$/d; s|^Icon=.*$|Icon=/path/to/icon|'
Insert the path to the icon here------------------------------^-----------^
user@user-X550CL ~ % sudo sed -i.bak '/^Icon\(\[[^]]*\]\)\=.*$/d; s|^Icon=.*$|Icon=/path/to/icon|' /usr/share/applications/qBittorrent.desktop
user@user-X550CL ~ % sed -n '/^Icon\(\[[^]]*\]\)\?=.*$/p' /usr/share/applications/qBittorrent.desktop
Icon=/path/to/icon
Or just change the Icon=
entry matching your current locale by any mean, such as:
sudo nano /usr/share/applications/qBittorrent.desktop
qtox.desktop
file locally. I then changed the icon without a problem. see dl.dropboxusercontent.com/u/1155139/fabby/1.png and dl.dropboxusercontent.com/u/1155139/fabby/2.pngapt-cache policy qtox-unity
noteworthy output:500 https://pkg.tox.chat/debian/ nightly/release amd64 Packages
/usr/share/pixmaps
and then a bunch of manually edited.desktop
files... That's why I'm running into trouble... Doing stuff I'd better not do! ;-) (as every firefox update needs me to go in and edit the desktop file again.)