Jayatana worked fine for me on Ubuntu 16.10, but after upgrading to 17.04 the menu of Android Studio doesn't merge with the Ubuntu title bar Anymore.

When starting Android Studio via terminal there are also no messages about jayatana.

I have jayatana installed (obviously) and the: -javaagent:/usr/share/java/jayatanaag.jar line added to:

  • ./android-studio/bin/studio64.vmoptions
  • ./.AndroidStudio2.3/studio64.vmoptions

Is this a bug in Ubuntu 17.04 or am I missing something here? Anyone else having troubles making this work?


2 Answers 2


Ubuntu 17.04 has a different value for XDG_CURRENT_DESKTO env variable


So changing it back to the following fixes the problem, I don't know other side effects this might have


Please refer to: After upgrade to Ubuntu 17.04 integrated menus do not work for updates.

  • 1
    It works but unity-control-center only shows some elements and sometimes the Unity Dash is not loaded. We will have to wait for a deeper solution ...
    – jsartti
    Commented Apr 21, 2017 at 16:01
  • Thanks, this works! Android Studio has the global menu back. I accepted your answer. Commented Apr 22, 2017 at 19:35
  • What about Ubuntu 18.04? I tried with export XDG_CURRENT_DESKTOP=Unity, but it doesn't work 🙁
    – garakkio
    Commented Jun 8, 2018 at 11:50

After trying many options, this reply solved the problem:

comment link


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .