Android Studio desktop shortcut
If you place Android Studio in /usr/share/applications
or any folder except your home user folder, you will need root privileges to execute the program.
In fact, if you try to execute in terminal <folder where you installed Android Studio>/android-studio/bin/studio.sh
, you will be asked to enter root password. Yet, if you click on the icon of Android Studio nothing happens (nor password requests).
One way to avod this is to prompt a dialog box where to enter password.
Install gksu by typing in terminal sudo apt-get install gksu
;
then edit your desktop file and in Exec entry write gksu /<folder where you installed Android Studio>/android-studio/bin/studio.sh
.
Related videos on Youtube
rainman
Updated on September 18, 2022Comments
-
rainman over 1 year
I made an android desktop file in ubuntu 15.04 as follows:
[Desktop Entry] Version=1.0 Type=Application Name=Android Studio Exec="/home/user/android-studio/bin/studio.sh" %f Icon=/home/user/android-studio/bin/studio.png Categories=Development;IDE; Terminal=false StartupNotify=true StartupWMClass=jetbrains-android-studio Name[en_GB]=android-studio.desktop
it shows the icon, and everything seems to be fine, but when i try to open it, does not open, with no error message. i have android studio version 1.3 preview
this is the output of
ls -la /home/user/android-studio/bin/studio.sh
-rwxrwxr-x 1 user user 6273 may 29 22:43 android-studio/bin/studio.sh
-
A.B. almost 9 yearsYour desktop file is ok. Edit your question and add the output of
ls -la /home/user/android-studio/bin/studio.sh
and try to start Android Studio in a terminal with/home/user/android-studio/bin/studio.sh
and post the output also in your question. -
rainman almost 9 yearsfrom terminal it starts normaly, i don't know why not from the .desktop
-
A.B. almost 9 yearsOnly an idea, try this
Exec=/home/user/android-studio/bin/studio.sh
in the desktop file. -
rainman almost 9 yearsit does not work.
-
A.B. almost 9 yearsThe desktop file is a little too big. Remove the file and create a new one with the lines posted in your question. My file has only 286. You have 6273.
-
rainman almost 9 yearsnow it has 269 and still does not start, thank you anyway.
-
A.B. almost 9 yearsPlease post the output of
ls -la ~/.local/share/applications/android-studio.desktop
, assumedandroid-studio.desktop
is your desktop file. -
rainman almost 9 yearsi have no desktop file for android studio in the location ~/.local/share/applications/ , should it be there ?
-
A.B. almost 9 yearsWhere is your desktop file?
-
A.B. almost 9 yearsLet us continue this discussion in chat.
-