← Back to team overview

ubuntu-phone team mailing list archive

Re: User agent on ubuntu touch

 

On Wed, Jun 1, 2016 at 8:47 PM, Hans Mayer <hans.mayer@xxxxxxx> wrote:
> Hello Olivier,
>
> thanks for the reply.
>
> Since the OTA 11 adds the aethercast to Meizu PRO 5, would it not be better
> to tell to sites "ubuntu on desktop"?
>
> This could be hard coded in BQ tablet and Meizu (MX4 and PRO 5) as they have
> "big" display and "ubuntu like android" on BQ HD phones with "small"
> display.

The physical size of the display is already taken into account for the
user agent string. Typically on a M10, the browser should be using a
desktop user agent. If it doesn’t then it’s a bug, feel free to report
it at https://bugs.launchpad.net/ubuntu/+source/webbrowser-app/+filebug
(please include the log file from the app that you’ll find at
/home/phablet/.cache/upstart/application-legacy-webbrowser-app-.log).

You can check the default UA string on your device by browsing to e.g.
http://www.whatsmyua.com/.


> My opinion about these "fairly broken" sites: I think they reduce features
> voluntary to force users to install apps, so they can control better the
> customers.

If that really is the case, it’s lame.


> On 06/01/2016 12:12 PM, Olivier Tilloy wrote:
>>
>> On Wed, Jun 1, 2016 at 10:35 AM, Hans Mayer <hans.mayer@xxxxxxx> wrote:
>>>
>>> Hello,
>>>
>>> Is there a possibility to change the user agent the web browser on UT
>>> sends
>>> to sites?
>>> E.G. slack.com does not support UT. When opening the site, I have no
>>> access
>>> to channels.
>>> If I can say "i am a desktop", the displayed data would be the same as on
>>> PC. This is ok on a Meizu 5 PRO.
>>
>> Hello Hans,
>>
>> There is currently no way of doing that through the UI. We have a user
>> agent override mechanism, but the list of overrides is currently
>> hardcoded in a system-wide file, so unless you make your phone system
>> writeable (not recommended), this list cannot be changed (if you are
>> willing to try at your own risk, I can send further instructions).
>>
>> Sites that selectively enable features based on user-agent sniffing
>> are fairly broken, this is a thing from the past really. Unfortunately
>> this is still very much commonplace.
>> Can you report a bug to slack.com, requesting them to recognize the
>> default ubuntu touch UA string?
>>
>> It looks like this:
>>
>>   Mozilla/5.0 (Linux; Ubuntu 15.04 like Android 4.4) AppleWebKit/537.36
>> Chromium/[chromiumVersion] Mobile Safari/537.36
>>
>> (where chromiumVersion is currently hardcoded at 35.0.1870.2, but a
>> change will soon land that will make it dynamic, reflecting the
>> current version of chromium the web engine is based upon, which at the
>> time of writing is 50.0.2661.94)
>>
>> Our browser is based on chromium, pretty much anything that works on
>> e.g. chrome on android should work exactly the same.
>>
>> Thanks for the feedback!
>>
>>   Olivier
>
>
> --
> Best Regards
> Hans
>


References