← Back to team overview

ubuntu-phone team mailing list archive

Re: [Ports] New method to handle the device specific pixel ratio

 

It might even be a better idea to implement this from the Android front-end
-that would mean less playing around with the Ubuntu install, making it
more united, and requiring less hacked-together solutions.

For example, it could be done via a symlink: have the config in, lets say,
/system/etc/ubuntu/configs/. Upon installing the preinstalled Ubuntu image,
just look for [$ro.device.name].conf in /system/etc/ubuntu/configs/, and if
found, symlink, then move on.

This way it requires one small change on the Ubuntu side, while providing a
more generic way to store the configs within the device-specific
"container".

What makes me write this are the hacky solutions I've seen around: some
requires a third zip flashed after install, some use a service-ified
shellscript to copy it from the system, and so on.

With the symlink (or any other method what stores the config out of
/data/ubuntu), we cut some minimal files out of the chroot, yet every
device can easily provide their own configs without hassle.
On Mar 22, 2013 2:28 AM, "Ricardo Salveti de Araujo" <
ricardo.salveti@xxxxxxxxxxxxx> wrote:

> Hey,
>
> We just landed a merge request [1] created by Oliver (ogra) that improves
> the way we're currently handling the device specific pixel ratio values.
>
> The main idea is to move the device specific configuration from
> /usr/bin/ubuntu-session to a proper config file, in a way it won't be
> needed to change the original sources anymore.
>
> As described at https://wiki.ubuntu.com/Touch/**Porting#Screen_Pixel_Ratio<https://wiki.ubuntu.com/Touch/Porting#Screen_Pixel_Ratio>,
> here's how you can create your device specific configuration file from
> tomorrow's image on:
>
> First identify the ro.product.device android property used by your device
> (check the /system/build.prop file from your port or from the original
> Android image). Then with the desired DPR, create a file at
> /etc/ubuntu-session.d, adding your custom GRID_UNIT_PX and QTWEBKIT_DPR
> variables, also specifying the default form factor you want, such as:
> $ cat /etc/ubuntu-session.d/manta.**conf
> GRID_UNIT_PX=20
> QTWEBKIT_DPR=2.5
> FORM_FACTOR="tablet"
>
> Another good side effect is that people will be able to safely update the
> ubuntu-session package without breaking the previous device specific setup.
> Also, it make way easier to accept new contributions as all we need now is
> to add a config file to the session-manager package.
>
> Also, please don't forget to send us the config file after you created it
> for your port, so we can include them in ubuntu-session by default.
>
> Thanks.
>
> [1] https://code.launchpad.net/~**ogra/session-manager/posix-**
> rewrite/+merge/153542<https://code.launchpad.net/~ogra/session-manager/posix-rewrite/+merge/153542>
>
> --
> Ricardo Salveti de Araujo
>
> --
> Mailing list: https://launchpad.net/~ubuntu-**phone<https://launchpad.net/~ubuntu-phone>
> Post to     : ubuntu-phone@lists.launchpad.**net<ubuntu-phone@xxxxxxxxxxxxxxxxxxx>
> Unsubscribe : https://launchpad.net/~ubuntu-**phone<https://launchpad.net/~ubuntu-phone>
> More help   : https://help.launchpad.net/**ListHelp<https://help.launchpad.net/ListHelp>
>

Follow ups

References