2

Hey guys, I run LinuxMint and I have some scripts which I want to run without terminal, can you tell me how?

2
  • Just put a launcher linked to the script on your desktop. Commented Dec 22, 2010 at 18:14
  • erikveenstra.nl/rubyscript2exe ? Commented Dec 22, 2010 at 21:17

1 Answer 1

5

You need to:

  • Put as the first line of your ruby script the following shebang line (so bash knows what program to use to run this file)

#!/usr/bin/env ruby

  • Make your ruby file executable. In a console you can do this:

chmod 700 my_ruby_file.rb

  • Test that your ruby file is now executable. In a console write:

./my_ruby_file.rb

Notice that we are no longer calling "ruby my_ruby_file.rb", but instead just call the file directly "./my_ruby_file.rb" If your ruby program executed normally, then everything is going well. If it does not execute and shows you an error, then something is not well done from the previous steps (and post your error)

  • In your desktop, create an application link, and point it to the my_ruby_file.rb Once you have the application icon created and shown in your desktop, you can doble-clickit and it will run your application.

Tell us how it went- cheers

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.