Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: Misalf on April 21, 2014, 09:26:40 AM

Title: aterm-xterm wrapper script ignores quotes
Post by: Misalf on April 21, 2014, 09:26:40 AM
/usr/local/bin/aterm-xterm  wrapper script, included in aterm.tcz and issued by the symlink  /usr/local/bin/xterm , doesn't pass quotes to aterm.

Trying to lauch Terminal Server from Control Panel results in aterm not understanding parameters, which include the TITLE option with quotes (-T ""):
Code: [Select]
xterm -bg black +tr +sb -T "Terminal Server Setup" -e sudo /usr/bin/tc-terminal-server &

Code: [Select]
aterm: bad option "Server"
aterm: bad option "Setup"

Usage v1.00.01 ...
Title: Re: aterm-xterm wrapper script ignores quotes
Post by: Misalf on May 09, 2014, 01:50:28 PM
The workaround for me currently is to have a symlink pointing to  /usr/local/bin/aterm  saved as  ~/.local/bin/xterm .

I tryed to modify the wrapper script so that quotes included in parameters would be shipped over to aterm but I failed.
Does anyone have a solution in terms of scripting rather than ignoring the wrapper script by an additional symlink?
Title: Re: aterm-xterm wrapper script ignores quotes
Post by: gerald_clark on May 09, 2014, 02:27:22 PM
Replace "Terminal Server Setup" with Terminal_Server_Setup.
Title: Re: aterm-xterm wrapper script ignores quotes
Post by: Misalf on May 09, 2014, 02:41:37 PM
It's hard-coded in  /usr/local/bin/cpanel  which is part of  Xprogs.tcz .

--

I probably should have posted this in TCE Bugs since anything that starts xterm with quoted parameters will lead to aterm to fail launching.
Title: Re: aterm-xterm wrapper script ignores quotes
Post by: gerald_clark on May 09, 2014, 03:46:37 PM
The "xterm" wrapper in aterm.tcz  should be changed to:
--------------------------------------------------------------------------
#!/bin/busybox sh

###########################################
# aterm xterm wrapper for Tiny Core Liux 5.x
# By bmarkus
# v1.0 - October 17, 2013
###########################################

aterm +tr "$@"
Title: Re: aterm-xterm wrapper script ignores quotes
Post by: bmarkus on May 09, 2014, 03:58:25 PM
Thanks, will take a look.