Installing and tweaking Chromium on Mobian and Arch
#1
This will walk you through installing Chromium on Mobian and Arch Linux. Chromium won't run yet on Manjaro or Postmarket OS. I think after you make these tweaks and use Chromium you will see it has quite a few advantages over Firefox.

Positives: Faster, seems to be better optimized. Scales better. Works excellent with full window Web apps with desktop shortcuts. Pretty much as good as real apps. You can use a lot of extensions, my VPN has one and it works very well.

Negatives: Keyboard has to be manually throttled up and down through the keyboard icon in the bottom right corner. Some keys on the touch keyboard don't seem to work like capital  C, and the @ symbol. No idea why. Work fine on the keyboard docked.

Here is a step by step walk through for installing and tweaking it.
It has to be installed through Flatpak, The Chromium apps in the Mobian and Arch software repository don't seem to work. I suspect it's a Wayland or X11 problem.

Add flatpak to Mobian from the terminal:
Code:
apt install gnome-software-plugin-flatpak

Code:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo


Close and restart your terminal.


Add flatpak to Arch from the terminal:

Code:
sudo pacman -S flatpak

Close and restart your terminal.

Install Chromium:
Code:
flatpak install flathub org.chromium.Chromium

Code:
scale-to-fit Chromium on

Code:
flatpak run org.chromium.Chromium


It's very important that you do this before you do anything with the browser. If you don't your browser user agent will leak and if your service provider identifies your device that way it may blacklist you and deactivate your account! AT&T has been doing this. For what it's worth, Mobian Firefox ESR is the only browser with a working Android user agent right now out of the box. User agent extensions alone will leak through Java. All the other distros are leaking after recent browser updates.

After Chromium opens type chrome://flags in the address bar and hit enter. After it opens search for Freeze User-Agent request header and enable it then close the browser.

Open Chromium go to settings-more tools-extensions search for and install Use-Agent Switcher and Manager.

Open the extension and choose Chrome and Android in the drop down. Then select Chrome 87.0.4290.101  Android 10  and at the bottom left select Apply (all windows)

Close the browser and relaunch. Your browser should launch in mobile now. Do a leak test by searching What is my browser? look on several of the result sites that show up and look at your User Agent string. There should be no hint of Arch64 or desktop in any of them or it's leaking. Congratulations! Your now running Chromium Mobile.

On another note this will not work for Ungoogled Chromium. The settings and extensions were removed. 
  Reply
#2
Some people are reporting the hamburger menu isn't visible in Mobian with active extensions. It's there and it works if you touch select that area it normally is but it's not visible. I suspect it's a scaling problem moving it slightly off the visible screen so you can't see it but still enough active area that it works.
  Reply
#3
(02-25-2021, 07:54 PM)C0ffeeFreak Wrote: After Chromium opens type chrome://flags in the address bar and hit enter. After it opens search for Freeze User-Agent request header and enable it then close the browser.

Open Chromium go to settings-more tools-extensions search for and install Use-Agent Switcher and Manager.

Open the extension and choose Chrome and Android in the drop down. Then select Chrome 87.0.4290.101  Android 10  and at the bottom left select Apply (all windows)

I'm trying this, and already had installed org.chromium.Chromium through flatpak. I've set the flags option and installed User-Agent Switcher and Manager. I think I got the right extension:

https://chrome.google.com/webstore/detai...bfkg?hl=en

However,  I'm not seeing a drop-down list of user agents to select from, only extension settings such as blacklist and whitelist mode. Is there a trick to getting to the dropdown, maybe it's hard to see on the Pinephone screen?
  Reply
#4
(02-26-2021, 11:10 AM)Zebulon Walton Wrote:
(02-25-2021, 07:54 PM)C0ffeeFreak Wrote: After Chromium opens type chrome://flags in the address bar and hit enter. After it opens search for Freeze User-Agent request header and enable it then close the browser.

Open Chromium go to settings-more tools-extensions search for and install Use-Agent Switcher and Manager.

Open the extension and choose Chrome and Android in the drop down. Then select Chrome 87.0.4290.101  Android 10  and at the bottom left select Apply (all windows)

I'm trying this, and already had installed org.chromium.Chromium through flatpak. I've set the flags option and installed User-Agent Switcher and Manager. I think I got the right extension:

https://chrome.google.com/webstore/detai...bfkg?hl=en

However,  I'm not seeing a drop-down list of user agents to select from, only extension settings such as blacklist and whitelist mode. Is there a trick to getting to the dropdown, maybe it's hard to see on the Pinephone screen?
You have the correct extension. From the home screen select the extensions in the top bar (looks like a puzzle piece) and select the extension not the three dots on the side of it and you will see the selection drop down. You may have to make your selections in landscape mode until you get the mobile user agent string set.
  Reply
#5
Double edit: Pressing Esc makes you lose your edits. How annoying.

EDIT: If you use Ungoogled Chromium, you need to install an extension so that you can download extensions (not a typo), THEN enable Developer Mode for extensions, THEN use a mouse to drag downloaded extensions into the extensions menu to install the extension. It's a PITA, but this is currently the price to pay to get the best-functioning browser, Ungoogled.



ORIGINAL POST:

Thanks for posting this, I've been meaning to do the same.

I recommend using Ungoogled Chromium to avoid as much of the Google BS as possible. Just install `com.github.Eloston.UngoogledChromium` instead of the regular version.

Using it has given me hope. I know Google is awful, but the browser works so well that it has shown me that the Pinephone can run decently well once the software optimization improves.

Using Firefox is, honestly, a painful experience ATM. Chromium starts in less than 3 seconds and runs surprisingly well.
  Reply
#6
(02-26-2021, 03:28 PM)arcanemachine Wrote: Thanks for posting this, I've been meaning to do the same.

I recommend using Ungoogled Chromium to avoid as much of the Google BS as possible. Just install `com.github.Eloston.UngoogledChromium` instead of the regular version.

Using it has given me hope. I know Google is awful, but the browser works so well that it has shown me that the Pinephone can run decently well once the software optimization improves.

Using Firefox is, honestly, a painful experience ATM. Chromium starts in less than 3 seconds and runs surprisingly well.
Glad I could help. I am also surprised at how well it runs on the Pinephone. With Chromium you can have your access to Google and your privacy because the phone doesn't have Google services installed and access to the tracking SOCs. Only when you use the browser can Google track you and that's limited to your activity on that browser if you don't give it location permissions. It works out pretty well for me because my phone number is a Google Voice number and I use Gmail and I can access that in Chromium. I am a Google Product Expert working in Google Fi, Voice and Wear. The Pinephone is a breath of fresh (FREE) air. Smile I really hope Linux phones take off. For privacy sake.

If it helped you please rate me +?
  Reply
#7
(02-26-2021, 12:22 PM)C0ffeeFreak Wrote: From the home screen select the extensions in the top bar (looks like a puzzle piece) and select the extension not the three dots on the side of it and you will see the selection drop down. You may have to make your selections in landscape mode until you get the mobile user agent string set.

Thanks, that did the trick, but it looks like the latest version of Chrome available in the extension is 87.0.4280.101, not 4290. I found that scale-to-fit Chromium on didn't really seem to do anything, but I used the screen scaling script that was posted on the board here (I think it was from here) to make the browser a better fit on the screen. I could not find a link to the that script but it's here below, I've found the 1.75x scale setting works well for Chromium without making things on the screen too small to see. I run it from a .desktop file placed in ~/.local/share/applications.

Code:
#!/bin/bash
yad --title scale_screen --form \
  --field='Default dpi (2x scale)':fbtn "wlr-randr --output DSI-1 --scale 2" \
  --field='Low dpi (1.75x scale)!window-restore-symbolic':fbtn "wlr-randr --output DSI-1 --scale 1.75" \
  --field='Medium dpi (1.5x scale)!window-minimize-symbolic':fbtn "wlr-randr --output DSI-1 --scale 1.5" \
  --field='High dpi (1.25x scale)!window-maximize-symbolic':fbtn "wlr-randr --output DSI-1 --scale 1.25" \
  --field='Max dpi (1x scale)!view-fullscreen-symbolic':fbtn "wlr-randr --output DSI-1 --scale 1" \
  --field='Restart Phosh':fbtn "sudo systemctl restart phosh" \
  --button='Close!gtk-cancel':1
  Reply
#8
(02-26-2021, 07:54 PM)Zebulon Walton Wrote:
(02-26-2021, 12:22 PM)C0ffeeFreak Wrote: From the home screen select the extensions in the top bar (looks like a puzzle piece) and select the extension not the three dots on the side of it and you will see the selection drop down. You may have to make your selections in landscape mode until you get the mobile user agent string set.

Thanks, that did the trick, but it looks like the latest version of Chrome available in the extension is 87.0.4280.101, not 4290. I found that scale-to-fit Chromium on didn't really seem to do anything, but I used the screen scaling script that was posted on the board here (I think it was from here) to make the browser a better fit on the screen. I could not find a link to the that script but it's here below, I've found the 1.75x scale setting works well for Chromium without making things on the screen too small to see. I run it from a .desktop file placed in ~/.local/share/applications.

Code:
#!/bin/bash
yad --title scale_screen --form \
  --field='Default dpi (2x scale)':fbtn "wlr-randr --output DSI-1 --scale 2" \
  --field='Low dpi (1.75x scale)!window-restore-symbolic':fbtn "wlr-randr --output DSI-1 --scale 1.75" \
  --field='Medium dpi (1.5x scale)!window-minimize-symbolic':fbtn "wlr-randr --output DSI-1 --scale 1.5" \
  --field='High dpi (1.25x scale)!window-maximize-symbolic':fbtn "wlr-randr --output DSI-1 --scale 1.25" \
  --field='Max dpi (1x scale)!view-fullscreen-symbolic':fbtn "wlr-randr --output DSI-1 --scale 1" \
  --field='Restart Phosh':fbtn "sudo systemctl restart phosh" \
  --button='Close!gtk-cancel':1
Interesting. Any chance you can post a screenshot of what your Chromium looks like with that scaling? I'd like to compare it and consider it myself.
  Reply
#9
(02-26-2021, 09:17 PM)C0ffeeFreak Wrote: Interesting. Any chance you can post a screenshot of what your Chromium looks like with that scaling? I'd like to compare it and consider it myself.

Here's a crude, quick and dirty comparison taken using an old camera and put side-by-side with GIMP. Image on the left is the normal Pinephone screen. Image on the right is with scaling at the 1.75 setting in the script. As you can see, Chromium is normally cut off on the right but fits the screen with scaling and is still quite readable.

[Image: qSQbAZqZ_t.jpg]
  Reply
#10
(02-26-2021, 11:40 PM)Zebulon Walton Wrote:
(02-26-2021, 09:17 PM)C0ffeeFreak Wrote: Interesting. Any chance you can post a screenshot of what your Chromium looks like with that scaling? I'd like to compare it and consider it myself.

Here's a crude, quick and dirty comparison taken using an old camera and put side-by-side with GIMP. Image on the left is the normal Pinephone screen. Image on the right is with scaling at the 1.75 setting in the script. As you can see, Chromium is normally cut off on the right but fits the screen with scaling and is still quite readable.

[Image: qSQbAZqZ_t.jpg]
Thanks. Scale to fit seems to work on Chromium for me. The three dots for the setting menu are right at the edge of the screen. But that could work on other apps I have that aren't scaling well like Cozy.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Upgrade to Mobian (Trixie) Staging biketool 7 174 Yesterday, 12:40 PM
Last Post: biketool
  bookworm vs trixie discussion for mobian in pinephone regular. zetabeta 41 8,414 11-27-2024, 10:39 AM
Last Post: fernando_c_m
  atinout binaries for mobian/debian? NeutralGrey 4 1,335 10-31-2024, 04:16 AM
Last Post: astylethargic
  Mobian-Kicksecure? 3460p 0 824 05-26-2024, 02:09 PM
Last Post: 3460p
  Mobian repository status henrythemouse 16 12,099 04-10-2024, 10:02 AM
Last Post: diederik
  cant verify mobian image at website gnugpg penguins_rule 0 883 03-18-2024, 08:54 PM
Last Post: penguins_rule
  mobian installed to eMMC - how to install tow-boot grump_fiddle_reinstall 6 3,927 11-22-2023, 11:46 AM
Last Post: aLoop100o
  What actions needed to keep on mobian testing user641 3 2,582 09-05-2023, 06:44 AM
Last Post: Zebulon Walton
  Mobian boot failed with zstd message after upgrade. Mahgue 0 970 09-01-2023, 11:29 AM
Last Post: Mahgue
  how to update mobian over tor vusra 13 9,084 07-09-2023, 08:57 PM
Last Post: vusra

Forum Jump:


Users browsing this thread: 1 Guest(s)