Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-08-2009, 01:52 PM   #1
Registered: Dec 2008
Posts: 42

Rep: Reputation: 15
making script executable

I am running both Ubuntu and Scientific Linux (which is just RedHat rebranded, I think). I have a small shell script on both desktops called nowire.

For both, I did chmod +x nowire

when I click in ubuntu, the shell script runs
when I click in redhat, the file opens in a wordprocessor, not matter what I do.

ubuntu has gnome and the redhat has kde, which may be the problem (?) but i want the script to run in scientific linux/kde. what am I missing?

Old 09-08-2009, 02:04 PM   #2
TBC Cosmo
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 356

Rep: Reputation: 43
What happens in SL when you try to execute from a terminal session? Also, Is there a path to the interpreter in the very top of script? example:
Old 09-08-2009, 05:50 PM   #3
Senior Member
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
In the "problem" Linux, check the file association settings. (It's somewhere in the "system settings" application, IIRC. I'm using KDE 4.3.1 under Fedora 12 right now, and it's under "Advanced User Settings"->Application->x-executable, where the application list is empty, but the "left-click" action is to show the application in the "viewer.") Anyhow, compare the setting with what's in the similar association setting on your Ubuntu system. I suspect that all you'll need to do is add "bash" to the list of programs to use to open the executable.
Old 09-08-2009, 09:41 PM   #4
Registered: Dec 2008
Posts: 42

Original Poster
Rep: Reputation: 15
#!/bin/bash worked

I couldn't find any advanced user settings (I'm kde 3.5) but the other suggestion worked


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
making script executable; getting no such file or directory madwida Slackware 4 10-08-2008 09:19 AM
How to change the script of an executable? Nishant Desai Programming 8 02-28-2007 11:20 PM
How to change the script of an executable? Nishant Desai Programming 1 02-26-2007 07:44 AM
Making an executable/path into a command kc0ltv SUSE / openSUSE 2 01-22-2006 01:28 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:26 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration