Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command window stays open #72

Closed
jpvlerbe opened this issue Dec 4, 2018 · 13 comments
Closed

command window stays open #72

jpvlerbe opened this issue Dec 4, 2018 · 13 comments

Comments

@jpvlerbe
Copy link

jpvlerbe commented Dec 4, 2018

Hi

Thank you for this wonderful project, that solved a lot of my issues.

I configured PX to run at boot by running px --install. However, now the command window opens (and stays open) after boot. If you close the window the proxy server is also shut down. Is there a way to run px without keeping the CMD window open?

In the case that you get it working without the CMD window open, how can you shutdown px then? For instance in the case you are working at another location not behind a proxy.

@genotrance
Copy link
Owner

Glad px is useful :)

How did you install px?

@jpvlerbe
Copy link
Author

jpvlerbe commented Dec 4, 2018

If I remember correctly, I have installed through pip. However I have been using it for a while already, so I am not that sure.

@genotrance
Copy link
Owner

Do you see the popup even if you run px after logging in? Can you check the version of px with px --help? What version of Python are you using?

@jpvlerbe
Copy link
Author

jpvlerbe commented Dec 4, 2018

px version: v0.4.0
python version: 3.6.7

Before I was using it manually by running it in the commandline (then the window obviously had to stay open). Today I installed it using px --install. After rebooting px ran automatically but the cmd window stayed open. I will try and reboot shortly and report back.

@genotrance
Copy link
Owner

You can always exit px with px --quit if it is running in the background.

Meanwhile, I checked and for some reason I've configured pip to run px in the console using console_scripts instead of gui_scripts. I'm not sure why I did this but I suspect there was some issue with the shim that pip creates. I'll check and let you know if this can be changed.

@jpvlerbe
Copy link
Author

Any news on this?

@JasonRoesbeke
Copy link

Would like to also have it running in the background
@genotrance any update on this?

@moritzrupp
Copy link

This is still not working. If you install px with pip or python setup.py install, the command windows will stay open. Only if you directly use the provided px.exe file it is working as expected.

@Loriden
Copy link

Loriden commented Aug 20, 2019

I'm also experiencing this issue - installed via PIP. If i can provide any more detail to help resolve, please ask.

Px v0.4.0
pip 19.2.1 from c:\python37\lib\site-packages\pip (python 3.7)

@Postlagerkarte
Copy link

Any news on this? Having the same issue. /cc @genotrance

Version: 0.4.0 installed via pip on windows 10

@datadu-de
Copy link

would like to get rid of the cmd-window as well 👍

@crumpetcrusher
Copy link

running from pip or just px.py will leave the command window up, same for when you install it to start at boot

to run the latest code, clone the repo and compile it to .exe as shown in the travis.yml file:

https://github.com/genotrance/px/blob/master/.travis.yml#L38-L44

  • install dependencies
  • compile px.py
  • run pyinstall to build exe

drop that in a folder of your choosing and run the config/install to have it start in the background properly.

@genotrance
Copy link
Owner

Meanwhile, I checked and for some reason I've configured pip to run px in the console using console_scripts instead of gui_scripts. I'm not sure why I did this but I suspect there was some issue with the shim that pip creates. I'll check and let you know if this can be changed.

I finally checked and yes, using gui_scripts prevents px from printing anything to the console, even with the --foreground flag. I'm fixing this issue by recommending folks simply use pythonw -m px to run in the background since this method supports --foreground when needed. And if anyone likes the console hanging around, python -m px can be used.

px.exe created by pip will persist for now but I am very tempted to get rid of it altogether since it is of minimal value. For now, it is only disappearing from the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants