After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 739740 - Make wifi-geolocation work inside VMs
Make wifi-geolocation work inside VMs
Status: RESOLVED OBSOLETE
Product: gnome-boxes
Classification: Applications
Component: spice
3.15.x
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-11-06 15:10 UTC by Zeeshan Ali
Modified: 2018-01-11 10:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Zeeshan Ali 2014-11-06 15:10:50 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.
Comment 1 Zeeshan Ali 2014-11-06 15:15:34 UTC
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).
Comment 2 Zeeshan Ali 2014-11-06 15:16:26 UTC
What do you think elmarco?
Comment 3 Marc-Andre Lureau 2014-11-06 17:06:50 UTC
fdo #85971
Comment 4 Zeeshan Ali 2014-11-06 17:29:28 UTC
(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
Comment 5 Zeeshan Ali 2016-02-23 12:44:24 UTC
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.
Comment 6 Pavel Grunt 2016-02-23 21:44:49 UTC
(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.
Comment 7 Zeeshan Ali 2016-02-23 22:17:09 UTC
(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? :)
Comment 8 Pavel Grunt 2016-02-23 22:23:18 UTC
(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.
Comment 9 Zeeshan Ali 2016-02-23 23:42:45 UTC
(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.
Comment 10 Visarion Alexandru 2016-07-22 13:46:51 UTC
>(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 ?
Comment 11 Zeeshan Ali 2016-07-25 13:03:37 UTC
(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.
Comment 12 GNOME Infrastructure Team 2018-01-11 10:12:05 UTC
-- 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.