You are not logged in.

#1 2019-03-09 16:09:23

jdt123
Member
Registered: 2019-02-26
Posts: 5

Justify vconsole text messages

How do i left justify text messages on shutdown console from :

XXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXX
XXXXX XXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXX

To:
xxxxxxxx
xxxxxxxx
xxxxxxxx

Offline

#2 2019-03-09 16:25:03

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,611

Re: Justify vconsole text messages

You mean t
o literall
y create t
his sort o
f output?

man fold
man fmt
sed 's/.\{8\}/&\n/g'

However, this sounds like an xy-problem - what do you actually want to do?

Online

#3 2019-03-09 16:30:54

jdt123
Member
Registered: 2019-02-26
Posts: 5

Re: Justify vconsole text messages

I want to know what system change I need to make so that the all shutdown messages shown on the console are neatly left justified on the screen. And also perhaps change the font and font size of these messages

Offline

#4 2019-03-09 16:36:00

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,611

Re: Justify vconsole text messages

That depends on where those "shutdown messages" come from.
To set the console font, see https://wiki.archlinux.org/index.php/Li … sole#Fonts
What exactly do you mean by "neatly left justified"?
Justified alignment like in a word processor is obviously not possible on the console since it requires dynamic whitespace adjustment. The text should be left aligned - if it starts offset, there's probably an issue w/ the PS1 of some active shell on that console.

Online

#5 2019-03-09 16:48:40

jdt123
Member
Registered: 2019-02-26
Posts: 5

Re: Justify vconsole text messages

Yes the text messages do start offset, where do you suggest I begin to look for a problem

Offline

#6 2019-03-09 16:51:00

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,611

Re: Justify vconsole text messages

To be sure:
    it looks somwhat like this?
          Every line starts more indented?

That's by 99% chance an issue with your PS1 - lmg: you're using zsh and OMZ?

Online

#7 2019-03-09 17:04:04

jdt123
Member
Registered: 2019-02-26
Posts: 5

Re: Justify vconsole text messages

Yes the messages display/print right across the screen instead of each message left justified, one under the other .

Sorry do not understand what you mean by :

you're using zsh and OMZ?

Offline

#8 2019-03-09 17:23:56

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,611

Re: Justify vconsole text messages

echo $SHELL
echo $PS1
https://github.com/robbyrussell/oh-my-zsh - don't install that if you don't have already. It's terrible.

Online

#9 2019-03-09 17:37:07

jdt123
Member
Registered: 2019-02-26
Posts: 5

Re: Justify vconsole text messages

jorge on Sat Mar 09 at 06:55  in ~ branch: (HEAD)
>> echo $SHELL
/bin/bash


jorge on Sat Mar 09 at 07:35  in ~ branch: (HEAD)
>> echo $PS1
\n\n\[$PINK\]\u \[$LBLUE\]on \[$PURPLE\]\d \[$LBLUE\]at \[$ORANGE\]\@\[$LBLUE\] in \[$GREEN\]\w \[$ORANGE\]`_git_prompt` \n\[$GREEN\]>> \[$YELLOW\]

Offline

#10 2019-03-09 20:30:58

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,611

Re: Justify vconsole text messages

This looks like a dynamic PS1, what did you add to your bashrc for this?

Online

Board footer

Powered by FluxBB