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

find_orb messes up terminal colour map #26

Open
Mikea1985 opened this issue Oct 7, 2020 · 5 comments
Open

find_orb messes up terminal colour map #26

Mikea1985 opened this issue Oct 7, 2020 · 5 comments

Comments

@Mikea1985
Copy link

Running find_orb in a linux terminal seems to mess up the terminal's colour map, in a way that persists after find_orb is no longer in use, persisting until the terminal is closed (fortunately it does not persist when a new terminal is opened). This is somewhat annoying when working on a small laptop monitor, as I don't really have screen real-estate enough to have multiple terminals up, so it's easiest to use one terminal for everything, but once the terminal has been used for find_orb, it's very straining on the eyes to try to use the terminal for other tasks (like browsing files, editing observations/scripts/commands, etc).
Here are a before and after screenshot from a test directory showing the change of colours:
Before:
before
After:
after

Is there some way to fix this so that the original colours return when find_orb is exited? Perhaps rather than changing the colour scheme of the terminal, find_orb just uses specific colours? Alternatively, when it changes the colour scheme, it could save the old settings in a backup somewhere and set them back when find_orb is exited.

@Bill-Gray
Copy link
Owner

Well, that's a new one on me. I do sometimes see odd things if Find_Orb crashes. Normally, the ncurses library will reset the terminal on exit to its initial configuration, but if it crashes, you don't get that. I don't think that's what's going on here, though, because I don't see remnants from Find_Orb's display. It looks as if it exited normally, but left you with weird colors. Is that accurate?

In what terminal are you running? I'm usually using xfce4-terminal, sometimes rxvt. I see an Ubuntu logo on the screen shots, but I'm not really familiar with Ubuntu. ncurses is famously good at handling a variety of terminals, but yours may be an exception.

If you run reset in the terminal, do you recover your original colors?

@Bill-Gray
Copy link
Owner

Also, it occurs to me that I should ask : do the screen colors you see when Find_Orb is running resemble those shown here?

@Mikea1985
Copy link
Author

Mikea1985 commented Jul 22, 2021

Sorry, I got sidetracked and forgot to continue responding to this issue.

Well, that's a new one on me. I do sometimes see odd things if Find_Orb crashes. Normally, the ncurses library will reset the terminal on exit to its initial configuration, but if it crashes, you don't get that. I don't think that's what's going on here, though, because I don't see remnants from Find_Orb's display. It looks as if it exited normally, but left you with weird colors. Is that accurate?

That appears to be accurate. I see no remnant of the find_orb interface, just remnants of the colour-scheme.

In what terminal are you running? I'm usually using xfce4-terminal, sometimes rxvt. I see an Ubuntu logo on the screen shots, but I'm not really familiar with Ubuntu. ncurses is famously good at handling a variety of terminals, but yours may be an exception.

I'm using xterm-256color / gnome-terminal on Ubuntu 18.04, as well as xterm-256color on CentOS 7 (via SSH).

If you run reset in the terminal, do you recover your original colors?

It does!

Also, it occurs to me that I should ask : do the screen colors you see when Find_Orb is running resemble those shown here?

Yes, that's exactly what it looks like.

Additional note: This happens both on my Ubuntu system where I run find_orb locally, and on a remote machine that I ssh into. When it happens on the remote machine, the weird colour-scheme persists even after I disconnect the ssh connection (it's not clear to me that that is necessarily surprising, but I thought I'd mention it).

@Bill-Gray
Copy link
Owner

Hmmm... just tried it in gnome-terminal on Xubuntus 20.04 and 18.04. The latter did cause me to see a compilation error that I'll have to fix (failed to find wide-character ncurses automatically), but neither misbehaved in the manner you described. I also tried ssh-ing into a CentOS machine; that also worked correctly.

In both cases, I was running a 'current' version of the source code... is that possibly an issue? It could be I had something messed up badly when this issue arose nine months ago and fixed it since then without noticing it. (Worth doing a 'git pull' and re-make/re-install anyway; various things have improved since then.)

Maybe it's an ncurses version thing. When running Find_Orb on an object, try hitting '.' (dot/stop/period). You should get some debugging text such as

xterm with 256 colors
xterm-256color
ncurses 6.2.20200212
65536 pairs of 256 colors
Colors are changeable
Using DE430/LE430;  covers years 1550.0 to 2650.1

If TERM is set to xterm-256color, as you describe, things really shouldn't be all that exotic. But it's worth a check... will give this a bit more thought and see up with what I can come.

@yangyang-studio
Copy link

SOFTWARE 9.1 ORDER ISSUES

Hello!
I bought the software from your website on December 27 last year. When will you ship it? I hope to get back to me with a shipping message as soon as possible.

Thanks again!

2021 十二月 27 15:32:36 GMT+08:00
PayPal Transaction number : 2NL27119DR058581G

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

3 participants