Re: Running shell scipts from GNOME

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/22/05, Ian Puleston <ian@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> Hi,
> 
> I have FC4 test 2 installed on my PC, so this could be a bug in that,
> but I'd like to know if it's something that works OK in a stable release
> (note I couldn't install FC3 due to a couple of bugs that are fixed in
> FC4, hence the reason that I'm using the test release).
> 
> What I'm trying to do is have a shell script executed by double-clicking
> the file icon in GNOME's Nautilus file browser. I have the following
> simple shell script named tst.sh and with "+x" attributes:
> 
> #!/bin/sh -f
> echo Hello there
> read -p "Hit return: " tmpvar
> 
> The default action for this file under Nautilus is "Open with Terminal",
> but when I double-click it or select "Open with Terminal" from its menu
> I just get a spinning hourglass for 30 seconds or so. If I then return
> to the main console screen (Ctrl-Alt-F1) I see the following warning was
> reported:
> 
>    Invalid argument: /home/ian/ZPT Test/Results/r1-GS-hv/tst.sh
> 
> Ideas anyone?
> 
> Ian

Hi Ian,

Looks like there is an un-escaped space in there: "ZPT Test"  Try
copying the file to /home/ian/ and running it again from Nautilus.  If
it works, then this is a bug, Nautilus is not escaping the space or
using some other work-around.  The shell thus sees /home/ian/ZPT and
Test/Results/r1-GS-hv/tst.sh seperately, which of course will not
work.  Generally, spaces in file/directory names should probably be
avoided (escaping can get nasty), though, it should be able to handle
them.

Jonathan


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux