I am using firefox to run some web applications as "stand alones": I create a new profile with firefox, specific for that application, set the first page, do the login and customize the UI depending on the specific needs.
Then, I can quickly launch an instance of that web app by doing:
firefox --no-remote -P My_app_profile the_app_url
to make it even nicer, I created an
my_web_app.desktop file and placed it in
~/.local/share/application, and made it favorite, so I can quickly run it from the gnome shell side bar.
The problem is that, after running the application, I see that firefox is running, and not my app. For example, I made a shortcut for Trello, but after launching it, I see this:
Now, it makes sense because it is firefox that is running, but I would like to see my application highlighted instead, and have the firefox icon free to be used as if no other instance was running.
I thought that gnome may highlight the icons depending on the executable name, but a simple sym-link to firefox would not trigger a name change (i.e.
link /usr/bin/firefox /usr/bin/my_app_firefox still counts as firefox).
Do you have any idea on how to fix this? I am using gnome shell 3.18.2.
Here's the trello.desktop file as an example. I am not an expert on the options, so probably I got something terribly wrong... But if I did, it doesn't look like something that would cause the undesired behavior.
Comment=Trello in FireFox
Exec=firefox --no-remote -P App_Trello http://trello.com
So, I wanted to check the gnome-shell source code to see how this could happen. I found that in the Dash each entry is associated to some shell-app, and apparently I want to ensure that the ID of my applications is unique.
Using looking glass (Alt+F2 lg), I could see that my current running applications are named "firefox.desktop":
appSys = Shell.AppSystem.get_default()
ll = appSys.get_running()
ll.get_id() // firefox.desktop (0 is the ID of the firefox app in my case)
If I launch my trello.desktop application, the
get_running() method returns the same number of entries, therefore my application does not produce a new entry and my hypothesis of having an unique ID seems seems confirmed.
To determine the ID of a desktop file, make its full path relative to the $XDG_DATA_DIRS component in which the desktop file is installed, remove the "applications/" prefix, and turn '/' into '-'.
My .desktop file was in
$HOME/.local/share/applications, which was NOT in my
I moved the trello.deskop file into a directory in that path and restarted the shell, but the application still figures as
firefox.desktop, so apparently the ID is still the same, in fact the application is still grouped with other firefox windows.