Does "get location" work to get my current location?

Hi, I was trying to use wdutil to get the name of my connected wifi base station, so I can know whether my laptop is in my Tokyo condo or my home in rural Japan, and do different things depending on that. wdutil requires sudo yet shows for any of the info I want.

I saw there's a Get Location in KM 11, and gave it a try, expecting that it would ask me for permission to use my location. But nothing happened and the variable that saves the SSID name is blank.

Is there any way to make this work?

According to this thread, that should work:

You might have to manually remove the permissions for KM (if they're there), then reboot and try again.


The "Get Location" action really does get your location -- the latitude and longitude! I don't know what wizardry it does to achieve that, but a quick test shows that it's a) pretty accurate, and b) rather prone to timing out without a result.

What it also does is force a permissions request for KM Engine to use Location Services, but if you've already granted that it won't ask. You can check in System Settings -> Privacy & Security -> Location Services. The permissions system does sometimes get confused, and the fix would be to turn KM Engine's permission off and then run the "Get Location" action to make a mother request.

What you actually want is the %WirelessNetwork% token. Previous permissions problems with that should be fixed as of KM v11, but see this thread if you are still on v10 and are having issues.