New GNOME components for geolocation, predictive text, and more
GUADEC is the largest regular meeting of GNOME developers, so it always marks the roll out of a variety of new additions to the platform. At the 2013 event in Brno, Czech Republic, the new work includes a significantly revamped geolocation framework, a library-based approach to email, and predictive text input.
Geolocation
Zeeshan Ali spoke about GNOME's geo-awareness, which is undergoing a rewrite. Geo-awareness consists of four major pieces, he said. The first is geolocation, or the "where am I?" question. The second is the opposite; the user wants to find a different location: a particular address, a nearby restaurant or gas station, or other points of interest. The third issue is routing, finding the best way to get between locations. Finally, there is the user interface topic: locations, points of interest, and routes all need to be presented to the user on a map.
![[Zeeshan Ali]](https://static.lwn.net/images/2013/08-guadec-za-sm.jpg)
GNOME has had the GeoClue library for several years, Ali continued, but it has always been difficult to use. The APIs it offered were complicated to use and it exposed too many details to applications and users. For example, it provided separate APIs for acquiring location information from the different data sources (GPS, IP address mapping, etc.). Consequently, Ali and Bastien Nocera have rewritten the library as GeoClue2 with the goal of being simple.
GeoClue2 can determine location from four different sources: coordinates from GPS devices (the most accurate), the location of nearby WiFi access points (which is accurate to just a few hundred meters), the location of 3G cellular towers (which are accurate only to a few kilometers), and IP addresses (which are accurate only down to the city level).
GeoClue2 also offers better privacy controls; the previous version of the library would provide the current location to any application; with GeoClue2, GNOME will require the user to confirm location requests from each application. There are, of course, other privacy issues involved in geo-awareness. For example, Ali mentioned that Google had stirred up controversy when it mapped the SSIDs of WiFi access points. GeoClue2 will not use the Google WiFi database because doing so requires Google's permission. Instead, it plans to use an open WiFi database, but the privacy concerns are not entirely clear-cut with other services either.
GNOME's place-finding functionality is implemented in a library called geocode-glib, written by Nocera. It provides both geocoding (that is, taking a feature like a city name or street address and transforming it into latitude/longitude coordinates) and reverse-geocoding (which does the opposite, taking coordinates and identifying the closest street address). This library used Yahoo's Places API in the past, but has since been migrated to the open data service Nominatim, which is based on Open Street Map (OSM) maps, and is also more complete than Places.
GNOME already has a solid mapping UI component called libchamplain, which renders OSM maps by default. There is also a new mapping application slated for release with GNOME 3.10, called GNOME Maps.
The routing question is not solved; there is currently a Google Summer of Code student working on developing a routing system. It is a tricky problem because routing can involve several distinct modes of transportation: walking, cycling, driving, and public transport. The initial plan was to use Open Source Routing Machine (OSRM), but the public web service OSRM provides is car-only. In addition, running a separate OSRM instance (an option which would allow GNOME to find routes using OSM's bike path data, for example) is very demanding: the project recommends 128GB of RAM for the server.
Other options were discussed at a BoF session on August 7, including the GraphHopper service, which is less demanding on the server side. GraphHopper may also provide an easier solution to the public transport problem, which is tricky in its own right. The de-facto solution for publishing public transportation schedules is the Google Transit Feed Specification (GTFS), which is widely used, but there are still a variety of countries and cities that offer their own transit information APIs. Ultimately, a plugin-based approach may make the most sense (although such "plugins" would not be user-installed components).
The BoF also touched on where users would want to integrate geo-awareness in the GNOME desktop. There are certainly a lot of possibilities, from linking addresses in contact entries to the Maps application, to automatically recognizing and linking address-like text in emails or chats, to allowing the user to see the location of geotagged photos. Here again, there are privacy concerns to be worked out, as well as how best to present the potentially bewildering array of matches to a geocoding search.
Email as a desktop service
Srinivasa Ragavan spoke about his ongoing work splitting the Evolution email client up into a shared library and a separate front-end. His goal is to create a desktop "mail service" that operates over D-Bus; this would allow for multiple front-end client options as well as better integration with other GNOME desktop components.
![[Srinivasa Ragavan]](https://static.lwn.net/images/2013/08-guadec-sr-sm.jpg)
Stand-alone email clients like Evolution are a bit of a dated concept, Ragavan said. Mobile device platforms have made users accustomed to simple "send via email" actions that can be performed from other applications, but Evolution is not capable of offering such functionality. Instead, the Evolution application must be fully started up, complete with checking for new mail from the IMAP server. In addition, the popularity of GMail as that IMAP provider behind the scenes causes other problems. GMail essentially offers one giant INBOX folder, which requires considerable time and memory to load.
Ragavan's plan is to split Evolution's account-authentication, message-retrieval, and mail-sending functionality into a separate library called Evolution Mail Factory (e-mail-factory). GNOME would store a user's IMAP credentials and start a session daemon to log in to configured email accounts automatically when the users logs into the desktop. E-mail-factory would download INBOX messages locally, using the notification system to alert the user without requiring the Evolution front-end to start up.
Splitting out e-mail-factory would have other benefits as well, he said, such as downloading messages during idle periods, and enabling search of message contents and attachments from other applications. Desktop integration would allow the lock screen to display new-email notifications (which is not currently possible), or allow the new-message-notification pop-up to include an inline reply function. It would also allow other applications to send email without starting up the Evolution GUI client. He mentioned LibreOffice and the Nautilus file manager in particular as applications whose current "send via email" functionality is painfully awkward.
Progress toward this goal is slow, but moving forward. Ragavan has split e-mail-factory out in his own Evolution builds, dating back to the 3.6 series. He is currently working on the D-Bus email API, which he described as "bare-bones" at present, and he has developed a test suite. Still to come is porting the Evolution front-end to e-mail-factory, and the final API for client applications to search and fetch messages.
Predictive text input
Anish Patil and Mike Fabian spoke about their work adding predictive input for the Intelligent Input Bus (IBus). IBus is the Input Method (IM) framework used by GNOME; it is used to speed up text entry for writing systems that do not match up with the physical keyboard. Logographic languages with more symbols than fit onto a keyboard and languages that employ frequent accents can both require considerably more keystrokes than users find convenient; Patil observed that it is not uncommon in some languages to require nine keystrokes to type five characters. Enabling the IM to accurately predict text input can cut down considerably on the keystrokes required, which in turn makes users happier.
![[Patil and Fabian]](https://static.lwn.net/images/2013/08-guadec-pf-sm.jpg)
Patil then provided a bit of background on how predictive text input works. Predictions can be based on simple statistics, or on more complex probabilistic models. The simple statistics approach would include counting the relative occurrences of letters in a particular language, or the odds that one word could follow another according to the rules of the language. More complex approaches include Markov models, where the probability of a word occurring next is determined by studying the previous history of the actual text typed. Markov models can be trained on a set of training texts, and offer probabilities based on unigrams (single words), bigrams (pairs of words), or even longer sequences.
The first implementation the two demonstrated was IBus Typing Booster, which uses a Markov model to predict words, and can be used with any IM supported by IBus. As the user types words, the booster pops up autocompletion suggestions which the user can choose from. They showed it using an onscreen software keyboard, which would be helpful for mobile and touch-screen interfaces, but of course it works with hardware keyboards as well. IBus Typing Booster is limited, however, in that it can only be used by IBus, which is far from the only IM framework available to GNOME users. It also relies on the hunspell dictionaries for its word lists, which vary in quality depending on the language.
Fabian then described the replacement tool in the works; the two are porting IBus Typing Booster over to a new library called libyokan, which will support other IM frameworks. It will handle all of the key events; applications will only have to subscribe to the prediction events and can present them to the user however they choose. Although the team is making progress, the speakers did say they are in need of help testing the new framework, improving the hunspell dictionaries, and assembling a quality corpus of free training texts.
GUADEC is always a showcase for new GNOME work and experimentation; one can never know for sure which bits will see the light of day in an upcoming stable release and which will be radically reworked while still in development. The new geo-awareness features are on track to become a major new feature, while the near-term future of the Evolution re-factoring effort and predictive text input are not as clear.
[The author wishes to thank the GNOME Foundation for assistance
with travel to GUADEC 2013.]
Index entries for this article | |
---|---|
Conference | GUADEC/2013 |
Posted Aug 8, 2013 15:12 UTC (Thu)
by krake (guest, #55996)
[Link] (1 responses)
Posted Aug 14, 2013 21:40 UTC (Wed)
by ebassi (subscriber, #54855)
[Link]
Posted Aug 8, 2013 17:23 UTC (Thu)
by kpfleming (subscriber, #23250)
[Link] (3 responses)
Posted Aug 8, 2013 17:38 UTC (Thu)
by johill (subscriber, #25196)
[Link]
Posted Aug 9, 2013 10:19 UTC (Fri)
by eru (subscriber, #2753)
[Link] (1 responses)
Posted Aug 8, 2013 17:30 UTC (Thu)
by iabervon (subscriber, #722)
[Link] (2 responses)
Posted Aug 9, 2013 19:42 UTC (Fri)
by bfields (subscriber, #19510)
[Link] (1 responses)
Posted Aug 10, 2013 6:31 UTC (Sat)
by iabervon (subscriber, #722)
[Link]
Posted Aug 8, 2013 21:38 UTC (Thu)
by yokem_55 (subscriber, #10498)
[Link] (15 responses)
Posted Aug 9, 2013 4:14 UTC (Fri)
by mathstuf (subscriber, #69389)
[Link] (14 responses)
Posted Aug 9, 2013 12:43 UTC (Fri)
by k3ninho (subscriber, #50375)
[Link] (13 responses)
K3n.
Posted Aug 9, 2013 17:28 UTC (Fri)
by mathstuf (subscriber, #69389)
[Link] (1 responses)
Posted Aug 10, 2013 9:20 UTC (Sat)
by krake (guest, #55996)
[Link]
The other way around potentially be more tricky since all non-email data accessible through Akonadi would somehow have to be encapsulated in emails so that this API could be able to transfer it.
Having that said, this new API is more or less an augmentation or expansion of the Evolution Data Server approach, just using a set of daemons separate from the original EDS.
Akonadi is kind of in-between architecture wise: there is a central service that serves as a uniform data access point with a group of services implementing the actual storage access, mail sending, etc.
Posted Aug 10, 2013 9:08 UTC (Sat)
by krake (guest, #55996)
[Link] (10 responses)
Actually no. It is exactly understanding Unix and using the same principles desktop session infrastructure that have proven so versatile for system infrastructure.
In this case having daemons take care about the outward facing email communication, enabling client developers to concentrate on the user interface instead of having to re-implement all kinds of protocols, exception lists, etc. again and again
Posted Aug 10, 2013 9:13 UTC (Sat)
by dlang (guest, #313)
[Link] (9 responses)
That MTA was exactly the capability for apps in the system to send mail without having to implement it themselves.
Posted Aug 10, 2013 9:35 UTC (Sat)
by krake (guest, #55996)
[Link] (8 responses)
Yes, I wasn't aware of that.
"That MTA was exactly the capability for apps in the system to send mail without having to implement it themselves."
True, but their usefulness has been extremely limited by the rampant spam problem.
A stationary system can work around that by sending through the MTA of the ISP, a roaming system like a laptop can not.
Unfortunately the common MTAs lack interfaces to make the necessary configurations, e.g. require access to config files that are protected from non-priviledged user access.
Of course those system MTAs might gain the necessary features at some point and be able to serve as a central mail handler for all user sessions again.
Posted Aug 10, 2013 19:00 UTC (Sat)
by dlang (guest, #313)
[Link] (7 responses)
Well, if the problem is just the interface to change configs, wouldn't it be easier to change the permissions on the files, or create a nice GUI to configure the files for you rather than to create an entirely new API for sending mail?
Posted Aug 10, 2013 19:45 UTC (Sat)
by mjg59 (subscriber, #23239)
[Link] (2 responses)
No. You'd need to write code for every MTA to support per-user configuration, come up with a common format for that and get it all merged upstream. There's no way that that would be easier than creating an entirely new API for the sole purpose of sending email.
Posted Aug 11, 2013 0:08 UTC (Sun)
by dlang (guest, #313)
[Link] (1 responses)
I remain unconvinced that the fact that the configuration requires admin privileges is a real problem.
Posted Aug 11, 2013 0:32 UTC (Sun)
by mjg59 (subscriber, #23239)
[Link]
"I remain unconvinced that the fact that the configuration requires admin privileges is a real problem."
The modern world considers mail to be per-user configuration, not per-system. If you're maintaining a lab with a bunch of users who want to be able to use Thunderbird with their gmail accounts, are you really suggesting that the appropriate thing to do is for the admin to add their gmail credentials by hand?
Posted Aug 11, 2013 0:58 UTC (Sun)
by Cyberax (✭ supporter ✭, #52523)
[Link] (2 responses)
We live in the post-spam age, so MTAs in their default configurations can't send email much further than the local network. So we just need to add some relay server to MTA, right?
Ok, let's start doing it. How do we allow users to edit configuration files? What about multiple users? Hmm...
Ok, suppose we have managed to force Postfix, Exim and Sendmail to use per-user configuration files somehow (I'm not sure it's possible out-of-box). But where do we store logins and passwords? Are you're saying something about plain-text config files?
Ok, we've added integration with the system keychain using its D-BUS API (well, since we had to patch all the major MTAs to support per-user configs another small patch doesn't matter much).
"But we're using Exchange!" someone cries. Well, no problem. We'll just add appropriate LDAP configuration, integration with centrally-managed certificate system and a couple of other systems that I'm forgetting right now. Those folks maintaining Postfix, Exim and Sendmail surely won't object to a couple of megabytes of patches!
"But how do I see the sent emails to make sure that a malicious script isn't sending lewd emails to my address book?",- a shrewd user asks. We don't have a good answer, so we connect this user to a 10KV mains line, solving this problem BOFH-style.
But we've preserved /usr/bin/sendmail in the true Unix tradition!
Posted Aug 11, 2013 9:29 UTC (Sun)
by dlang (guest, #313)
[Link] (1 responses)
I'm not saying that the system MTA should have per-user configs, but I'll also point out that the vast majority of systems are single-user, so per-user config and per-system config are the same in most cases.
Posted Aug 11, 2013 12:51 UTC (Sun)
by Cyberax (✭ supporter ✭, #52523)
[Link]
Authenticated mail submission is pretty much mandatory these days. Of course, in some cases you authentication can be passwordless (send-after-receive or trusted local network). But it's still there, because only specially set up systems can successfully deliver mail these days.
> I'm not saying that the system MTA should have per-user configs, but I'll also point out that the vast majority of systems are single-user, so per-user config and per-system config are the same in most cases.
Posted Aug 11, 2013 10:56 UTC (Sun)
by krake (guest, #55996)
[Link]
I am not sure it would be easier because it requires buy in from a lot of third parties.
It would require that all distributions make their MTA configs world writable or at least group writable and put all user accounts into that group.
It would also require world/group triggerable reload commands.
Then you need buy-in from all MTA projects on the matter of config file format stability, ideally all of them using the same format, but at least guaranteeing that the format will not change.
For multi user systems you will need buy-in from the system administrators who need to ensure that those files are on a filesystem that provides reliably file locking.
On such systems you will also need buy-in from users that their individual mail configs will be inspectable by all other users.
Given those considerations my take would be that it is way harder to solve the problem that way than to provide a user session service.
At least medium term, MTA vendors might at some point offer capabiltities for user mails.
Posted Aug 10, 2013 7:36 UTC (Sat)
by paulj (subscriber, #341)
[Link] (2 responses)
The notion that IP geolocation gives you city-level location is just wrong. Especially so in markets with "virtual ISP" models, where most ISPs generally don't run the access infrastructure or run regional/city POPs, but instead provision IP on top of logical tunnels provided by some an access infrastructure telco. The access infrastructure operator is often the (former)? state monopoly telco.
IP geolocation is, in those circumstances, accurate only for the head-office of the virtual ISP, i.e. nation-state granularity. This "head-office" location, and hence nation-state granularity, often applies to other kinds of network, e.g. corporates.
Posted Aug 14, 2013 12:21 UTC (Wed)
by n8willis (subscriber, #43041)
[Link] (1 responses)
Nate
Posted Aug 15, 2013 13:23 UTC (Thu)
by paulj (subscriber, #341)
[Link]
If we're talking best case though. Geo IP can be as accurate as the administrator of those IPs wants, via whois and DNS records. Certainly, if the administrator has only one address, and their whois is correct, the Geo IP can have street address level accuracy.
More commonly though, Geo IP provides nation level accuracy, with significant false positives. :)
New GNOME components for geolocation, predictive text, and more
Where the talks recorded?
yes, the talks were recorded and are now available on the web.
New GNOME components for geolocation, predictive text, and more
New GNOME components for geolocation, predictive text, and more
New GNOME components for geolocation, predictive text, and more
Is this useful information even then? WIFI hotspots are often added, deleted and upgraded. Or just moved with its user (I can turn my smartphone into a hotspot... so all it tells is where I happen to be).
WIFI
New GNOME components for geolocation, predictive text, and more
Might be fun to think about whether there are ways a nosy app could subvert this (attempting to determine a more precise location from repeated samplings of the imprecise ones), and about possible countermeasures.
New GNOME components for geolocation, predictive text, and more
New GNOME components for geolocation, predictive text, and more
New GNOME components for geolocation, predictive text, and more
New GNOME components for geolocation, predictive text, and more
New GNOME components for geolocation, predictive text, and more
New GNOME components for geolocation, predictive text, and more
New GNOME components for geolocation, predictive text, and more
A bit like out-of-process plugins if you will.
New GNOME components for geolocation, predictive text, and more
New GNOME components for geolocation, predictive text, and more
New GNOME components for geolocation, predictive text, and more
E.g. a lot of potential receiver MTAs are configured to not accept mails from MTAs on dynamic IP address ranges.
A roaming system can work around it by sending to an MTA that accepts "outside" connections that are authenticated.
New GNOME components for geolocation, predictive text, and more
New GNOME components for geolocation, predictive text, and more
New GNOME components for geolocation, predictive text, and more
New GNOME components for geolocation, predictive text, and more
New GNOME components for geolocation, predictive text, and more
New GNOME components for geolocation, predictive text, and more
New GNOME components for geolocation, predictive text, and more
Hmm. Are you living on Mars, perchance?
Sure. But you still have all the other problems I've pointed out.
New GNOME components for geolocation, predictive text, and more
IP addresses are not accurate to city level
IP addresses are not accurate to city level
IP addresses are not accurate to city level