Possible Duplicate:
Custom Ubuntu launcher doesn't launch

I used How to pin Eclipse to the Unity launcher? this to pin Eclipse to unity launcher. But now I need to replace eclipse binary with script in order to use custom gtk config. Here is a sh file(named ec):

GTK2_RC_FILES=gtkrc-sar ./eclipse

And here's desktop file:

[Desktop Entry]
Comment=Eclipse Integrated Development Environment

If I replace eclipse(binary name) with ec(sh name), It won't run. How do I fix this?

marked as duplicate by Jorge Castro, Thomas Ward, Takkat, jrg Sep 2 '12 at 20:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Did you make ec executable? – Chan-Ho Suh Sep 2 '12 at 13:57
  • @Chan-HoSuh yes, but if I double-click it, I get a dialog asking what to do with it(run, view) every time. – Igor Filippov Sep 2 '12 at 13:58
  • Just to make sure, your shell script name is ec, not ec.sh, right? Also, if you're using Nautilus, on double-click it will ask what to do with a shell script, since it's also considered a text file. So I don't think that's related to your problem. – Chan-Ho Suh Sep 2 '12 at 14:08

Give the execute permissions to the shell script and make the terminal=true

  • I've done that, if I set terminal=true, it only opens a terminal window for a second and then closes it. – Igor Filippov Sep 2 '12 at 14:15
  • What happens when you try to run that shell script manually on the terminal? – devav2 Sep 2 '12 at 14:27
  • eclipse is launched. – Igor Filippov Sep 2 '12 at 15:23

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