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

Strange behavior related to entry names #160

Closed
JFFWhiteside opened this issue Nov 25, 2024 · 13 comments · May be fixed by #161
Closed

Strange behavior related to entry names #160

JFFWhiteside opened this issue Nov 25, 2024 · 13 comments · May be fixed by #161
Assignees
Labels
bug 🐛 A real glitch has been found

Comments

@JFFWhiteside
Copy link

Installed archey4 for debian and in the config.json file it looks normal but when I launch a terminal emulator all the entries will say something like :
ruemUser
ruemHostname
ruemModel

and so on..

I can't tell what to edit in my config.json that will make it display normally. In fact I have not even edited it yet...

Screenshot_20241125_154717

@HorlogeSkynet
Copy link
Owner

Hello @JFFWhiteside, it's indeed a strange behavior. Do you use RubyEmacs ? Could you give more details about your environment ? Mostly environment variables (with redacted sensitive information) and terminal emulator.
Thanks, bye 👋

@HorlogeSkynet
Copy link
Owner

If possible, could you also include the content of your /etc/os-release file ? 🙁
Thanks 🙏

@HorlogeSkynet HorlogeSkynet self-assigned this Nov 26, 2024
@HorlogeSkynet HorlogeSkynet added the bug 🐛 A real glitch has been found label Nov 26, 2024
@JFFWhiteside
Copy link
Author

JFFWhiteside commented Nov 26, 2024 via email

@JFFWhiteside
Copy link
Author

JFFWhiteside commented Nov 27, 2024 via email

@HorlogeSkynet
Copy link
Owner

HorlogeSkynet commented Nov 27, 2024

Sorry for the delay @JFFWhiteside 🙏

So the debug isn't straightforward for me here. If sources haven't been altered, I really wonder what could cause this.
Although, could you try running NO_COLOR=1 archey and/or archey -jj in order for us to check whether it's a rendering issue, or somehow another internal one ?

Thanks ! Bye 👋

@HorlogeSkynet HorlogeSkynet changed the title Archey4 config file Strange behavior related to entry names Nov 27, 2024
@ingrinder
Copy link
Collaborator

Hi @JFFWhiteside (and hi @HorlogeSkynet!),

I've also had a quick look into this and have some other questions that might help to narrow it down a little:-

  • Do you happen to have any other file called config.json in your home directory?
  • What Python version do you have installed? (python --version)
  • How did you install Archey? (pip install, deb file, cloning git master etc)

The only pathway I can see for this occurring is via an entries_color being set to something invalid via configuration (e.g. any letter except m followed by rue: such as rrue) as the logo and the entry name text is coloured correctly. I tested on a fresh Debian VM installing via the deb file, and couldn't reproduce unless I set an invalid configuration in this way. It could be coming from the entry name itself but the invalid colour would explain the trailing m.

Along with the suggestions from @HorlogeSkynet would you also be able to try setting "entries_color": "0;m" in your configuration and testing whether this changes your output?

Hope we can get to the bottom of this!

Cheers,
Michael

@JFFWhiteside
Copy link
Author

JFFWhiteside commented Nov 30, 2024 via email

@HorlogeSkynet
Copy link
Owner

Correct me if I'm wrong but we still got an issue here : @JFFWhiteside you seem to have something messing up your terminal emulator and we're not bullet-proof against that.

Could you confirm us :

  1. No config.json has been modified when you've first encountered this issue, mostly entries_color option ?
  2. grep -ri ANSI_COLOR /etc /usr/lib gives you no match ?
  3. What is the output of echo $PS1 $PS2 $PS3 $PS4 on a blank new KDE Konsole ?

Many thanks, bye 👋

@ingrinder
Copy link
Collaborator

Indeed, "0;" will workaround the issue but ideally we need to fix the issue so it doesn't occur in the first place. Was there any extra gibberish other than the previous "ruem" when you tried "0;m"? The other information will also be vital in figuring out where the problem is coming from so we can make sure no other users experience it!

@JFFWhiteside
Copy link
Author

JFFWhiteside commented Dec 5, 2024 via email

@ingrinder
Copy link
Collaborator

ingrinder commented Dec 5, 2024

other than to set the "entries color": to true

Ah! That's the issue -- entries_color is interpreted as part of an escape code to set an exact colour (e.g. "0;32" would be green by substituting it into the output as \x1b[0;32m), so setting "true" causes it to emit \x1b[truem -- I'm guessing t terminates the escape code so the ruem is then emitted as plaintext. I think you should just be able to leave entries_colour blank and colour should work fine?

I see what's happened, the description in the readme describes the options in the comments above them rather than below but it's easy to mix them up. @HorlogeSkynet we should probably add newlines to space that out better or rearrange somehow (and perhaps validate the entries_color too) if that sounds good?

Glad to find the root cause! Hope the rest of your time using Archey is trouble-free 🤞

Cheers,
Michael

@HorlogeSkynet
Copy link
Owner

👌✅✅ @ingrinder, awewome suggestions.

@HorlogeSkynet
Copy link
Owner

Please see #161 ! Bye 👋

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 A real glitch has been found
Projects
Status: DONE
Development

Successfully merging a pull request may close this issue.

3 participants