I'm working on extending a script which automatically sets up laptops with fresh Ubuntu installation for second use by an NGO. The script is meant for execution from the recovery mode (in console mode) and it creates the users, installs required software etc.
There is a problem with laptops with high resolution, namely all screen elements are very small.
I'd like to extend the script (written in Python and Bash) with the following logic:
- Check if screen the resolution is higher than NxM
- If yes, update X server config to scale the screen by 0.75x0.75 (or other hardcoded factor).
So my question is two-fold:
- How to detect the resolution/DPI from console mode? (
xrandr --query
doesn't work without X server) - What config file should I update with the scaling factor?