Im working on a C++ program that can execute terminal commands for me, and one of its functions is wifi manipulation (connect, disconnect, forget). Right now I am trying to execute a wifi connection command in the terminal using the ff.:
nmcli device wifi connect <wifiName> password <password>
Above works fine in the terminal when the password is right, but it shows a popup asking for the correct password when the supplied password is wrong:
Is there a way I can prevent the popup from happening, so my program doesn't pause indefinitely until I close it manually? Or is there a better command to handle wifi connection given the wifi name and password?