Well good for you, use busybox ash then (don't think it worked so well when tried on mistfire's TazPup but maybe those testing it didn't test it as well as you. Interesting though, and I presume you have checked that your /bin/ash is indeed a link to busybox ash and not to bash (maybe others could confirm with their busybox ash?). It doesn't work on dash but you don't need it so that's fine. You've made your point again, and thanks. Actually, maybe it does - can't test at the moment since on wrong machine.MochiMoppel wrote:Somehow Thunor's suggestion seems to work for me.wiak wrote:Thunor got it wrong thinking/suggesting in his linked post above that another solution was to use bash -c before actions in gtkdialog - his suggestion simply doesn't work for legacy gtkdialog
Tested with legacy gtkdialog, /bin/sh linked to /bin/ash.Don't know if dash would behave differently from busybox ash.Code: Select all
#!/bin/bash func_bash() { SYSHELL=$(realpath /bin/sh) gxmessage $(cat <(echo "/bin/sh points to $SYSHELL")) }; export -f func_bash echo '<button label="Call exported function"> <action>bash -c func_bash</action> </button>' | gtkdialog -s
"bash -c" is also be required when running above script in a standard sh/bash environment.
But if others don't have success when now trying their busybox ash, maybe you would be kind enough to post a link to your version so they can try that?
It may be that you are piping into gtkdialog from bash script so function visible at that time (I haven't thought about it as yet). Show a similar example with typical gtkdialog reading from environment variables, which is main problem we are trying to solve really and I will abandon gtkwialog as unneeded.
wiak
EDIT: Above bash -c suggestion only works on busybox ash, NOT on dash-based systems, hence one of many other reasons for there being a continuing need for gtkwialog.