Script works in terminal but not from Nautilus, very frustrating!

C de-Avillez hggdh2 at ubuntu.com
Sun Jan 11 22:36:25 UTC 2015


On Sun, 11 Jan 2015 16:01:33 -0600
Tommy Trussell <tommy.trussell at gmail.com> wrote:

> On Sun, Jan 11, 2015 at 12:58 PM, Johnny Rosenberg
> <gurus.knugum at gmail.com> wrote:
> >

(...)

> > Any ideas?
> > The only line that doesn't seem to work in my script when run from
> > Nautilus, is that ”megals” line, everything else seems to work.
> 
> 
> This is just a guess -- I haven't done a lot of shell scripting in
> Nautilus, but one thing I ALWAYS have done is specify the shell in the
> script. If you prefer Bash, make sure the first line is
> 
> #!/bin/bash
> 
> I am not sure what shell the scripts will run in from Nautilus when
> you don't specify your shell. When you run scripts in the terminal, I
> believe whatever shell you normally use is assumed.
> 

It might also be a good idea not to assume that your login environment
is present when the script is called from Nautilus. Maybe Nautilus
cleans up the environment before calling the script.


-- 
ab alio expectes alteri quod feceris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20150111/3f349a3e/attachment.sig>


More information about the ubuntu-users mailing list