0

So I'm pretty new to ubuntu and I'm trying to make a simple bash script that all it does is running Rubymine so I don't have to write it down in the command line everytime and also so I can have it on the desktop. The code I have in there is:

    #!/bin/bash
    sudo 'opt/Ruby Mine/bin/rubymine.sh'

It is marked to execute as a program but everytime I try to open it it just opens with gedit.

Noboruu
  • 103

1 Answers1

2

Open Nautilus, Top menu, Edit -> Preferences -> Behaviour

Change View executable text files when they are opened to either Run executable text files when they are opened (warning: Potentially dangerous!) or Ask each time

PhilB
  • 111
  • Thanks, but why is it potentially dangerous? Is it because I can download some file that can harm my computer? – Noboruu Feb 03 '16 at 23:34
  • Right. If you somehow end up putting an executable file that you don't know the contents of somewhere and double-clicking it...you'll end up executing it!

    Only you can decide if that's worth the risk to you or not. I wouldn't personally worry about it, hence only potentially dangerous (if you're in the habit of double-clicking executables you don't know!)

    – PhilB Feb 03 '16 at 23:35
  • Well now it opens but for some reason as soon as I enter the password it closes and doesn't open the program :P can you help me with that too? – Noboruu Feb 04 '16 at 00:15
  • It really depends what the rubymine.sh does. The terminal will close as soon as execution is done. Try putting a read statement after the rubymine command:

    http://stackoverflow.com/questions/92802/what-is-the-linux-equivalent-to-dos-pause

    – PhilB Feb 04 '16 at 05:49