When we travel with a laptop, we often find ourselves in an airport, train station, or other establishment which offers free Wirless network access. But - these often require, upon connection, visiting some web page to approve the proprietors' ridiculous terms/conditions in order to actually full enable the connection (i.e. actually route your IP traffic to relevant places).
Unfortunate as this situation might be, we are forced to live with it. Unfortunately, while smartphones are typically configured to load the relevant web page upon connection - many/most Linux distributions don't do this, treating these two-phase-connection WLANs as any old wireless network. So, when you then try to use your browser, or other network-based program - you can actually connect to where you want to.
Now, sometimes, these networks are "kind" enough to at least redirect HTTP traffic, so that whatever URL you used, the terms & conditions acceptance page loads. But - even this can be problematic: You might get complaints about an invalid security certificate / man-in-the-middle attack, and your browser may refused to load the page.
My question: How do I arrange, upon connecting to the WLAN (e.g. with NetworkManager or otherwise), for a web browser to be launched, to load the terms & conditions page?
Notes:
- In my experience, the page to load is the root page on the HTTP port on the gateway machine you got in your DHCP lease. So, an answer which makes this assumption is already pretty good and maybe good enough.
- I would be fine with a mechanism that just auto-accepts rather than loads the page in a browser window - although that is more of a programming challenge, so probably not very relevant.
- My specific laptop runs LXQt on Lubuntu (and soon perhaps Q4OS), but I would rather have a more general answer if possible.