Re: Running shell scipts from GNOME

From: Jeff Vian (jvian10_at_charter.net)
Date: 05/23/05

  • Next message: Dotan Cohen: "Re: Installing binaries"
    To: For users of Fedora Core releases <fedora-list@redhat.com>
    Date: Mon, 23 May 2005 01:37:24 -0500
    
    

    On Sun, 2005-05-22 at 23:41 -0500, Jonathan Berry wrote:
    > On 5/22/05, Ian Puleston <ian@underpressuredivers.com> 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.
    >

    It does not get escaped when you type it. If you use the tab-completion
    feature of the shell it auto-magically does escape the space.

    I agree with the sentiment. You should try to _not_ use spaces in
    filenames or directory names.

    > Jonathan
    >

    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Dotan Cohen: "Re: Installing binaries"

    Relevant Pages

    • RE: Running shell scipts from GNOME
      ... Ian ... > bounces@redhat.com] On Behalf Of Jonathan Berry ... >> the file icon in GNOME's Nautilus file browser. ... > avoided (escaping can get nasty), though, it should be able to handle ...
      (Fedora)
    • Re: [PHP] Using mysql_real_escape_string without connecting to mysql
      ... escaping is preparing for output. ... nothing to escape in the case of a those chars being part of a string, ... the query parser will misinterpret as a sign to end the string (before the last intend quote ... escape each peice of data for each context in which it will be output. ...
      (php.general)
    • Re: xml escapedness
      ... fragments) in an xml escaped form to avoid having the problem of escaping ... Storing XML in escaped for is always dodgy, much better to escape when necessary. ...
      (comp.lang.python)
    • Re: xml escapedness
      ... fragments) in an xml escaped form to avoid having the problem of escaping ... Storing XML in escaped for is always dodgy, much better to escape when necessary. ...
      (comp.lang.python)
    • Re: more intransitive verb business (Jim Breen)
      ... As far as this problem is concerned, you cannot escape your responsibility. ... in WWW pages seem also to be escaping from something non-concrete. ...
      (sci.lang.japan)