Community discussions

MikroTik App
 
rxmd
just joined
Topic Author
Posts: 22
Joined: Thu Mar 02, 2017 8:39 am

Winbox display scaling on Linux/Wine for HiDPI screens

Sun Aug 25, 2019 10:41 am

I'm using Winbox via Wine on Ubuntu 19.04 on a Thinkpad X1 with a 2560x1440 HiDPI screen.
The display resolution is set to 192 dpi. However, I'm having a hard time to get Winbox displayed properly under Wine on this display

Unfortunately Winbox is unaware of the Linux display scaling. As a result, with the default Wine display DPI setting (72 dpi) I get an unusable tiny display:
Screenshot-winbox-72dpi-50percent.jpg
If I set the display DPI setting in winecfg to 192 dpi to match my Linux display dpi, the fonts in Winbox get scaled properly, but the graphical UI elements - like list views, checkboxes etc. - do not. Those all seem like some custom UI library that does not scale under Wine. As a result, the Winbox interface is still unusable, because the now-bigger text won't fit into the still-small UI views:
Screenshot-winbox-192dpi-50percent.jpg
I currently help myself by a VNC hack - I open a separate local X server as display :1 (the regular X server is :0), then a VNC server on display :1 that has some scaling applied, then Winbox in Wine on display :1, and then a VNC client to get a scaled view of the Winbox window:
$ Xephyr -once -screen 1366x768 -retro :1 & # use at least 768 height to avoid clipping in Winbox
$ x11vnc -localhost -display :1 -scale 7/4 -repeat & # use -scale 2:nb for 2:1 direct pixel scaling
$ DISPLAY=:1 wine /usr/local/bin/winbox.exe &
$ DISPLAY=:1 wm2 & # Optional, only if you want to move/scale the Winbox window
$ vncviewer localhost
This gives me a Winbox interface at 175% scaling:
Screenshot-winbox-vnc175percent-50percent.jpg

However, this is rather clumsy. Is there a better way to get a properly scaled Winbox interface on Linux?
You do not have the required permissions to view the files attached to this post.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10183
Joined: Mon Jun 08, 2015 12:09 pm

Re: Winbox display scaling on Linux/Wine for HiDPI screens

Sun Aug 25, 2019 10:09 pm

No.
 
joris77
just joined
Posts: 2
Joined: Thu Dec 27, 2018 4:09 pm

Re: Winbox display scaling on Linux/Wine for HiDPI screens

Thu Jan 02, 2020 11:31 am

Same issue here. For now I use winbox in a VM or configure RouterOs in a webbrowser...
Would be nice to understand what is causing the problem and how to fix it.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10183
Joined: Mon Jun 08, 2015 12:09 pm

Re: Winbox display scaling on Linux/Wine for HiDPI screens

Thu Jan 02, 2020 3:29 pm

Scaling is always difficult to get right, try some other applications and you will find what I mean.
However in this particular case it is even more difficult because everything is coded at pixel level with hardcoded fonts.
Winbox is by far not the only Windows application with this problem...

IMHO webfig should be enhanced to include all features of winbox (several windows, selectable columns, copy feature etc etc) which really is possible in a webapp today.
The scaling feature of the webbrowser can then be used to solve this problem.
Then, winbox can be deprecated or kept only for the users who really want to have it (e.g. in a separate package in the router).
 
User avatar
jvanhambelgium
Forum Veteran
Forum Veteran
Posts: 985
Joined: Thu Jul 14, 2016 9:29 pm
Location: Belgium

Re: Winbox display scaling on Linux/Wine for HiDPI screens

Thu Jan 02, 2020 3:31 pm

Same "issue" here. Mostly since some time I now use WebFig which cover 95% of the requirements but sometimes also behaves funny on a Chrome browser during add/editing FW-rules.
Winbox on a Linux system is such a pain in the *ss.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10183
Joined: Mon Jun 08, 2015 12:09 pm

Re: Winbox display scaling on Linux/Wine for HiDPI screens

Thu Jan 02, 2020 4:17 pm

Well it works OK here but I always make sure to only buy screens with "normal" DPI values (around 75-110)....
 
joris77
just joined
Posts: 2
Joined: Thu Dec 27, 2018 4:09 pm

Re: Winbox display scaling on Linux/Wine for HiDPI screens

Sat Nov 28, 2020 1:24 pm

Just tried this again and it seems this is fixed. At least for me. If I change the screen resolution in winecfg to 216 and open the latest winbox with wine it looks very good. I am not sure if this is wine getting better at hidpi or that winbox had some improvement. But I am very happy. \o/

Being able to open multiple windows in winbox on the same screen is a lot easier than switching between multiple browser tabs..
 
pe1chl
Forum Guru
Forum Guru
Posts: 10183
Joined: Mon Jun 08, 2015 12:09 pm

Re: Winbox display scaling on Linux/Wine for HiDPI screens

Sat Nov 28, 2020 2:10 pm

Yes it was fixed in a later release.
But note that the ability to open multiple windows in winbox and not in webfig is just a limitation of the current webfig, this can be solved by MikroTik.
There are other devices that have web configuration and that do allow a structure similar to winbox (different windows inside the browser pane).
For example, look at Synology NAS.
 
njmsa
just joined
Posts: 3
Joined: Wed Jul 18, 2018 12:56 pm

Re: Winbox display scaling on Linux/Wine for HiDPI screens

Fri Sep 10, 2021 9:56 pm

How do I go about implementing this workaround on an M1 Macbook using wine? How do I install vncserver and vncviewer in this environment? Are there any new/better workarounds that I can also try? #desperate
 
pe1chl
Forum Guru
Forum Guru
Posts: 10183
Joined: Mon Jun 08, 2015 12:09 pm

Re: Winbox display scaling on Linux/Wine for HiDPI screens

Fri Sep 10, 2021 10:20 pm

This is an old topic, the current winbox version allows zoomin/zoomout in the program itself.

Who is online

Users browsing this forum: oliverlexis, Renfrew and 54 guests