1

I know it seems like a duplicate but I can't find anything especially related to terminal icon.

What I tried so far:

  1. Modifying /usr/share/applications/gnome-terminal.desktop icon no changing

  2. I copied this file to ~/.local/share/applications hence created a new app in the menu => old terminal disappears new icon is there BUT when clicked terminal opens and appears with it's old icon in the dock

  3. I replaced every terminal icon I found in the themes but here again no changes

  4. Also replaced the utilities-terminal.svg in humanity theme also no help

The fun part is that when I am trying to add my terminal from the application menu to the dock (add to favs) it adds BOTH applications to the dock.

Really really strange I have no idea why. I am out of ideas now.

EDIT: here is the /usr/share/applications/gnome-terminal.desktop

[Desktop Entry]
Name=Terminal
Comment=Use the command line
Keywords=shell;prompt;command;commandline;cmd;
TryExec=gnome-terminal
Exec=gnome-terminal
Icon=/path/to/my/icon/terminal.png
Type=Application
X-GNOME-DocPath=gnome-terminal/index.html
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-terminal
X-GNOME-Bugzilla-Component=BugBuddyBugs
X-GNOME-Bugzilla-Version=3.28.2
Categories=GNOME;GTK;System;TerminalEmulator;
StartupNotify=true
X-GNOME-SingleWindow=false
OnlyShowIn=GNOME;Unity;
Actions=new-window
X-Ubuntu-Gettext-Domain=gnome-terminal
X-AppStream-Ignore=true

[Desktop Action new-window]
Name=New Terminal
Exec=gnome-terminal
5
  • can you please post the contents of the relevant .desktop file? perhaps paste it into a text file first and remove all the alternate language entries (the ones with [de], [it], [ko]... in them) to make it a little more readable, then paste it as a code sample in an edit to your question. Hint -- you make a code sample by separating it with a blank line, and enclosing it in back-ticks (the unshifted ~ key).
    – BISI
    Mar 23, 2019 at 5:54
  • I don't really get what you mean by "seperating it with a blank line" seperate who? But I think I posted what you wanted. I modified only the icon path. With every other application it worked fine. But here it's tricky. I had also issues with apps which were downloaded over snap. When I moved their .desktop to .local I had +- same issues. So I think maybe this is not the only terminal.desktop file.
    – Dimfred
    Mar 23, 2019 at 12:30
  • 1
    actually there are two applications in /usr/share/applications/ can you try with org.gnome.Terminal.desktop file from /usr/share/applications by the way what is the current icon theme you are using?
    – PRATAP
    Mar 23, 2019 at 12:34
  • Ohh you made it thank you. It was indeed *.Terminal. I have to make grep case insensitive for the next time to get all the results. I am using ubuntu-mono-dark, but I think the terminal icon is from adwaita (ubuntu-mono-dark inherits from there)
    – Dimfred
    Mar 23, 2019 at 13:01
  • With your answer I could also find the corresponding nautilus file. It's also uppercase.
    – Dimfred
    Mar 23, 2019 at 13:07

2 Answers 2

0

as PRATAP said:

actually there are two applications in /usr/share/applications/ can you try with org.gnome.Terminal.desktop file from /usr/share/applications [...]

0

a couple of things to note:

First, you have a custom path for the icon, so changing the default icon won't make any difference.

Second - we'll probably ignore the other issue(s) you've raised (multiple instances in the dock) -- I recommend you search for solutions to that, and see if you can find an answer, and if not, post it as a separate question.

Back to the headline question -- "how to change the default terminal icon?"

My solution was to give up and use a custom icon. Mostly because I long-ago came to the conclusion that the upgrade churn of Ubuntu wastes too much of my time, so I was better off keeping my customisations safe from the developers. My particular need is slightly different from yours -- for a ROOT terminal with matching icon. So here's my solution.

contents of ~/.gnome/apps/menulibre-root-terminal.desktop

[Desktop Entry] Version=1.1 Type=Application Name=Root Terminal Comment=xfce4-terminal with root privileges Icon=/0data/localstore0/gksu-root-terminal.png Exec=/usr/bin/pkexec xfce4-terminal Actions= Categories=System;Utility;XFCE; StartupNotify=true OnlyShowIn=Old;

This file has been modified a number of times over the years (most recently to implement pkexec, when the churn killed gksu). It is also for xubuntu, so it is not directly applicable to your situation. But close enough for some guidance. Note the path for my icon for this launcher. I have several that have accumulated over the years. I have attempted to attach a couple of them for you to experiment with. gksu-root-terminal.png utilities-terminal.png

Working from this example, I use find, and discover that the launcher for the default terminal (not the one I am using) on my system is called:

/usr/share/applications/xfce4-terminal-settings.desktop

Inside that file I find the Icon= declaration. It says:

`Icon=utilities-terminal'

doing a find, as below, reveals a plethora of candidates, at which point I would likely be off to the xfce.org website (and probably the xubuntu website) to ask someone there for some help. -- like "which one of these is referred to by the launcher?", and "how does an ordinary mortal know for sure?"

(FWIW, my money would be on the first one, and I would take a flyer and try renaming that file, putting some obviously different image in its place, with the same name, ownership and permissions. But I'll leave that up to you.)

find /usr/share -iname '*utilities-terminal*' -print

/usr/share/app-install/icons/utilities-terminal.svg /usr/share/icons/HighContrast/16x16/apps/utilities-terminal.png /usr/share/icons/HighContrast/24x24/apps/utilities-terminal.png /usr/share/icons/HighContrast/scalable/apps/utilities-terminal.svg /usr/share/icons/HighContrast/48x48/apps/utilities-terminal.png /usr/share/icons/HighContrast/256x256/apps/utilities-terminal.png /usr/share/icons/HighContrast/22x22/apps/utilities-terminal.png /usr/share/icons/HighContrast/32x32/apps/utilities-terminal.png /usr/share/icons/gnome/16x16/apps/utilities-terminal.png /usr/share/icons/gnome/24x24/apps/utilities-terminal.png /usr/share/icons/gnome/scalable/apps/utilities-terminal-symbolic.svg /usr/share/icons/gnome/48x48/apps/utilities-terminal.png /usr/share/icons/gnome/256x256/apps/utilities-terminal.png /usr/share/icons/gnome/22x22/apps/utilities-terminal.png /usr/share/icons/gnome/32x32/apps/utilities-terminal.png /usr/share/icons/Adwaita/scalable/apps/utilities-terminal-symbolic.svg /usr/share/icons/Humanity/apps/64/Etermutilities-terminal.svg /usr/share/icons/Humanity/apps/64/utilities-terminal.svg /usr/share/icons/Humanity/apps/16/Etermutilities-terminal.svg /usr/share/icons/Humanity/apps/16/utilities-terminal.svg /usr/share/icons/Humanity/apps/32/Etermutilities-terminal.svg /usr/share/icons/Humanity/apps/32/utilities-terminal.svg /usr/share/icons/Humanity/apps/128/Etermutilities-terminal.svg /usr/share/icons/Humanity/apps/128/utilities-terminal.svg /usr/share/icons/Humanity/apps/22/Etermutilities-terminal.svg /usr/share/icons/Humanity/apps/22/utilities-terminal.svg /usr/share/icons/Humanity/apps/48/Etermutilities-terminal.svg /usr/share/icons/Humanity/apps/48/utilities-terminal.svg /usr/share/icons/Humanity/apps/24/Etermutilities-terminal.svg /usr/share/icons/Humanity/apps/24/utilities-terminal.svg /usr/share/icons/elementary-xfce/apps/64/utilities-terminal.png /usr/share/icons/elementary-xfce/apps/64/Etermutilities-terminal.png /usr/share/icons/elementary-xfce/apps/symbolic/utilities-terminal-symbolic.svg /usr/share/icons/elementary-xfce/apps/16/utilities-terminal.png /usr/share/icons/elementary-xfce/apps/16/Etermutilities-terminal.png /usr/share/icons/elementary-xfce/apps/32/utilities-terminal.png /usr/share/icons/elementary-xfce/apps/32/Etermutilities-terminal.png /usr/share/icons/elementary-xfce/apps/128/utilities-terminal.png /usr/share/icons/elementary-xfce/apps/128/Etermutilities-terminal.png /usr/share/icons/elementary-xfce/apps/22/utilities-terminal.png /usr/share/icons/elementary-xfce/apps/22/Etermutilities-terminal.png /usr/share/icons/elementary-xfce/apps/48/utilities-terminal.png /usr/share/icons/elementary-xfce/apps/48/Etermutilities-terminal.png /usr/share/icons/elementary-xfce/apps/24/utilities-terminal.png /usr/share/icons/elementary-xfce/apps/24/Etermutilities-terminal.png

NB -- after re-reading and editing all this, I am going to guess that you are not using the term "default icon" to actually mean the default icon for the system, but rather you just want a custom icon for your terminal app. In which case, you just need to put a suitably-dimensioned svg, png, jpg, whatever, image in a known location, then edit the launcher in the GUI to point at the new image file.

note that the utilities-terminal.png is really utilities-terminal.svg, converted using gimp -- stack exchange doesn't accept .svg files for upload.

1
  • Thanks for the help I appreciate it. But the two application problem disappeared when I found the right .desktop file. Also I only have chrome.desktop files in the ~/.gnome... directory so no help here. Also when changing all default icons to my icon the icon will surely change because on of this icons is loaded by default and when my icon becomes the default icon the problem is also solved. But Also @PRATAP has allready answered my question correctly. Again still thanks for the answer.
    – Dimfred
    Mar 28, 2019 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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