How to preset Chromium-Browser scale, zoom factor?

Hi at all,

after installing the 3.5inch LCD RPI driver, display output looks as shown below in the picture.


The CTRL and +, - or mouse scroll can be used to change the zoom factor of the Chromium browser.
This view is still saved after a reboot.

Where, in what configuration file is the current 50% zoom preset stored?

This setting could e.g. reset by a crash of the browser from the system,
later in my project there should no longer be a keyboard.

I tried to preset by inserting the line
--force-device-scale-factor = 0.5 \
in /opt/volumiokiosk.sh file, unfortunately without success, without any change.

How can I predefine these presets in a configuration file?

This question was often asked here but never answered satisfactorily.

Maybe this time?
I’d be pleased…

Yves.

The zoom factor is saved in /data/volumiokiosk/Default/Preferences. In the file look for something like "partition":{"per_host_zoom_levels":{"3990065800":{"localhost":0.5227586988632231}}}. Such an entry seems to be present in the Preferences file only after the zoom factor has been altered once.

The zoom factor is the number after “localhost”. You find some more values for certain zoom factors here. The value of 0.5227586988632231 I used above equates to 110%. It is calculated with log(zoom_factor, 1.2) where zoom_factor would be 1.10 for 110%.

Instead of “per_host_zoom_levels” one can use “default_zoom_level” which would look like "partition":{"default_zoom_level":{"3990065800":0.5227586988632231}}. The last number is the zoom factor again. Note that the preceding number “3990065800” might be different for you. ATM I don’t know where it is derived from or how it is generated. I suspect it is some kind of ID.

Hi @gvolt , thanks a lot for your time.

I do this:

cd /data/volumiokiosk/Default
sudo nano Preferences

the file is containing one single, very long line.
In there I can not find partition, per_host_zoom_levels, localhost, zoom_factor :astonished:

Try adjusting the zoom factor with your mouse first, then the setting should be there.

@gvolt ,

I performed a fresh installation after taking the pictures in first post,
this is the reason why the entry was not available.
In fact, after CTRL + scroll to 50% zoom, the entry appears:

"partition":{"per_host_zoom_levels":{"3990065800":{"localhost":-3.8017840169239308}}}

To test the result, I delete then reboot, or replace it with 30% factor:

"partition":{"per_host_zoom_levels":{"3990065800":{"localhost":-6.0311726618503405}}}

then reboot again: the entry for 50% zoom setting is reappearing.
That means I can´t change settings here, am I right?

So I have now to precise/modify my question:

how to zoom in, out Volumios display output view without physical keyboard,
only with touch screen, screen pen, virtual keyboard?

When modifying the Preferences file the chromium-browser must not run. So disable the touch display plugin first, then add your zoom setting to Preferences save it and enable the plugin. For me the setting (just tested “default_zoom_level”, but that should make no difference) survived a reboot as well es disabling and re-enabling the plugin. I think only in case the Preferences file gets damaged it would be necessary to ssh to Volumio and reapply the zoom setting.

Hi gvolt,

very kind of you to show me the way.

Yes, it works to disable the touch display plugin first and enable it after value change.
In my case the best value is “2.6” (without the total of 16 decimals).

Do You know if it exists a equivalent of a zoom slider for chromium-browser?
Or a ssh terminal (maybe nonofficial) plugin for volumio?

Do You know if it exists a equivalent of a zoom slider for chromium-browser?

Not to my knowledge.

Or a ssh terminal (maybe nonofficial) plugin for volumio?

AFAIK an SSH terminal plugin does not exist. Frankly I would not see any use for it: You can enable or disable SSH access from Volumio’s DEV page in a web browser if needed. In any case connecting to Volumio via SSH requires a terminal (or Putty or something like that) on a second device. This would not change with an “SSH plugin”.

I finally managed it to zoom in and out of the view by just using a virtual keyboard and a touch pen.
In any search box click “Ctrl” (lock itself one tine) followed by plus or minus. why I didn’t just do that… :roll_eyes:

2 Likes