I didn’t explain clear enough. So, again.
Menu_Select=$(kdialog --radiolist "SCANVIRUS: Main Menu" 1 "Scan Systems" on 2 "Scanlog Menu" off 3 "View Menu" off 4 " " off 5 "Kill All Scans" off 6 " " off 7 "Show Help Menu" off)
-->No protocol specified
-->QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
-->QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
I’v searched for those messages. I can’t find a clear answer on what they are or how to fix them.
# echo $(kdialog --title "SCANVIRUS: Main Menu" --yesno "Kill All Scans")
No protocol specified
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
There is no returned number on selecting ‘no’.
# echo $(kdialog --title "SCANVIRUS: Main Menu" --yesno "Kill All Scans")
No protocol specified
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
There is no returned number on selecting 'yes". It should return ‘1’(or some value).
This is a bug in the function. All other functions return a value
echo $(kdialog --title "SCANVIRUS: Main Menu" --yesno "Kill All Scans" && echo 1)
No protocol specified
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Press ‘no’, returns nothing.
# echo $(kdialog --title "SCANVIRUS: Main Menu" --yesno "Kill All Scans" && echo 1)
No protocol specified
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
1
Press ‘Yes’, returns nothing.
You have to add the ‘&& echo 1’ to make it work. This is either design flaw or bug in this function.