Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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):

#!/bin/sh
GTK2_RC_FILES=gtkrc-sar ./eclipse

And here's desktop file:

[Desktop Entry]
Type=Application
Name=Eclipse
Comment=Eclipse Integrated Development Environment
Icon=/home/mighter/development/eclipse/icon.xpm
Exec=/home/mighter/development/eclipse/eclipse
Terminal=false
Categories=Development;IDE;Java;

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

share|improve this question

marked as duplicate by Jorge Castro, Thomas W., 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. –  Mighter 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
add comment

1 Answer 1

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

share|improve this answer
    
I've done that, if I set terminal=true, it only opens a terminal window for a second and then closes it. –  Mighter 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. –  Mighter Sep 2 '12 at 15:23
add comment

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