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
Fix / Support for Screen ? #25
Comments
Thanks for reporting! Screen is already supported, we just need to figure out why you're having issues in that configuration. I just need a little bit of information to further troubleshoot this.
|
Thanks for the quick reply :) I'm running enlighten I don't actually see the pb when I run the same code in screen on my local computer, though obviously it's not exactly the same configuration (windows for one thing). So maybe it's SSH related ? Minimum example import logging
import enlighten
import time
logging.basicConfig(level=logging.DEBUG)
manager = enlighten.get_manager()
progress = manager.counter(total=100, desc='Prog')
for i in range(100):
logging.getLogger(__name__).info('Running at step {}'.format(i))
print(i)
progress.update()
time.sleep(0.2)
manager.stop() |
Edit: I just realised the multiplying progressbars bug was my wrongdoing, I recreated a new one at each loop, sorry 🙏 |
Is it working as expected now? |
Nop, the screenshots above still show the format pb :) |
Just to be sure we're on the same page, you don't see the issue under these scenarios?
You do see the issue:
|
I don't see the issue
I do see the issue
|
When you SSH without screen, do the bars show up like they do locally (solid blocks) or do they show up as diamonds? Do you have the same behavior if you use CMD or powershell instead of Windows Terminal? Do you have a way of testing ssh under screen from another Linux system? |
What is strange to me are those diamonds. That tells me screen is not passing unicode correctly. Try starting screen with -U or ctrl-a :utf8 on. Also, what version of Python are you using? |
Hurray ! |
It makes sense. Essentially Enlighten is using Unicode because it detects it in the locale on the remote system, but if screen or screen in combination with SSH doesn't know it should be using Unicode, it won't interpret the characters correctly. Unfortunately, I don't really have a way to detect that. I was testing with Fedora and openSUSE and I didn't have the issue, so I'm guessing it's related to the distro's default settings. I can try to add something to the FAQ. |
I use screen to launch long running programs over SSH, and when I discovered Enlighten I figured it would be really cool to use it to monitor the running process.
Unfortunately it seems enlighten doesn't like screen too much (or is it the terminal? sorry I'm new to the terminal world).
I don't know if it's relevant, but the program is running on a Debian 10 on a
screen.xterm-256color
terminal, to which I'm connected via SSH in a WSL environment using Windows Terminal.However everything looks nice in the same environment/terminal when I run it locally.
Concerning the support requirements :
The terminal must be detectable programmatically
echo $STY
Cursor movements
I would guess that that comes from Xterm ?
Terminal dimensions
tput cols / rows
seems to work, not sure if that's enough.Tell me if I missed anything ;) thanks for you awesome work btw!
The text was updated successfully, but these errors were encountered: