LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 09-08-2009, 02:52 PM   #1
rabiticide
Member
 
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?

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

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:
Code:
#!/bin/bash
 
Old 09-08-2009, 06:50 PM   #3
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
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, 10:41 PM   #4
rabiticide
Member
 
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
 
  


Reply


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 10:19 AM
How to change the script of an executable? Nishant Desai Programming 8 03-01-2007 12:20 AM
How to change the script of an executable? Nishant Desai Programming 1 02-26-2007 08:44 AM
Making an executable/path into a command kc0ltv SUSE / openSUSE 2 01-22-2006 02:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:54 AM.

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