2

Whenever I try to run this command

sh /opt/Aptana_Studio_3/AptanaStudio3.sh 

for the Aptana Studio 3 from root directory it shows that

/opt/Aptana_Studio_3/AptanaStudio3.sh: 3: /opt/Aptana_Studio_3/AptanaStudio3.sh: ./AptanaStudio3: not found

but when i go to the directory it is executed easily.

Since I made shortcut for the given file and it shows

there was error launching the application and so i think the error as in the above command could be the reason for this. If There is something else please let me know.

Code For Desktop Entry

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Aptana Studio 3
GenericName=Integrated Development Environment
Comment=Aptana Strudio 3 Integrated Development Environment
Exec=/opt/Aptana_Studio_3/AptanaStudio3.sh
TryExec=/opt/Aptana_Studio_3/AptanaStudio3.sh
Icon=/opt/Aptana_Studio_3/AS3.png
StartupNotify=true
StartupWMClass="Aptana Studio 3"
Terminal=true
Type=Application
MimeType=text/xml;application/xhtml+xml;application/x-javascript;application/x-php;application/x-java;text/x-javascript;text/html;text/plain
Categories=GNOME;Development;IDE;

So I need your help to figure this and make a working desktop entry for this program

Danatela
  • 13,581
  • 11
  • 44
  • 70
user266138
  • 43
  • 4
  • Can you clarify a little bit? Do you mean when your current working directory is /root or when you are logged in as root it will not work? And when you `cd` to the directory and run `AptanaStudio3.sh ` it does run? I think that's what you mean. Are you logged in root? Do you need to be? How did you log in root? I may be able to better answer your question with some clarity. – Chev_603 Apr 07 '14 at 05:39
  • ohk.....I one terminal and then simply type the command i.e. sh ./opt/Aptana_Studio_3/AptanaStudio3.sh Then It Shows me the error no such file or Directory all these commands are without sudo.. Secondly when change directory to the folder and then run ./AptanaStudio3.sh it works perfectly – user266138 Apr 10 '14 at 04:16

1 Answers1

0

Open /opt/Aptana_Studio_3/AptanaStudio3.sh script.

sudo gedit /opt/Aptana_Studio_3/AptanaStudio3.sh

There should be the line (apparently, the 3rd) which actually launches Aptana Studio. Change it to /opt/Aptana_Studio_3/AptanaStudio3. The reason is there should be absolute path, not relative.

Danatela
  • 13,581
  • 11
  • 44
  • 70