torproject / nyx

Command-line monitor for Tor.
https://nyx.torproject.org/
GNU General Public License v3.0
123 stars 26 forks source link

Nyx has glichty text if using zsh, ohmyzsh and the zshrc from kali linux with a login shell. #50

Open arch-user-france1 opened 2 years ago

arch-user-france1 commented 2 years ago

Always when I open nyx I see glichty text, like instead of No nyxrc loaded, No yxcr loaeda or lke this.

The worst is that there is stuff in the graphs (0;7[0;), seem to be color definers. Only happens on start. The first line is someting completely screwed up. Doesn't happen, if I try with zsh, only when using login shells (eg. tty 2...).

arch-user-france1 commented 2 years ago

There might also be text not appearing correctly or text one line higher up than it has to. Currently I see u: 0.0.0% instead of cpu: 0.0%. I see em instead of mem, and always after the pid, there is a .. space missing. so: pid: PIDuptime: UPTIME(may be wrong because of these glitches).

atagar commented 2 years ago

Hi france1. Could you please upload a screenshot? On first blush this sounds like https://nyx.torproject.org/#broken_borders but it's hard to tell from the description.

arch-user-france1 commented 2 years ago

Not broken borders. It's only happening when I start nyx, stop it and don^'t wait like 1 min. Screenshot,,,.

arch-user-france1 commented 2 years ago

Don't understand it. Doesn't happen anymore.

I'll reopen it as soon it starts again and I will make a screenshot (with phone since I'm using ttys)

arch-user-france1 commented 2 years ago

IMG_20220101_192158 H IMG_20220101_192550 Happened again after restart of Tor AND nyx! Happens over and over until you don't use nyx for a while, even if you try restarting it all the time.

arch-user-france1 commented 2 years ago

It goes away if I switch to another view than the graph and go back to graph view but the things above don't go away. I can refresh the first line by opening the menu in case this is broken but the menu could not refresh this weird reject-flag stuff. Basically nyx should refresh all partially (not all at once) after start.

atagar commented 2 years ago

Yikes! That's really messed up. I'm seeing multiple problems:

Honestly this looks like terminal emulation bugs to me. You mentioned using Nyx on your phone. Perhaps these are glitches due to that?

If you set "color_interface false" in your nyxrc that should remove the ANSI sequences. I've seen similar terminal glitches in extreme edge cases (for instance if I leave Nyx running in a detached screen session for a month) but I've never been able to reliably reproduce situations like this. Sadly I doubt this is something we'll be able to address on our end....

arch-user-france1 commented 2 years ago

I'm not using it on the phone

I'm using it with a tty, using the kali Linux zshrc and ohmyzsh (a zshrc too)

It doesn't come if you didn't use nyx for a long time. Once it works it will work until Tor is restarted.

These glitches randomly appear and have to be fixed in the code of nyx. The log isn't always messed up, but these problems randomly occur until you wait a long time. Then it works fine, until Tor is restarted (eg. systemctl restart tor). Never tried if it works if I only reload Tor.

arch-user-france1 commented 2 years ago

The problem is that I'm using a login shell. You can change to one by: fn (on Apple) + ctrl + alt + cmd/super/windows F4. To go back to your desktop environment use F7, F1 or F2 (depends on desktop environment)

Only works if using Linux.

arch-user-france1 commented 2 years ago

It seems that nyx is messed up after every restart of Tor, no matter if nyx was freshly startend or not, but it's worse if it didn't run before. After already (guessing) 5 minutes it should work.

Another issue by me: #52