Gnome 3 displays two icons for same app in dock

3.7k views Asked by At

I have created my own .desktop file for an application (sublimetext) in gnome 3 (fedora 16) I have succeeded in that:

[Desktop Entry]
Version=1.0
Name=Sublime Text 2
Comment=Text Editor
Terminal=false
Exec=sublime
Icon=/home/asher/apps/SublimeText2/Icon.png
Type=Application
Categories=TextEditor;Tools;
X-Ayatana-Desktop-Shortcuts=NewWindow

[NewWindow Shortcut Group]
Name=New Window
Exec=sublime

I want to add it to my favorites so it's locked to the sidebar. I did that, as you can see in the first screenshot, where no windows are open. The problem is, when I then open the program, another icon displays in the dockbar. The second icon is where the windows for the program are listed. The windows are consolidated to one icon, as you can see in the third screenshoot with two windows open (only two icons, not three).

Is there a way to make the favorited icon be the same as the icon that shows when the app launches? Does it have to be done in the program, or is this something I can do through a gnome 3 config file?

No Sublime Windows One Sublime Windows Two Sublime Windows

1

There are 1 answers

0
Mohammad Jalili On

there's nothing wrong with your system.

The duplicated launcher icons explained:

The different icons are different commandline options. Some context applications with call the associated *.desktop icon. The exec option of the icon will depend on how the application is called.

Some of the Icons you show in your image may be obvious because of the difference in the way they are named. You can see the difference in the way the app is called by right clicking and clicking on properties to see other differences.

Some of the *.desktop files have a %U argument, used so the application will accept arguments.

Some of the Launchers are different commands that are called differently and are named differently often by a symbolic link.

Some exampes from the list in you image are:

Name: Online Accounts
Command: unity-control-center credentials

Name: Online Accounts
Command: Online account credentials and settings

Name: Personal File Sharing
Command: gnome-file-share-properties

Name: Rhythmbox
Command: rhythmbox %U

Name: Rhythmbox
Command rhythmbox-client --select-source %U

Source: link