You are not logged in.

#1 2016-12-26 23:22:00

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Customise /etc/issue -- Bunsen flame logo on the console login screen

Theory

The file at /etc/issue is used to print the information seen on the console login screen that can be accessed with <Ctrl>+<Alt>+F1-F6

In a stock BunsenLabs system, it is as shipped by Debian:

Debian GNU/Linux 8 \n \l

The \n & \l are special characters that print out the hostname and TTY name, respectively.

For more on these special characters, read the ISSUE ESCAPES section of:

man agetty

The /etc/issue file also accepts ANSI escape codes that allow colourisation of the output.

This can be used to generate a natty blue BL flame logo on the login screen smile

Method

I like to use vim to create text files and for that program, whilst in INSERT mode, <Ctrl>+v followed by the <Escape> key will generate the required escape character.

Alternatively, the ANSI code can be entered using the printf(1) command, for example:

printf '\e[0mfoo' > bar.txt

Any suggestions for other methods and/or with different editors would be gratefully received smile

So to generate the Bunsen flame logo, I copy&pasta'd the one in our screenfetch package and added a blue colour code before the logo and a null colour code afterwards so that the console text is re-normalised:

BunsenLabs GNU/Linux 8 \n \l

^[[0;34m            HC]
          H]]]]
        H]]]]]]4
      @C]]]]]]]]*
     @]]]]]]]]]]xd
    @]]]]]]]]]]]]]d
   0]]]]]]]]]]]]]]]]
   kx]]]]]]x]]x]]]]]%
  #x]]]]]]]]]]]]]x]]]d
  #]]]]]]qW  x]]x]]]]]4
  k]x]]xg     %x]]]]]]%
  Wx]]]W       x]]]]]]]
  #]]]4         xx]]x]]
   px]           ]]]]]x
   Wx]           x]]x]]
    &x           x]]]]
     m           x]]]]
                 x]x]
                 x]]]
                ]]]]
                x]x
               x]q
               ]g
              q
^[[0m

https://github.com/Head-on-a-Stick/conf … r/issue.bl

Which translates to:

flame.th.png

cool

The file at /etc/motd can also be altered to change the message that is printed after login.

For more on this, read:

man motd

Last edited by Head_on_a_Stick (2016-12-30 13:48:51)


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#2 2016-12-27 00:42:00

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,929
Website

Re: Customise /etc/issue -- Bunsen flame logo on the console login screen

Looks nice!
I'll have to reboot to see the results here, I guess.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#3 2016-12-30 02:09:43

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,929
Website

Re: Customise /etc/issue -- Bunsen flame logo on the console login screen

btw, use the raw file from github, don't just copy the code above or the colour escape sequences won't work. The '^' character is actually some mysterious ESC thing that doesn't render as a real character either on GitHub's web interface or in Geany, but is needed as-is.

Also I have to look at my tty font size setting in order to get the whole thing to fit in the screen. icon_rolleyes.gif


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#4 2016-12-30 13:46:27

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Customise /etc/issue -- Bunsen flame logo on the console login screen

johnraff wrote:

use the raw file from github, don't just copy the code above or the colour escape sequences won't work.

Ah yes, the ANSI escape code character can be a tricky little blighter smile

For vim, starting from the "beep repeatedly" (normal) mode, press i to enter "break everything" (insert) mode then press <Ctrl>+v (at the same time) and then the <Escape> key (after releasing <Ctrl>&v) to produce an escape code.

Unfortunately, I don't know how to do this with geany hmm

The best I can think of is to create a sample escape code with:

printf '\e' > escape.txt

Then load escape.txt into geany and copypasta away.

johnraff wrote:

Also I have to look at my tty font size setting in order to get the whole thing to fit in the screen.

I like to use the smallest terminus font on the console:

sudo apt install xfonts-terminus console-setup
sudo dpkg-reconfigure console-setup

Then select "Terminus" and the smallest font, on my system this is 6x12:

hd_console.th.png

cool

Hmmm, that grab has me thinking that I should try to match the console colours to the (urxvt) desktop colours in BL...


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#5 2016-12-30 17:28:09

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Customise /etc/issue -- Bunsen flame logo on the console login screen

Head_on_a_Stick wrote:

I should try to match the console colours to the (urxvt) desktop colours in BL...

Place this snippet in ~/.profile:

if [ "$TERM" = "linux" ]; then
    printf "\e]P0000000" # color0
    printf "\e]P19e1828" # color1
    printf "\e]P2aece92" # color2
    printf "\e]P3968a38" # color3
    printf "\e]P4414171" # color4
    printf "\e]P5963c59" # color5
    printf "\e]P6418179" # color6
    printf "\e]P7bebebe" # color7
    printf "\e]P8888888" # color8
    printf "\e]P9cf6171" # color9
    printf "\e]PAc5f779" # color10
    printf "\e]PBfff796" # color11
    printf "\e]PC4186be" # color12
    printf "\e]PDcf9ebe" # color13
    printf "\e]PE71bebe" # color14
    printf "\e]PFffffff" # color15
#   clear # removes artefacts but also removes /etc/{issue,motd}
fi

https://github.com/Head-on-a-Stick/conf … lourtty.sh

colourtty.th.png

smile

Last edited by Head_on_a_Stick (2016-12-30 17:38:03)


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#6 2016-12-31 08:54:21

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,929
Website

Re: Customise /etc/issue -- Bunsen flame logo on the console login screen

john@bunsen1:~$ echo $TERM
rxvt-unicode

John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#7 2016-12-31 09:48:14

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,929
Website

Re: Customise /etc/issue -- Bunsen flame logo on the console login screen

Head_on_a_Stick wrote:
sudo apt install xfonts-terminus console-setup
sudo dpkg-reconfigure console-setup

Then select "Terminus" and the smallest font, on my system this is 6x12:

I was only offered 8x14 (the preexisting setting was 8x16) and "Terminus" was in the menu both before and after installing xfonts-terminus (already had console-setup). Changing from "Fixed" to "Terminus", downsizing, and rebooting made no difference to my tty display font size (rather too big).


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#8 2016-12-31 11:28:14

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Customise /etc/issue -- Bunsen flame logo on the console login screen

johnraff wrote:
john@bunsen1:~$ echo $TERM
rxvt-unicode

Try that command again from TTY2 wink

johnraff wrote:

font size (rather too big)

The smaller font sizes are framebuffer-dependent, which graphics card do you have?

Make sure that any resolutions are not being set through the bootloader and/or via the kernel command line:

cat /proc/cmdline

Otherwise, for Intel cards KMS should be enabled by default and the full native resolution should be available on the console screen, this also seems to apply for my AMD laptop.

If you have NVIDIA then I think you will have to use the open driver to enjoy all the benefits.

https://wiki.debian.org/KernelModesetting


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#9 2017-01-04 05:34:56

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,929
Website

Re: Customise /etc/issue -- Bunsen flame logo on the console login screen

Head_on_a_Stick wrote:
johnraff wrote:
john@bunsen1:~$ echo $TERM
rxvt-unicode

Try that command again from TTY2 wink

Ah OK I just twigged that you were colourizing the tty, not a terminal emulator!

If you have NVIDIA then I think you will have to use the open driver to enjoy all the benefits.

NVIDIA I'm afraid, and I'm using the non-free driver because some small glitch came in nouveau's rendering with the upgrade from Wheezy to Jessie.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

Board footer

Powered by FluxBB