Linux resolution switcher7/21/2023 Get the current setup xdpyinfo | grep -B 2 resolution When using xrandr to "zoom-in" with the previous method, the desktop remain full screen but when we "zoom-out" with for instance xrandr -output screen-name -scale 1.2x1.2 (to get an unsupported resolution) the desktop is not displayed in full screen because this require updating the resolution (to probably a higher unsupported resolution by the screen), we can use a combinaison of -mode, -panning and -scale, xrandr's parameters to achieve a full screen "zoom-out" scaling (simulate a new resolution), example: Scaling the desktop and simulate/render a new resolution Reset xrandr changes xrandr -output screen-name -scale 1x1 Increase the screen size by 20% (zoom-out) xrandr -output screen-name -scale 1.2x1.2 Reduce the screen size by 20% (zoom-in) xrandr -output screen-name -scale 0.8x0.8 Getting the screen name: xrandr | grep connected | grep -v disconnected | awk '' Scaling the desktop without changing the resolution This is achieved by simulating the new greater resolution while rendering it for the supported max resolution, similar to when we watch a Full-HD video on a screen that is not Full-HD. RandR can also be used the other way around, example making a screen with 1366x768 max resolution support a greater resolution like 1920x1080. This can be used to scale the desktop to display a bigger environment, this can be useful for HiDPI (High Dots Per Inch) displays. Xorg's extension RandR have a scaling feature and can be configured with xrandr. Xpra (python) can be used along with Run scaled to achieve a per app scaling.Įnvironment variables modification can be placed in ~/.profile for a global and automatic appliance after login. Gnome/GTK can as well be scaled globally with this Gnome setting gsettings set text-scaling-factor 2.0Ĭhromium, can be scaled with the following command chromium -high-dpi-support=1 -force-device-scale-factor=1.5 Gnome/GTK applications can be scaled with the following environment variables export GDK_SCALE=2 Qt applications can be scaled with the following environment variables, note that many applications are hard-coding sizing and font and thus the result on such app may not be as expected. Scaling application can be done mainly via DPI, specific environment variable (explained bellow), application own setting or some specific desktop setting (out of scope of this QA). This reference article have many valuable informations for the matter. On most desktops system (like KDE or Gnome) there are settings available on their respective settings panel, this guide is for additional/manual settings that can be applied to scale an application or the whole desktop. This is detailed in depth on how does Linux's display works? QA.
0 Comments
Leave a Reply. |