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

Johnny Rosenberg gurus.knugum at
Mon Jan 12 19:44:17 UTC 2015

2015-01-12 0:00 GMT+01:00 Karl Auer <kauer at>:

> On Sun, 2015-01-11 at 16:36 -0600, C de-Avillez wrote (quoting someone
> else):
> > > > 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.
> If just one line doesn't work, then the script is running. That leaves
> the environment - especially the path - and non-escaped characters...
> you have a few quotes in there that might need escaping.

I'm not sure I know what lines you are referring to.
Remember that those lin I quoted work when I run it in a terminal.

Before I got home after work to read my mail I actually think I suddenly
knew what was wrong, but I didn't do any tests yet. I think it could be an
environment thing, just like you and C de-Avillez mentioned. The megals
command, and all the other MegaTools commands requires login and password.
To avoid hard coding that, I use the ~/.megarc file, and it lookd like this:

Username = myname at
Password = blahblahblahblahblah

The rights are set to rw- --- ---

Anyway, I suspect that megals doesn't read the ~/.megarc file when run from
Nautilus, so I probably only get an authorisation error, which I can not
see since there is no terminal… Maybe I can, and should, pipe it to yad (a
great Zenity fork that I use a lot).

I think I can specify the rc file when running the command. If not, I can
always use the --user and --password flags to enter it in the script (just
for testing). Other ideas are welcome, of course…

Maybe this isn't what is the problem at all, I'm only guessing here, but I
will find out… but right now I'm hungry…

Kind regards

Johnny Rosenberg

> Regards, K.
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Karl Auer (kauer at
> GPG fingerprint: 3C41 82BE A9E7 99A1 B931 5AE7 7638 0147 2C3C 2AC4
> Old fingerprint: EC67 61E2 C2F6 EB55 884B E129 072B 0AF0 72AA 9882
> --
> ubuntu-users mailing list
> ubuntu-users at
> Modify settings or unsubscribe at:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ubuntu-users mailing list