12

I used to launch Android Studio by this steps:

  1. Open Android Studio folder.
  2. Open terminal there.
  3. Confirm sh studio.sh command.

Can I lauch Android Studio from the Desktop by the 1 click?

Anwar
  • 76,649
  • Possible duplicate. Give importance to the line: Exec=/home/samuel/ugene-1.11.5/ugene -ui. In your case change it to path to your script. Also, change the other relevant lines. – Raphael Sep 10 '16 at 04:38

3 Answers3

14

Create a file ( Desktop File ) with this content:

[Desktop Entry]
Version=1.0
Name=Android Studio 
Type=Application 
Icon=/PATH/TO/ICON/studio.png 
Exec=/PATH/TO/studio.sh 
Keywords=ide;android;studio;

Change /PATH/TO/ICON/studio.png and /PATH/TO/studio.sh accordingly.
save the file as: android-studio.desktop in /usr/share/applications

Now you'll be able to search in the Dash for Android Studio


Android-Studio helps you of creating this entry file, within the Android Studio Welcome Page, tap the Settings icon and then, Create Desktop Entry..., the file will be created at ~/.local/share/applications/ path.

Benny
  • 4,920
  • 4
    For whatever reason it is not working for me. I tried to write the path only with path/to/studio.sh and path/to/sh studio.sh Either way, not working and not able to launch from desktop icon – Nandete82 Jun 28 '20 at 19:19
  • 1
    It worked, but after I change the file permissions to 644 with chmod 644 file.desktop and I also had my Exec= path not right, and when I fixed it to the correct path, the "Allow launching" appeared and I was able to add it as a favorite in the launcher. – Frederiko Ribeiro Jan 13 '21 at 00:26
6

The easiest and fastest way to do this is:

after you open the program the same way you mentioned, right click on the program (from the programs bar/menu bar on the left) and click "Lock to Launcher".

Tms91
  • 365
Maldini
  • 140
  • 1
  • 8
  • Cannot find. Where is bar/menu ? On the left I clicked icon but nothing happens, so maybe I do in wrong place. https://imgur.com/a/Dgapg98 – Darius.V May 22 '23 at 11:20
2

I use this :

sudo apt-get install alacarte

I want to create launcher for Android Studio, This is the simple way : enter image description here

Open Alacarte. Choose New Item

enter image description here

Choose .sh File and Logo.. and Done.

enter image description here

toha
  • 121
  • 1
    Very easy! Thank you. – Rodrigo Jardim Jul 06 '22 at 13:03
  • E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 2292429 (aptd) N: Be aware that removing the lock file is not a solution and may break your system. E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it? – Darius.V May 22 '23 at 11:20
  • https://www.linuxsec.org/2018/12/mengatasi-error-e-could-not-get-lock.html – toha May 22 '23 at 18:22