use g_strdup_printf(); cmd_length