4

I have a high DPI monitor, and every time I create a Wine prefix the default 96 dpi is minuscule. Is there some kind of console command or script I can run to just set the dpi without having to squint at the winecfg window?

I've gathered that the Software/System/CurrentControlSet/Hardware Profiles/Current/Software/Fonts/LogPixels key indicates the DPI. The problem is that every resource I find says to edit the registry with regedit, the GUI program. That is even more of a pain than winecfg! As I recall, in Windows you could write .reg files that can set a registry key. Is it possible to do that and somehow load the key from the command line only?

Failing that, is it possible to somehow bypass winecfg and edit the registry file directly?

2 Answers 2

4

Yes. Like REGEDIT.EXE in Windows itself, WINE's regedit program takes an optional filename argument. If that file is a valid regedit file, it will apply it to the registry in the current WINEPREFIX.

e.g.

regedit /path/to/filename.reg

If you don't already have a valid regedit file containing the registry keys & values you need, you can create one with regedit's -E option. e.g.

regedit -E /path/to/filename.reg 'Software/System/CurrentControlSet/Hardware Profiles/Current/Software/Fonts/LogPixels'

See man regedit.

BTW, I have no idea if that key is correct or even valid. I've only used it because it's what you mentioned in your question. I would have thought it needed to be prefixed with HKEY_CURRENT_USER or similar, but I'm really not an expert on Windows or its registry, I've just picked up the bare minimum of knowledge to get some games to work in WINE.

0

At /.wine/user.reg change the value of LogPixels.

The value is in hex, which you can convert with printf '%.8X\n' "[DECIMAL]".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .