Re: Bash-script – doesn't work in a launcher
dreadpiratejeff at gmail.com
Sat Dec 31 17:11:05 UTC 2011
On Sat, Dec 31, 2011 at 12:00, Johnny Rosenberg <gurus.knugum at gmail.com> wrote:
> I made a bash script that I want to run by clicking an icon on my
> upper panel in Ubuntu 10.10. The script runs perfectly in a terminal,
> but it doesn't do much if I start it by clicking the icon in my panel.
> I added the icon by creating a launcher the usual way.
> So I changed the launcher from ”program” to ”program in terminal” to
> be able to see what happens, if anything. I then found that it
> produces error messages at every ”let” and ”[[”, which I guess are
> bash specific, so it seems like sh is trying to run my script, not
> Of course the first line of the script is #! /bin/bash. Well, except a
> few comment lines above it, but that shouldn't matter, should it?
> So it's basically something like this:
> # Comment
> # Continuation of comment
> # Another comment
> # More comments
> The script, including some bash specific things like ”let a=b*c” and
> ”if [[ something ]]; then”.
the #! needs to be the very first line in the script. If it's placed
anywhere else, it'll be ignored.
More information about the ubuntu-users