[Ubuntu] No global menu with Jayatana Follow
I'm running IntelliJ IDEA 2016.3.3 on Ubuntu 16.04.
I'm trying to get IDEA's menu bar integrated with Unity's global menu, with little success. Here's what I've checked so far:
- Jayatana is installed, and I've added "-javaagent:/usr/share/java/jayatanaag.jar" to the beginning of bin/idea64.vmoptions.
- I have tried uninstalling and reinstalling Jayatana, to no avail.
- When I run a demo app with menus using
$IDEA_INSTALLATION/jre/jre/bin/java -javaagent:/usr/share/java/jayatanaag.jar -jar demo.jar
it works just fine; the menus are integrated into Unity as expected.
Any ideas on what to try next?
Please sign in to leave a comment.
>I've added "-javaagent:/usr/share/java/jayatanaag.jar" to the beginning of bin/idea64.vmoptions.
It should work: https://youtrack.jetbrains.com/issue/IDEA-152207 Did you use Help | Edit Custom VM options action to modify the .vmoptions file?
Please also check that you have linux.native.menu=true property set (use Help | Edit Custom Properties action).
I had not added the linux.native.menu=true property set. I have now set both the VM Option and the Property, using the actions from the Help menu.
Now that I've added these, I'm finding that Unity menu integration works just fine if I start IDEA from the command line, but doesn't work if I use the launcher entry that IDEA created when I first started it. Can you think of any reason this might be?
The launcher entry reads:
I had not added the linux.native.menu=true property set.
I'm finding that Unity menu integration works just fine if I start IDEA from the command line, but doesn't work if I use the launcher entry that IDEA created when I first started it. Can you think of any reason this might be?
Name=IntelliJ IDEA Community Edition
Comment=The Drive to Develop
Did you try to lock IDEA icon in dock area? It also should work just fine.
I have locked the icon generated by Tools -> Generate Desktop Entry to my launcher.
Even so, Unity menu integration only works when I start IDEA from the command line. When I start IDEA using the launcher icon, there is no Unity menu integration.
Just checked 2016.3.4 with “-javaagent:/usr/share/java/jayatanaag.jar” line added to IDEA custom VM options (Help->IDEA custom VM Options) The integration works for the launcher entry
Just upgraded to 2016.3.4 and recreated the launcher icon from Tools -> Generate Desktop Entry. Not sure which of these actions fixed the issue, but Unity menu integration now works from the launcher entry!
Thanks for all your help!
I am using 2017.1.1 and can't get ubuntu global menu working.
Please share your .vmoptions.
Do you have `/usr/share/java/jayatanaag.jar` file?
Yes, I have it.
@Jvalencia Please mention that you are running Ubuntu 17.04, there was a change in it that's causing the global menu not to work, on 16.XX the global menu works for all versions of the IDE (I have tried it with all recent versions of WebStorm).
Yes I am using Ubuntu 17.04, sorry I forgot to mention.
Please follow https://youtrack.jetbrains.com/issue/JRE-302 for updates.
Opera has same issue, this fixes i for me:
cat >> ~/.profile <<GLOBALMENUFUX
# use Unity instead of Unity:Unity7
Alexey Ushakov your solution work fine to me. Thank you.
This is the error I get, after editing idea64.vmoptions and adding linux.native.menu=true in Custom properties.From this, the global menu is just cosmetically available but the menu doesn't provide any action after launching from command line.I think this error log can be of some help.
Did you add "-javaagent:/usr/share/java/jayatanaag.jar" in your custom properties? My Custom Properties have this configuration:
Yes, It doesn't work !
Our global menu integration based on jayatana library that unfortunately does not work with other desktops. We're going to provide more general solution in the future.
It's working in other desktops, like on gnome-shell for example, just the problem is that what jayatana is exported are pure checkboxes. This occurs from the non Unity desktops. Please see the issue in gnome shell:
And also see the same issue in Mate, xfce and more desktops:
The solution is probably, don't check for Unity only and instead, just check for the presence of jayatana.
I'm using phpstorm installed from a snap. I have tweaked both vmoptions and properties and it doesn't work straight away.
However. If I run phpstorm from the command line like so:
env XDG_CURRENT_DESKTOP=Unity phpstorm
Then it works. Is there perhaps some check for this environment variable within PhpStorm itself? The default value for unity is now Unity:Unity7:ubuntu
I can't just change this value globally on my profile as it has knock on effects elsewhere, and static .desktop files are problematic when using snaps.
>I can't just change this value globally on my profile as it has knock on effects elsewhere, and static .desktop files are problematic when using snaps.
If you can not modify your profile environment try adding the environment variable in IDE .sh script.
Add "export JAYATANA_FORCE=true" to .profile file in your home directory. It's working. But search/replace inputs not working. Any idea?
Please check the issue with IDEA 2018.3 EAP: https://www.jetbrains.com/idea/nextversion/
Latest EAP build working like expected. But I need to wait final release. too many exception occurring.
To enable global menu integration in the latest EAP (183.3283.2) you need start IDE with key: linux.native.menu=true