0

I installed Android studio, and this program starts from the studio.sh file. If I run it from the terminal it goes well, but if I double click on it, this file is opened with emacs. Why?

Radu Rădeanu
  • 169,590
giacomotb
  • 209
  • 2
  • 5
  • 11

2 Answers2

2

To run studio.sh file on nautilus,you need to create a .desktop file as below.

Filename : studio.desktop

[Desktop Entry]
Type=Application
Name=Run script
Exec='/fullpath_to_script/studio.sh'
Terminal=false
StartupNotify=true 
Encoding=UTF-8

place the studio.desktop file on desktop.On double click on this file,you will be able to execute androidstudio.sh file from nautilus.

You have to give execute permission to studio.desktop file inorder to run,

sudo chmod a+x /path/to/studio.desktop
Avinash Raj
  • 78,556
0

Why? Because of:

Nautilus preferences

So, when you are in Nautilus, go to FilesPreferences, select Behavior tab and where is Executable Text Files field select Ask each time, or simple Run executable text files when they are opened.

Radu Rădeanu
  • 169,590