I want to run a script when i connect to a hotspot which have a login page that runs on first connection. I use that script in order to login automatically without my attempt.

I couldn't find which event to catch or which command or program to listen the connection statuses.

What should i do?

1 Answer 1


You can use this to identify active network connections

lsof -i -P +c 0 +M


netstat -tlpn | sort -t: -k2 -n
  • Thanks, but; i need to trigger a wireless connection established event not remote response or requests. Sep 22, 2014 at 11:05
  • 1
    You could have a look at linux.about.com/library/cmd/blcmdl8_iwevent.htm -> iwevent. This will catch events generated by the hardware. Then you can parse the output in your script.
    – Andy
    Sep 22, 2014 at 11:13
  • Yes, this is what i'm looking for. Thank you. :) Sep 22, 2014 at 11:34
  • No problem. All the best.
    – Andy
    Sep 22, 2014 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.