I have an app that may get launched with current user's or with root permissions.
In fact, there's the possibility that the app runs twice at the same time - once under the current user and once as root.
I like to inform the user when the app is running under root. Currently, I show this in its window title, but I'd prefer to change the app's name so that it reads "Appname (Root)" where appropriate. That way, the name would appear both in the menu bar and in the Dock with this "root" info, and it would allow the user to tell which of the two app instances in the Dock is the root version.
Does someone know if the app name can be changed by code, i.e. by the app itself, or by its launcher?
If not, my only option appears to be adding a badge to the Dock icon that says "root", but that's my last resort, as it won't work for the menu bar nor for other tools that display the app names (i.e. other app launchers such as DragThing).