I wanted to share how I have been able to setup a Windows 32 bits executable on Ubuntu x64 using Wine, the EXE has been compiled with Delphi (the same works with Lazarus), the program is an embedded http server listening on port 80, any program listening on low ports (server sockets on ports 25, 80, 110, ...) will obtain WSAEACCESS error when running it,
install Wine on your Ubuntu, then sudo setcap cap_net_bind_service=+ep /usr/bin/wine sudo setcap cap_net_bind_service=+ep /usr/bin/wine-preloader sudo setcap cap_net_bind_service=+ep /usr/bin/wineserver sudo setcap cap_net_bind_service=+ep /home/default/Demos/Bin/Ultima.exe you are ready to run your program using: wine /home/default/Demos/Bin/Ultima.exe maybe you will also need sudo capsh --inh=cap_net_bind_service --uid=1000 to obtain the uid of user "default" (if your username is "default"): id default this setup is very light and provide no routing overhead since it is not using the technique of iptables sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080 which is not always possible since it would require to modify the listing ports inside your program.
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel