genotrance / px

An HTTP proxy server to automatically authenticate through an NTLM proxy
MIT License
955 stars 99 forks source link

px 0.9.0 - Windows: does not start as a background service anymore (openes a required console window) #203

Closed marcOcram closed 8 months ago

marcOcram commented 9 months ago

I just replaced 0.8.4 with 0.9.0 (using the same configuration file) and now px starts a console window on login which stays.

image

Tried a bit to fiddle with definining foreground=0 inside the configuration or directly via cli but the console window stays.

genotrance commented 9 months ago

Considering we have moved away from Nuitka for Windows thanks to https://github.com/genotrance/px/issues/182 and many similar reports, the px.exe now being shipped is the same as the console pip binary. That takes us back to https://github.com/genotrance/px/issues/72. Creating a GUI script which would not create the console window also prevents anything from being printed to stdout.

The way to solve this is to install px on Windows with .\pythonw -m px --install. That way, it runs in the background on startup. Note the .\ to make sure you use the local Python rather than a system Python elsewhere.

genotrance commented 8 months ago

Updated in v091.

samba2 commented 5 months ago

just to add on, for scoop users, run the mentioned ".\pythonw..." command inside the "px" application dir of your scoop installation. On my PC this was: C:\Users\<username>\scoop\apps\px\current