Jump to content

Chromium: Difference between revisions

From postmarketOS Wiki
Alpabrz (talk | contribs)
m Wayland support: Add disclaimer, related issue + minor wording change.
Alpabrz (talk | contribs)
m Wayland: Add link to related pmaports issue.
Line 12: Line 12:


=== Wayland ===
=== Wayland ===
{{note|Expect issues since [https://chromium.googlesource.com/chromium/src.git/+/master/docs/ozone_overview.md Ozone] (which enables Wayland support) is still in development!}}
{{note|Expect issues since [https://chromium.googlesource.com/chromium/src.git/+/master/docs/ozone_overview.md Ozone] (which enables Wayland support) is still in development! Related issue: {{issue|998|pmaports}}}}
There have been problems reported using Chromium under XWayland, getting <code>cannot open display: :0</code> errors.
There have been problems reported using Chromium under XWayland, getting <code>cannot open display: :0</code> errors.



Revision as of 17:29, 7 March 2021

This page explains how to make chromium usable in mobile UIs like plasma-mobile.

Alt text
Chromium running on plasma-mobile

Installation

Install chromium package from alpine.

Configure startup (scale + useragent)

Edit /usr/share/applications/chromium.desktop and set the following line:

Exec= chromium-browser %U --start-maximized  --user-agent="Mozilla/5.0 (Linux; Android 4.4.2; Nexus 5 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.99 Mobile Safari/537.36"

You may adapt scale and useragent to your needs.

Wayland

Note Expect issues since Ozone (which enables Wayland support) is still in development! Related issue: pmaports#998

There have been problems reported using Chromium under XWayland, getting cannot open display: :0 errors.

As described in the ArchWiki, since version 87 you should be able to use Chromium's native wayland support through the following flags:

$ chromium-browser --enable-features=UseOzonePlatform --ozone-platform=wayland

You might want to make these arguments persistent through adding them to the desktop file, located under /usr/share/applications/chromium.desktop.

Related issue: pmaports#998

On-screen keyboard

Currently on-screen keyboard does not work with plasma-mobile (see [1]). You may install this extension to get a virtual keyboard nevertheless (though it does not work with every website):

Scroll-bar

Access "chrome://flags". To do that type it in the plasma-mobile search bar (on home screen), and then copy and paste it in the chromium url bar.

Enable the following flags:

  • Smooth Scrolling
  • Overlay Scrollbars
  • Scroll prediction

This will allow to have a good scrolling experience, and hide scrollbar, so that it does not take screen-space.