Menu

#575 unexpected behaviour with -e option

None
closed-fixed
nobody
lxterminal (81)
5
2015-05-10
2013-03-15
Anonymous
No

Sample Script:

#!/bin/sh

while [ $# -gt 0 ]
do
echo "\"$1\""
shift
done

If I execute "sample.sh *", filenames and directories are echoed propperly. If I pass it to a terminal via "lxterminal -e sample.sh *", all files with spaces in its name are parted. Instead of "A File.ods" it echoes "A" "File.ods". Tried it with dash and bash on Debian Wheezy and OpenSuse 12.2.

Discussion

  • Sworddragon

    Sworddragon - 2014-05-15

    I'm having the problem too that lxterminal does split quoted arguments on spaces. Here is an example with a desktop file:

    [Desktop Entry]
    Exec=lxterminal -e /tmp/test.py %F
    MimeType=inode/directory;
    Name=Test
    NoDisplay=true
    Type=Application
    

    Targeting a directory with spaces will now be split into too much arguments. I have tested this also with xterm and it is working fine.

     

    Last edit: Sworddragon 2014-05-15
  • FinboySlick

    FinboySlick - 2014-10-13

    Should be fixed in git. Please test and report.

     
  • Sworddragon

    Sworddragon - 2015-02-18

    On testing this with LXTerminal 0.2.0 the bug doesn't appear there anymore.

     
  • FinboySlick

    FinboySlick - 2015-02-18

    The fix in 0.2.0 is actually a bit of a hack. For example, you couldn't pass a null string as an argument. I have proper fix that I'm almost done testing, should be in the next few commits. That will also solve some of the login shell issues.

     
  • FinboySlick

    FinboySlick - 2015-05-10
    • status: open --> closed-fixed
    • Group: -->
     

Log in to post a comment.