6
1
GUI:
I changed the permissions of an sh file, so that I can read, write and execute it.
I double-clicked it, selected run in Shell / terminal (whichever appears in english), but it didn't run.
I double-clicked it, selected run, but it didn't run.
Command-Line:
bash *filename*
runs it
sh *filename*
runs it
The file content is:
#!/bin/bash
# get dirsyncpro home
DIRSYNCPRO_HOME="$(dirname $0)"
# start programm and pass any parameters
java -Xmx512M -jar "$DIRSYNCPRO_HOME/dirsyncpro.jar" $*
Works in this person's computer:
http://www.knowliz.com/2008/08/how-to-installrun-sh-file-in-linux.html
What's going on?
2i think "Terminal" in this context is a Gnome/freedesktop capability, not a specific application. similar to Apt's concept of virtual packages, gnome-terminal and urxvt and other packages "provide" the Terminal capability. my karmic VM is currently offline but i think such capabilities are defined in the *.desktop files under /usr/share/applications or similar. – quack quixote – 2010-04-15T03:20:20.533
Terminal in brazilian porguese may be Shell in american english. It's where you type Linux commands. – Delirium tremens – 2010-04-15T14:04:11.187
1@Delirium: no, shell is something different. terminal is what displays the output of command-line programs; shell is what provides and interprets the command-line. gnome-terminal and PuTTY are terminals; bash and tcsh are shells. where you type linux commands generally includes both a shell and a terminal. – quack quixote – 2010-04-15T14:10:15.233
Googling for double click sh results in "I could run the script from terminal." - http://www.linuxforums.org/forum/redhat-fedora-linux-help/160662-shell-script-execution-double-click.html "You'd run in in a terminal." - http://ubuntuforums.org/archive/index.php/t-1107371.html "Its intended to be used through terminal:" - http://cerebrux.comli.com/2clickupdate/english-version/ "how can I make it so that it runs in a terminal" - http://www.linuxquestions.org/questions/linux-general-1/running-sh-script-by-double-clicking-52229/ People are using Terminal all the time. How come it's wrong?
– Delirium tremens – 2010-04-15T14:19:27.9501@Delirium: they're just two closely related, but distinctly different things. the terminal gives you a window to run the shell in; the shell interprets your command and runs other programs; the terminal displays what those programs output. – quack quixote – 2010-04-15T14:38:36.293
@Delirium tremens: I don't think its wrong. What I think is wrong is that your desktop manager doesn't really know what do with it when you double click it. There is a bad association with what program to run when you double click on a .sh file. – Bryce – 2010-04-15T22:58:32.690