this post was submitted on 18 Jan 2025
53 points (96.5% liked)

Technology

61203 readers
4541 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each other!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed
  10. Accounts 7 days and younger will have their posts automatically removed.

Approved Bots


founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] MonkderVierte@lemmy.ml 1 points 3 days ago* (last edited 3 days ago) (5 children)

It was due to neccesity too that light on dark was used in CLI environments, due to the way CRT work, not because it's superior or whatever. It could even be argued that the blue background of some tools was the equivalent of a light mode.

[–] tal@lemmy.today 2 points 3 days ago* (last edited 3 days ago) (4 children)

It was due to neccesity too that light on dark was used in CLI environments, due to the way CRT work, not because it’s superior or whatever.

No, you can run dark-on-light material on CRTs just fine. Literally all of the screenshots I have in the above post with dark-on-light are of computer systems that were sold with CRTs. The transition to LCDs didn't come until something like twenty years after the transition from light-on-dark.

[–] MonkderVierte@lemmy.ml 1 points 3 days ago* (last edited 3 days ago) (3 children)

I thought more of earlier models and then usus. Ok, maybe not 100% neccessity.

Btw, does tty have a background-/color option?

[–] tal@lemmy.today 1 points 3 days ago (1 children)

I'm not sure what you mean by "tty".

Televisions or computer displays? They didn't (well, normally, probably some television out there that can do it) -- if you plug an Apple II into a television or a display, it's just gonna be light-on-dark.

Hardware dumb terminals, like VT100s? I've never seen one configured that way, but it might be possible that some supported running in light-on-dark mode. There are escape codes that will throw the terminal into showing reverse mode, and that was used for stuff like highlighting text, but I don't know if there was an option invisible to the remote end to reverse colors. Like, you could set some of the default terminal modes at boot, stuff like terminal speed and such, but I don't know if there's a persistent flag that would always override what the remote end was using.

kagis

https://vt100.net/docs/vt510-rm/DECSCNM.html

Screen Mode: Light or Dark Screen

This control function selects a dark or light background on the screen.

Default: Dark background.

https://vt100.net/docs/vt100-ug/chapter3.html

Screen:

Changeable from Host Computer? Yes (DECSCNM)

Saved in NVR and Changeable in SET-UP: Yes

So on the VT100, there was a flag you could set that would be saved in nonvolatile memory that would persist across terminal boots, but it also could be flipped by the remote end, wasn't invisible to it. If you used escape sequences that fiddled with the color mode, I'm not sure if it'd retain that.

Virtual terminal programs? xterm has -rv/+rv, which flips the foreground/background color, and pretty much all virtual terminal programs have some way to configure the 8/16 ANSI colors they use. If you're talking changing how they interpret 8-bit color codes or 24-bit color codes, I don't believe that I've typically seen some sort of mapping system in virtual terminal software -- like, normally one configures software emitting those color codes on a per-program basis; normally, software that uses one of those will also have configurable color options. Like, Cataclysm: Dark Days Ahead, which uses IIRC 8-bit color, has a default set of colors, a set of alternate themes, and can be configured on a per-color basis. Ditto for emacs. Most console software uses the ANSI colormap, so remapping that in virtual terminal software handles most cases. Use of either 8-bit or 24-bit color by console software is fairly rare, so that's tolerable today, though I imagine that if use becomes really common, that maybe virtual terminal software will try to add some sort of high-level mapping of colors.

[–] MonkderVierte@lemmy.ml 1 points 2 days ago (1 children)

My bad, i meant getty, the initial terminal service.

[–] tal@lemmy.today 0 points 2 days ago* (last edited 2 days ago)

Probably, as I imagine that if it can display a configurable prompt, it can send whatever escape sequences it wants. Like, I expect that one could set it to show the prompt with whatever colors one wants. But it won't govern what software does to the terminal subsequent to handing off control to that software.

My system uses agetty. From its man page:

  The issue files may contain certain escape codes to display the system name, date, time et cetera. All escape codes
  consist of a backslash (\) immediately followed by one of the characters listed below.
  e or e{name}
      Translate the human-readable name to an escape sequence and insert it (for example: \e{red}Alert text.\e{reset}).
      If the name argument is not specified, then insert \033. The currently supported names are: black, blink, blue,
      bold, brown, cyan, darkgray, gray, green, halfbright, lightblue, lightcyan, lightgray, lightgreen, lightmagenta,
      lightred, magenta, red, reset, reverse, yellow and white. All unknown names are silently ignored.

So if you insert the relevant escape sequences into /etc/issue, you can have the login prompt screen be whatever set of colors you want.

I don't have agetty do that, but I do use emptty on tty7. emptty is a console-based display manager -- that is, I log in on a console and then start Sway from that. On Debian, emptty defaults to showing a color prompt (I mean, it's a light-on-dark prompt by default, but I'm sure that one could set it up to do whatever).

EDIT: /etc/emptty/motd

load more comments (1 replies)
load more comments (1 replies)
load more comments (1 replies)