0

Ubuntu uses pam_motd to display the message of the day (motd) when logging in. This message is in turn generated from the scripts in /etc/update-motd.d.

Inside one of those scripts I would like to check if the terminal used supports Sixels.

I tried using the LC_TERMINAL variable, but it is not set yet. I also found out that printing a control code with echo -n "\u001B[0c" allows to check for Sixel support, but I have found no way to capture and examine the output in the script. I also do not know if this even would work inside a script run by PAM.

So

  • Is there a way to get LC_TERMINAL passed to the script when logging in with SSH?
  • Is there a way to capture the output of echo -n "\u001B[0c" in the motd script and examine it?
  • Is there any other way to check for Sixel support in the motd script?
Jochen
  • 191
  • 1
  • 1
  • 7

0 Answers0