Hello everyone,
When i executing some windows programs i have a very small fonts on my hidpi monitor. I tried to resolve this issue in different ways, and found that i can change dpi via winecfg tool (Graphics->Screen resolution). But how can i do this without winecfg? Usually i creating for every program a separate bash script and configure a much parameters as possible in it. How can i change screen dpi or font size without winecfg? Is it possibbe to setup some environment variable (for example WINEDPI) and then call wine? I tried to find response in documentation, but not found anything that i need.
Changing dpi and font size
Re: Changing dpi and font size
This setting is stored in the registry. Change 0x60 to the desired value
Code: Select all
wine reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v LogPixels /t REG_DWORD /d 0x60 /f
-
- Newbie
- Posts: 2
- Joined: Mon Feb 22, 2021 3:26 pm
Re: Changing dpi and font size
Thank you so much! Your method worked and this is what I need. I added a few actions to keep the previous DPI value and restore it later. I give an example, maybe someone will be useful.
Code: Select all
#!/bin/bash
WINEPREFIX="/opt/Wine64"
NEWDPI="0x90"
OLDDPI=$( wine reg query "HKEY_CURRENT_USER\Control Panel\Desktop" | grep "LogPixels" | awk ' {print $3} ' | sed 's/\r$//' )
if [ "${OLDDPI}" != "${NEWDPI}" ]; then
wine reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v LogPixels /t REG_DWORD /d ${NEWDPI} /f
fi
wine "plsqldev.exe"
if [ "${OLDDPI}" != "${NEWDPI}" ] && [ ! -z "${OLDDPI}" ]; then
wine reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v LogPixels /t REG_DWORD /d ${OLDDPI} /f
fi