Skip to content

Allow vpython to be used remotely on a headless Pi #111

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

Closed
wants to merge 3 commits into from

Conversation

dannystaple
Copy link

These changes are designed for using VPython on a headless (no screen/keyboard attached, remotely operated) Raspberry Pi. This is ideal for graphing or visualizing vectors and sensor data.
It could be used in other headless contexts.

By specifying the environment variables VPYTHON_PORT a specific port number can be chosen instead of randomly assigning a free one. This means it can consistently offer the same port (useful when headless).

Also on the headless Pi, it will be unable to launch a browser. So setting the VPYTHON_NOBROWSER environment variable just prints the URL instead.

It's imperfect, in that it still prints a "localhost" address instead of the device hostname (or .local name), and it seems not to play well with being closed, and then reopened on the same port (some kind of port binding issue).

A further todo of mine would be to change the exit conditions - so it's not down to the last browser to leave, but instead a specific stop condition. This time perhaps based on a runtime setting.

vkotaru added a commit to vkotaru/vpython-jupyter that referenced this pull request Aug 20, 2022
@mwcraig
Copy link
Contributor

mwcraig commented Aug 31, 2022

@dannystaple -- another PR with similar changes just got merged (#219). I'd like to also add you to our contributors list even though this PR won't be merged. Would you like to be listed as "Danny Staples" or something else?

@dannystaple
Copy link
Author

@dannystaple -- another PR with similar changes just got merged (#219). I'd like to also add you to our contributors list even though this PR won't be merged. Would you like to be listed as "Danny Staples" or something else?

"Danny Staple" would be good. Thank you. I'll close this as the other PR covers the same ground.

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

Successfully merging this pull request may close these issues.

None yet

2 participants