wine winbox64.exe

I set up a machine running proxmox with a Ubuntu VM to learn and play on.

I can run:

wine winbox64.exe in a terminal session on the VM.

But, I can’t get it work if I open an SSH session to the machine.

I’m using putty.

This is what I get:


joseph@joseph-Standard-PC-i440FX-PIIX-1996:~$ wine winbox64.exe

0064:err:explorer:initialize_display_settings Failed to query current display settings for L"\\.\DISPLAY1".
0024:err:module:process_init L"C:\windows\system32\winbox64.exe" not found

If I enable X11 forwarding, I get this:


joseph@joseph-Standard-PC-i440FX-PIIX-1996:~$ wine winbox64.exe

0024:err:module:process_init L"C:\windows\system32\winbox64.exe" not found
joseph@joseph-Standard-PC-i440FX-PIIX-1996:~$ PuTTY X11 proxy: unable to connect to forwarded X server: Network error: Connection refused
0064:err:explorer:initialize_display_settings Failed to query current display settings for L"\\.\DISPLAY1".

If I include the display location of “:0.0” in the X11 forwarding I get:


joseph@joseph-Standard-PC-i440FX-PIIX-1996:~$ wine winbox64.exe

0060:err:explorer:initialize_display_settings Failed to query current display settings for L"\\.\DISPLAY1".
0024:err:module:process_init L"C:\windows\system32\winbox64.exe" not found

Am I doing something wrong or can winbox not run in an ssh session?

Thank you.

how about “wine64 winbox64.exe” ?

Nope.



joseph@joseph-Standard-PC-i440FX-PIIX-1996:~$ wine64 winbox64.exe
0034:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
005c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0034:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
005c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0064:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0064:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
006c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
006c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0064:err:explorer:initialize_display_settings Failed to query current display settings for L"\\.\DISPLAY1".
002c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
002c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0024:err:module:process_init L"C:\windows\system32\winbox64.exe" not found

You need an X server running on your Windows PC. putty doesn’t include one, when instructed to forward X11 it only forwards traffic. You may want to have a look at MobaXterm, which includes X server (it’s based on cygwin which is a unix-like environment for Windows machines). Runs just fine. If you go for MobaXterm, you don’t need putty any more, but it’s possible also to run MobaXterm only to provide X server and use putty to do actual ssh connections.

I might be wrong but isn’t Wayland default on Ubuntu Desktop these days? But anyway, Mkx is right about the basic problem, which is Wine not being able to connect to the local display server from ssh.

In case of Wayland:

I’m running Ubuntu 22.04 and legacy X applications work just fine. Also over ssh (both ways). And NoMachine. Because wayland has to include “backward” compatibility layers due to enormous amount of legacy applications that still exist (and will exist for some future).

In fact it was due to buggy backward compatibility that wayland is only recently started to be used as default window protocol … there were pushes to get it included in mainstream distributions quite some time ago but simply wasn’t usable at that time.

Thanks, great info. I agree with all the issues around Wayland. Any idea if standard Wine still uses X? Then it should just be a matter of setting a proper DISPLAY variable.

I’ve been googling and reading and there are lots of references to just setting the DISPLAY variable.

But I’ve been unable to make it work.

Another thing that might be worth looking into: "proxy: unable to connect to forwarded X server: Network error: Connection refused" which might indicate some kind of firewall issue.

See my post #4 above, it explains why setting DISPLAY variable on remote machine is sometimes not enough.

Article on the register indicates that Wine is getting support for Wayland in version 8. My ubuntu 22.04 has wine 6.0.3 installed, so I think it’s safe to assume it still uses legacy X11 protocol.
If I’d have to guess, I’d say that wine 8 will support both Wayland and X11 … probably with preference on Wayland if both are detected.

When one uses X forwarded over SSH tunnel, then X11 is … well, tunneled inside SSH stream and firewalls, apart form one on local PC, can’t distinguish X11 from terminal input/output. So if terminal input/ouptut flows without problems (one can type commands and sees textual output), then it’s not about firewalls running on other devices.
But then, if X server is not running (on local PC), application can’t connect to it, can it?

I assume that Unbutu Desktop already has a working X server since Wine works just fine if launched from a terminal session. However, X server must of course already be running if you want to use it from ssh. In order to connect to the X server even if the login screen is active requires a bit of reconfiguration but it’s doable (and is probably the root cause of the “connection refused” error). On the other hand, perhaps it might be easier to just install an X server on your Windows machine such as VcXsrv Windows X Server.

Btw and completely OT but might be worth knowing for the future: If you use a Windows 10/11 machine, instead of proxmox you can use WSL2 which integrates graphics by default.

hello.

Am I doing something wrong or can winbox not run in an ssh session?

hmm… it’s been a very long time. forgot about the steps, but maybe you could check your :

  • sshd config on your vm, for x11 forwarding. set it to yes. restart the sshd service.

  • your ssh client machine should have x11 system installed as well. ie. x11 Windows for windows clients. if the client was linux, you don’t need it.

  • don’t forget to invoke that x11 display in your ssh line,

for example:
ssh -x – display :0 bla bla bla

then inside the terminal, invoke that wine command.

i am not sure, but you could just tweak that command.

hope this helps.

Guys, don’t clutter the thread. Until OP comes back telling us that he did run X server on his windows machine when using putty to connect to linux machine (where he wanted to run winbox), the reason for wine not running is pretty clear. If X was running (and running MobaXterm, which comes as portable application and is, thus, pretty lightweight to try, does not help), then we’ll dive into other conspiracy theories.

Well, I beg to differ. IMO, I think most of the stuff in this thread is useful for troubleshooting although it would have helped if the said environment was initially more detailed.

I myself never use conspiracy theories, only pure facts! ; -)

@mkx

Guys, don’t clutter the thread. Until OP comes back telling us that he did run X server on his windows machine when using putty to connect to linux machine (where he wanted to run winbox),

ok. i think I could just wait outside :thinking:

If X was running (and running MobaXterm, which comes as portable application and is, thus, pretty lightweight to try, does not help), then we’ll dive into other conspiracy theories.

did you know, another cup of coffee seems not enough :+1:t2:

I do not have an X11 server running on the Windows machine running Putty.

I installed Mobaterm and then discovered missing fonts, I installed ttf-mscorefonts.

Mobaterm works! In fact, it’s a really nice program. Very tempted to switch from Putty for all my SSH needs.

I’m sure this is old hat to you guys, but it’s new to me and I was surprised to see a new window pop up, the size, shape, color, and contents the same as if I were running a local winbox.exe copy.

While in the terminal session the following was going on:


joseph@joseph-Standard-PC-i440FX-PIIX-1996:~/Downloads$ wine64 winbox64.exe
0034:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0034:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
005c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
005c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0064:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0064:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
006c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
006c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
002c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
002c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0024:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0024:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
00cc:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
00cc:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
creating Window Class routeros_null
creating Window Class routeros_connect
DPI=96
EMS=14
ERROR: bad bmp format id=2329
biPlanes=1, biBitCount=1, biCompression=0
ERROR: bad bmp format id=3329
biPlanes=1, biBitCount=1, biCompression=0
creating Window Class routeros_dbl_canvas
Xlib: extension “MIT-SHM” missing on display “localhost:10.0”.
rescaleDPI starting-dpi=96, zoom=0 result=96
discovery started
rescaning
connecting to 127.255.255.255
connecting to 192.168.2.255
loadConfig C:\users\joseph\Application Data\Mikrotik\Winbox\Addresses.cdb
ConnectWindow::onConnect
discovery stopped
startKeyExchange
sending first challenge
recvd peer challenge 49
recvd response
— nv::message --------
u32 [SYS_ERRNO]=ERROR_FAILED
u32 [SYS_TYPE]=TYPE_REPLY
u32 [SYS_STATUS]=STATUS_ERROR
u32 [SYS_REQID]=8 0x8 8.0.0.0
string [SYS_ERRSTR]=cannot open source file
u32 [SYS_TO]=
u32 [SYS_FROM]=2, 2,
~Discovery
discovery stopped
loading C:\users\joseph\Application Data\Mikrotik\Winbox\7.8-358703172\roteros.jg
loading C:\users\joseph\Application Data\Mikrotik\Winbox\7.8-358703172\wlan6.jg
loading C:\users\joseph\Application Data\Mikrotik\Winbox\7.8-358703172\secure.jg
loading C:\users\joseph\Application Data\Mikrotik\Winbox\7.8-358703172\ppp.jg
loading C:\users\joseph\Application Data\Mikrotik\Winbox\7.8-358703172\ipv6.jg
loading C:\users\joseph\Application Data\Mikrotik\Winbox\7.8-358703172\hotspot.jg
loading C:\users\joseph\Application Data\Mikrotik\Winbox\7.8-358703172\dhcp.jg
loading C:\users\joseph\Application Data\Mikrotik\Winbox\7.8-358703172\advtool.jg
loading C:\users\joseph\Application Data\Mikrotik\Winbox\7.8-358703172\dude.jg
loading C:\users\joseph\Application Data\Mikrotik\Winbox\7.8-358703172\ups.jg
ConnectWindow::destroyed
App::saveAllSettings
App::saveAllSettings done
saving settings to .\viw2234.tmp… for C:\users\joseph\Application Data\Mikrotik\Winbox\settings.cfg.viw
settings saved
~ConnectWindow
~ConnectWindow done
run
boardName=
boardArch=
boardFamily=
logged in!!!
creating Window Class routeros_main
creating Window Class routeros_pane
creating Window Class routeros_canvas
MainWindow::start
got qs caps=64
loading all settings
Xlib: extension “MIT-SHM” missing on display “localhost:10.0”.
WindowManager::init end
rescaleDPI starting-dpi=96, zoom=0 result=96
startServices
startServices done
App::saveAllSettings
MainWindow::saveSettings
App::saveAllSettings done
saving settings to .\viw470d.tmp… for C:\users\joseph\Application Data\Mikrotik\Winbox\sessions\192.168.2.2.viw
settings saved
closing down
MainWindow::destroyed
~MainWindow
~MainWindow done
~Connection
exiting
WARNING: deleting font h=0x1e00ab
WARNING: deleting font h=0x80168

Thank you!

hello Joseph,

ok. did you manage to just execute and popping up the winbox? or is it always failed?

if you could just try to popping up xclock and it looks good, then the problem is in the winbox.

  1. please let us know which Linux inside your proxmox. uname -a.

  2. try to execute with wine. not wine64.
    wine winbox.exe

  3. ms ttf font. have you put them inside your home directory?

cd ~
normally, there is a directory .Fonts
put all those ttf fonts there.

  1. have a try. if the problem persist, try sudo wine winbox

good luck :+1:t2:

Thank you for your help.


I was able to successfuly get winbox running in an SSH session by using MobaXterm. I was not able to get it running using Putty. The key being that MobaXterm includes a local X11 server (I hope I wrote that correctly).

Running Ubuntu:


Linux joseph-Standard-PC-i440FX-PIIX-1996 5.19.0-38-generic #39~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 17 21:16:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

I don’t know where I installed the fonts.

I really like MobaXterm:

Capture.JPG