Score:0

How to fix the window title for an application (Android Studio)?

us flag
JJD

I am running the latest Android Studio version on Ubuntu 22.04.1 (Wayland). The corresponding .desktop file in ~/.local/share/applications looks like this:

[Desktop Entry]
Version=1.0
Type=Application
Name=Android Studio Flamingo 2022.2.x
Icon=/home/jjd/bin/android-studio-2022.1.x-linux/bin/studio.png
Exec=bash "/home/jjd/bin/android-studio-2022.1.x-linux/bin/studio.sh" %f
Comment=Develop with pleasure!
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-android-studio

For some reason the top window title shows a different name: Android Studio 4.2.2. That is the Name of an much older version of the application. How comes this is shown instead of Android Studio Flamingo 2022.2.x which is defined in the .desktop file?

enter image description here

ec flag
You may have a different `.desktop` file lurking about somewhere. Have you searched your machine for all `.desktop` files?
us flag
JJD
There is other `.desktop` files in `~/.local/share/applications` for each major version of Android Studio which I want to keep. One of them contains the `Name=Android Studio 4.2.2` but this points to the respective executable **not** to the one outlined in my question. Is there another location where `.desktop` files are usually stored?
ec flag
`/usr/share/applications/` is the system-side folder for associating `.desktop` files to applications. Since it sounds like you're running different versions of the same application, my guess is that there is some issue with the proper `.desktop` file getting associated with the two (or more?) applications in question. To test this, you may want to edit the `Name` string to see if the text "Android Studio 4.2.2" changes. If so, you've confirmed the active `.desktop` file.
us flag
JJD
I can confirm it is the file. I also found a difference in the file. The `Exec` is set to `Exec="/home/jjd/...` instead of `Exec=bash "/home/jjd/` like in the example above. Prefixing `bash ` did not help, though. Also `StartupWMClass=jetbrains-studio` vs. `StartupWMClass=jetbrains-android-studio`. When I delete the file then the window title changes to `jetbrains-studio`. Strange behavior altogether.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.