Page 1 of 1
error when exporting a function in gtkdialog
Posted: Tue 18 Jun 2013, 06:18
by hannysabbagh
Hello.
i have this error when i try to export a function in gtkdialog 0.8.2:
here is the line 12:
here is theme_list function:
Code: Select all
theme_list() {
ls -d /usr/share/themes/*/gtk-2.0 | awk -F"/" '{print $5}'
}
any help?
thanks.
Posted: Tue 18 Jun 2013, 06:55
by amigo
What shell is being used -what is the first line of the script? Sounds like you are using ash instead of bash.
Posted: Tue 18 Jun 2013, 07:15
by hannysabbagh
i use #!/bin/sh
Posted: Tue 18 Jun 2013, 08:06
by akash_rawal
My testing:
Code: Select all
# #Current shell is bash
# theme_list() {
> ls -d /usr/share/themes/*/gtk-2.0 | awk -F"/" '{print $5}'
> }
# export -f theme_list
# #No problem
#
# #Retrying with ash...
# ash
# theme_list() {
> ls -d /usr/share/themes/*/gtk-2.0 | awk -F"/" '{print $5}'
> }
# export -f theme_list
ash: export: illegal option -f
#
So changing #!/bin/sh to #!/bin/bash should solve the problem. But you will have to sacrifice a bit in portability.
Posted: Tue 18 Jun 2013, 09:01
by hannysabbagh
Hello.
i can run the program if i changed it to bash, the problem is that my function won't work if i did that
is there anyway to keep my function working? because i use it in a combobox as an input, if i changed it to bash, the input won't show anything.
thanks.
Posted: Tue 18 Jun 2013, 17:57
by Karl Godt
There had been issues with racy-5.2 gtk-2.24.5 using the <combobox> tag .
<comboboxtext> is the newer, not deprecated, tag .
<comboboxtext> might work with gtkdialog4 , not with gtkdialog3 .
Posted: Tue 18 Jun 2013, 18:31
by hannysabbagh
Thanks.
i did that but it still the same,
by the way, i am on Ubuntu 13.04 and i use gtkdialog 0.8.2
thanks.
Posted: Tue 18 Jun 2013, 18:36
by hannysabbagh
Hi agian.
the problem has been fixed.. i don't know how!
i just tried to run the code more often times.. and it worked alone!
LOL!
Thank you all for your help.