I would like to define a keyboard shortcut that resets my wireless adapter. I know it is possible in the terminal with sudo ifconfig, but for the keyboard shortcut, I can't provide the password for sudo.
Are there other commands that can do the job without root privileges?
Network Manager has a nice CLI tool,
nmcli
, that does not require root privilege. You can reset wifi withseems to do the job. I wanted also to splash some text to the foreground but it's not so important. Any ideas about how to do that?
No they are not, but you can call
gksudo
instead of sudo to have a window showed up that asks for your password.