-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serenade detects intellij as atom in ubuntu #25
Comments
Thanks for the thorough investigation! Ideally, we should implement better regex/pattern matching, to avoid this from happening with other applications or other combinations. GPTs suggestion: https://gist.github.com/sombrafam/c80e659e04a87912864553f7d7348032 |
I have been trying to get the project to build but I keep running into errors. I assume you got the project building? If its not too much work would it be possible for you to build a new AppImage. Or somehow share the adjusted linux client? |
Thank you that is very kind of you! |
Wow! i most experiencing exactly this problem. This solved it for me thank you so much. |
I had the same issue in Arch Linux, and this fixed it for me too. The only thing is that the local server doesn't work in this unofficial patch. Anyways, thank you for this. It's making a huge difference for me right now as I injured my hand. |
Yeap, it recognizes the branch, but local server does not work as it needs to download the models. |
@milosbugarinovic how did you buid the appimage? I was able to build serenade, but didnt try the app image yet. |
Another possible workaround that keeps the local server working is to remove from the IDE init script (e.g bin/pycharm.sh) the argument that makes serenade recognize it as Atom:
I've been using Pycharm this way for a few months now and it's working as expected. |
Oww, that's a really nice workaround. The local server is much faster and I prefer to have the local server than having PyCharm recognized. I wonder what side effects that might cause. Click @luizferreira, if you are not part yet, we have a discord channel: https://discord.com/channels/807359313940709436/1000094199988883647 |
If you are unable to modify the IDE init script for whatever reason and don't need Atom support, another workaround is to unpack, modify, and repack the AppImage file as follows:
|
Followed the steps but this last command fails with "execv error: No such file or directory". Did you have to make any changes to the squashfs-root directory? |
System Information
Serenade Version: v2.0.2
OS and Version: Ubuntu 22.04.2
Application: IntelliJ
Issue Description
When using Serenade on Ubuntu and having IntelliJ IDE open and in focus, an issue arises where Serenade incorrectly detects that Atom editor is selected instead of IntelliJ.
How to Reproduce
Screenshots
Additional info
Expected Behavior
Serenade should accurately detect the active application and recognize that IntelliJ IDE is in focus when it is open and being used.
Actual Behavior
Serenade incorrectly identifies the Atom editor as the active application when IntelliJ IDE is open and in focus. This leads to voice commands not working correctly.
Investigation:
During my investigation of this issue, I found next:
in function determineActiveApplication()(serenade/client/src/main/execute/system.ts)
I noticed that if function
result
includesatom
(result.includes("atom")) serenade decides that the atom is in focus, and that this is being checked before checking if the application that is selected isIntelliJ
Further investigation how
driver.getActiveApplication()
works and what is the result of this function on my machine I discovered this by running a simple script from inside IntelliJ's terminal app (so IntelliJ would be in focuse 😄 )if you search the output of the console log you will find word
atomic
which containsatom
😄.../java.util.concurrent=all-unnamed--add-opens=java.base/java.util.concurrent.atomic=all-unnamed--add-opens=java.base/jdk.internal.vm=all-u...
### VS Code - v1.79.1 > Commit: 4cb974a7aed77a74c7813bdccd99ee0d04901215 > Date: 2023-06-12T16:17:13.990Z > Electron: 22.5.7 > Chromium: 108.0.5359.215 > Node.js: 16.17.1 > V8: 10.8.168.25-electron.0 > OS: Linux x64 5.19.0-43-generic /usr/share/code/code--unity-launchdriver.getActiveApplication()
result for other applications on ubuntuFirefox Browser - 114.0 (64-bit)
firefox-pmilos
Chrome - Version 114.0.5735.106 (Official Build) (64-bit)
/opt/google/chrome/chrome--profile-directory=default
Slack - 4.32.122 64-bit
/usr/lib/slack/slack
Serenade - v2.0.2
/tmp/.mount_serenazylpws/serenade--enable-crashpad
Solution Proposal
To address the issue, we propose modifying the logic of the application detection in Serenade. One possible solution is to move the check for the Atom editor to the end of the
if-else
statement. Since the termatom
can be found in other applications, such as "atomic" in IntelliJ, this change will allow for more accurate identification. Additionally, it is advisable to reposition any other applications with generic names that may potentially be found in different languages.Available for Further Investigation
If you require any further assistance or if additional information is needed from my Ubuntu system to aid in the investigation of this issue, I would be more than willing to help. Please feel free to reach out to me with any specific instructions or guidance on how I can assist further in resolving this problem.
The text was updated successfully, but these errors were encountered: