GNOME Bugzilla – Bug 739740
Make wifi-geolocation work inside VMs
Last modified: 2018-01-11 10:12:05 UTC
On most laptops out there, there isn't any better way to find user's location than wifi-geolocation. However, it doesn't work for VMs since wifi cards are not exposed to them. We need a way to fix this. What comes to mind is doing it through spice: geoclue talks to vdagent to get the location and agent proxies this this request to client. Boxes (or maybe spice-gtk itself?) will then talk to geoclue locally to try to get this information.
Forgot to mention that the suggestion in comment#0 would also make geolocation work with other sources not (always) available inside the VM. For example bluetooth GPS device (once we have support for it in geoclue) and USB modems (that are not redirected by user to VM).
What do you think elmarco?
fdo #85971
(In reply to comment #3) > fdo #85971 Thanks. External bugs don't automatically get linked though: https://bugs.freedesktop.org/show_bug.cgi?id=85971
Actually, we might not want and need to involve SPICE or guest agent at all. Firstly for remote cases, we don't want guests to have the same location reported as the client as that would in most cases be completely wrong. You don't want your app running inside a VM in Boston to think it's in London. Secondly, after last GSoC, we've had this network NMEA source that allows geoclue to utilize external geolocation sources. We just have to create a TCP server on the host and bind it to the virbr0 network so it's visible to apps on the local VMs.
(In reply to Zeeshan Ali (Khattak) from comment #5) > Actually, we might not want and need to involve SPICE or guest agent at all. > Firstly for remote cases, we don't want guests to have the same location > reported as the client as that would in most cases be completely wrong. You > don't want your app running inside a VM in Boston to think it's in London. > I think it can be useful for any vm. Even for simple tasks like looking for weather forecast or searching a route on maps I would like to use my location instead of location of the host. Especially when working with the VM in the fullscreen mode.
(In reply to Pavel Grunt from comment #6) > (In reply to Zeeshan Ali (Khattak) from comment #5) > > Actually, we might not want and need to involve SPICE or guest agent at all. > > Firstly for remote cases, we don't want guests to have the same location > > reported as the client as that would in most cases be completely wrong. You > > don't want your app running inside a VM in Boston to think it's in London. > > > I think it can be useful for any vm. Even for simple tasks like looking for > weather forecast or searching a route on maps I would like to use my > location instead of location of the host. Especially when working with the > VM in the fullscreen mode. Why do you think location of the VM would be different than the location of the host, if VM is local? :)
(In reply to Zeeshan Ali (Khattak) from comment #7) > (In reply to Pavel Grunt from comment #6) > > (In reply to Zeeshan Ali (Khattak) from comment #5) > > > Actually, we might not want and need to involve SPICE or guest agent at all. > > > Firstly for remote cases, we don't want guests to have the same location > > > reported as the client as that would in most cases be completely wrong. You > > > don't want your app running inside a VM in Boston to think it's in London. > > > > > I think it can be useful for any vm. Even for simple tasks like looking for > > weather forecast or searching a route on maps I would like to use my > > location instead of location of the host. Especially when working with the > > VM in the fullscreen mode. > > Why do you think location of the VM would be different than the location of > the host, if VM is local? :) Your comment was about the remote case.
(In reply to Pavel Grunt from comment #8) > (In reply to Zeeshan Ali (Khattak) from comment #7) > > (In reply to Pavel Grunt from comment #6) > > > (In reply to Zeeshan Ali (Khattak) from comment #5) > > > > Actually, we might not want and need to involve SPICE or guest agent at all. > > > > Firstly for remote cases, we don't want guests to have the same location > > > > reported as the client as that would in most cases be completely wrong. You > > > > don't want your app running inside a VM in Boston to think it's in London. > > > > > > > I think it can be useful for any vm. Even for simple tasks like looking for > > > weather forecast or searching a route on maps I would like to use my > > > location instead of location of the host. Especially when working with the > > > VM in the fullscreen mode. > > > > Why do you think location of the VM would be different than the location of > > the host, if VM is local? :) > > Your comment was about the remote case. Ah ok, sorry i misread. Hmm.. Now that I think about it again, I can't come up with any example where you'd want the app to see it's own location rather than that of user.
>(In reply to Zeeshan Ali (Khattak) from comment #9) > Ah ok, sorry i misread. Hmm.. Now that I think about it again, I can't come > up with any example where you'd want the app to see it's own location rather > than that of user. Considering this, should it be dealt with through SPICE, like you mentioned in the your first reply ?
(In reply to Visarion Alexandru from comment #10) > >(In reply to Zeeshan Ali (Khattak) from comment #9) > > Ah ok, sorry i misread. Hmm.. Now that I think about it again, I can't come > > up with any example where you'd want the app to see it's own location rather > > than that of user. > > Considering this, should it be dealt with through SPICE, Yes, even more so. Your app can be on a remote location and the location it should see is that of the user so location info needs to be sent from client to host.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-boxes/issues/36.