I have a very simple shell script to stop the Apache server:

#!/bin/bash
sudo /usr/sbin/httpd -k stop

I named it "StopApache.sh". When I run it from the command line, it stops Apache. However, when I double click the "StopApache.sh" icon on the Desktop, I'm asked whether I want to run or display it, I pick "Run", but the Apache Server doesn't stop.

How do I get a script which successfully executes at the command line to run when clicked?

I'm running CentOS 2.16.0.

When you run from CLI, are you typing the command in the file or ./StopApache.sh? It could be that your permissions are wrong on the file.

chmod u+x StopApache.sh

should give your file execute permission for the owner.

This is a desktop icon problem, quite appropriate here, IMHO. The same sort of issue can occur in any multi-user OS.

package you can type in
internet ie trap17
or if ie is default you can type in internet trap17.com
and if .com is default and you turned on short cmds then you can type in
i trap17 (or the bookmark name such as "i t17"

Yet another thing
For firefox you put
@start /b "firefox.exe" %*

For internet exlorer you only need to put in
@start /b "iexplore.exe" %*

There is a lot more that i can say but i don't have the time to put it all here
SNIP

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.