Provided .desktop file is broken/insufficient
I use KDE but I'm pretty sure this applies to any desktop environment.
I like to have the applications I use the most "pinned" to the Task Manager, if that's how you call the bar at the bottom of the screen with launcher icons.
Because there's no package for OpenSUSE, I installed THG from source.
I found a thg.desktop file buried in some sub-sub-folder. It's the only .desktop file that was provided; so either it's the official one (meaning it's the one I'm supposed to use) and it's incomplete/broken, or it's not in which case the lack of one is the issue.
I copied it to ~/.local/share/applications, so Thg would show up in the Application Launcher (bottom-left corner of the screen). From there, I "pinned" it to the task manager.
It has a couple of major issues:
- As is, the icon won't show up. I guess this is because the path to the icon is relative, so it has no way to find it. I had to edit the .desktop file and put the absolute path of the icon. Or maybe I should copy the icon too to some standard location. (The whole .desktop files thing seems to be based on the assumption that an application will install its stuff where it needs to be; when that's not the case, there's no way as a user to "discover" how to do it manually, unless you study the details of how the desktop environment works - but I'm rambling, that's an issue in the desktop environment). Anyway, if that is the case, then you should provide a script that helps installing the .desktop file AND icon into the proper place.
But more importantly:
- Once the icon is pinned to the task manager, when you click on it to open TortoiseHG, it forks off another icon. That is not how other applications work. Usually, the same icon that is originally pinned and works as a launcher icon, is the one that becomes highlighted when you click it to open the application. With two icon, when you want to give focus to the already open THG window, you need to be careful not to click on the wrong icon, or you'll launch another instance.
Note that this does NOT work:
- use the original launcher icon (.desktop file) to launch THG (forks out a new icon)
- right-click on the new icon and pin that one to the task manager.
- delete the old one That does not work, and results in a pinned icon that won't launch THG (will give an error)
I guess the executable forks out a separate process (even with --nofork); however, there are other applications that do something similar (e.g. Thunderbird), and yet they are capable of avoiding creating an additional icon. So there's must be some way in the .desktop definition to allow the "forked"-or-whatever windows to identify themselves as belonging to the same original icon, or whatever.