static const char*
GetDialogCommand(void)
{
if (system("which zenity > /dev/null 2>&1") == 0) {
return "zenity";
}
if (system("which dialog > /dev/null 2>&1") == 0) {
return "dialog";
}
if (system("which whiptail > /dev/null 2>&1") == 0) {
return "whiptail";
}
if (system("which yad > /dev/null 2>&1") == 0) {
return "yad";
}
if (system("which kdialog > /dev/null 2>&1") == 0) {
return "kdialog";
}
return NULL;
}for those who cant smell the code this is like, rotting corpses level.
RE: https://social.treehouse.systems/users/ariadne/statuses/115702490074497940