6

I wanted to add Android studio to the i3dmenu in: /usr/share/applications with the file android-studio.desktop containing:

[Desktop Entry]
Version=1.0
Type=Application
Name=android-studio
Exec="/usr/local/android-studio/bin/studio.sh" %f
Icon=/usr/local/android-studio/bin/studio.png
Comment=The Drive to Develop
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-studio

Can somebody tell me why the i3-dmenu still doesn't find android-studio?

I can confirm that the file is readable for everybody.

  • Is the file owned by root? (I don't know if it matters or not.) – Gilles May 22 '17 at 23:37
  • Yes it is: -rw-r--r-- 1 root root 265 Mai 21 13:23 android-studio.desktop Like all other .desktop files. – AlKappa May 23 '17 at 7:55
2

For the sake of completeness, i3-dmenu-desktop is searching for every binary in $PATH and for .desktop files in $XDG_DATA_HOME/applications[...]. Problem was, the $XDG_DATA_HOME variable was not set in my environment.

  • if XDG_DATA_HOME is not set, it defaults to $HOME/.local/share. i3-dmenu-desktop also searches any applications subdirectories of directories listed in XDG_DATA_DIRS, which defaults to /usr/local/share:/usr/share, if unset. (Hence /usr/share/applications). – Adaephon Jun 16 '17 at 9:56
0

dmenu can find applications in /bin/

So you can just create a symbolic link to the path of studio.sh, which would be

sudo ln -s /usr/local/android-studio/bin/studio.sh /bin/android-studio

in your case.

Now you can search for android-studio in dmenu to launch it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.