Page 1 of 1

Setting and/or resetting system command line font without X?

Posted: Thu 24 Jan 2013, 01:02
by Monson
I'm seeking for a solution of configuring font and size of puppy CLI font when the system comes up.

I do use puppy to configure or install other distros as well as work in non-X environments with puppy on systems with low mem and/or low cpu power and when usage of

Code: Select all

links ...
is more effective for my need of a browser than an X-environment for Mozilla-Firefox.

I'm searching for a solution prior to start of X with xwin. All solutions I found while searching the forums and using google were not helpful in any way, always using rxvt in a started X environment and of no use to solve my problem.

The reason why I need to change the font is easy. I may want to choose a font I use on my gentoo system like default8x9 instead of default8x16.

And I may want to use a different layout for VGA=ask when booting, I often use 80x60 (80 chars on 60 lines) instead of the standard 80x25 (80 chars on 25 lines), results in more lines of text displayed on my laptop window.

Sometimes I use

Code: Select all

less ...
to display contents of files of unknown length for a quick view and

Code: Select all

cat ...
for known lengths of files.

Sometimes this results in a destroyed font or keymap in the current CLI, please view the attached pic to see what I mean.

I need a solution to reset the font/keymap in the appropriate CLI terminal other than rebooting the system.

Even though I have configured my puppy to use more terminals when starting the system, losing one or two terminals is quite annoying.

When being in the middle of configuring a new system a restart of puppy is not the solution I have in mind. And killing the terminal doesn't help either, I already tried that

Code: Select all

kill -9 <Process-ID of terminal>
.

Can anybody help me find a solution or have one handy?

A bump in the right correction may also be of help.

Posted: Thu 24 Jan 2013, 03:55
by npierce
Monson wrote:I'm seeking for a solution of configuring font and size of puppy CLI font when the system comes up.
Console fonts on the Puppies I've seen live in the /lib/consolefonts/ directory, and may be set with the setfont command (in the text console, of course, not a terminal window like rxvt). For instance:

Code: Select all

setfont /lib/consolefonts/lat1-12.psfu.gz
Support for the text console is not one of Puppy's strengths. The Puppy Racy 5.2.2 that I'm using at the moment has only lat1-12.psfu.gz and lat2-12.psfu.gz, but some newer Puppies also have LatArCyrHeb-16.psfu.gz and LatGrkCyr-8x16.psfu.gz. You may want to copy the ones you want to use from your other distros, or seek them out on the Internet.
Monson wrote:Sometimes I use

Code: Select all

less ...
to display contents of files of unknown length for a quick view and

Code: Select all

cat ...
for known lengths of files.

Sometimes this results in a destroyed font or keymap in the current CLI . . .
The console has probably interpreted some bytes of a binary file as an escape sequence to change your character set or mapping. You can often get back to normal with this command:

Code: Select all

reset

Posted: Thu 24 Jan 2013, 04:36
by Monson
OK now, I did have luck to find a workaround on the restoring of the scrambled terminal font.

I was trying to find out what hardware my new system uses and as I always configured sound on my installed puppy distros I called

Code: Select all

alsamixer
on the command line.

Alsamixer showed the correct font and after exiting, the regular font was restored, the scrambled one vanished.

Maybe that helps to solve the problem? I do hope so.

I forgot to post my current system:
Pentium I with 64mb and 8gb Flashdisk on a SDHC-Chip, Puppy 4.21 installed in a subdir /puppy421 on an ext3-partition.
Partition boot written to mbr with lilo 22.8. which I found compatible with Puppy 4.21, as I'm no fan of grub. I compiled it separately on my gentoo system and copied the binary to Puppy.


@npierce:
Thanks for your bump, I found the possible fonts you mentioned for puppy in

Code: Select all

/usr/share/kbd/consolefonts/
Listed were:
lat1-12.psfu
lat2-12.psfu

I'll next try to find my gentoo fonts and see if I can use them in puppy.

I'll report the results here.

Posted: Thu 24 Jan 2013, 18:13
by amigo
'reset' is the answer -just type that in -even though you can't see the proper output on the screen as you type.
To avoid this happening, always use less instead of cat when working in the CLI. cat-ing binary files will always mess the screen, while less will warn you.

Re: Setting and/or resetting system command line font without X?

Posted: Thu 24 Jan 2013, 18:49
by L18L
Monson wrote:...I need a solution to reset the font/keymap in the appropriate CLI terminal other than rebooting the system....
A bump in the right correction may also be of help.
With recent puppies console font is set in initrd.gz:
initrd.gz wrote: #120216 L18L suggests load these, instead of what is below...
case $PLANG in
en*) echo ;;
ar*|iw*) #L18L no Greek
setfont /lib/consolefonts/LatArCyrHeb-16.psfu.gz -C /dev/tty1
FONTMAP='LatArCyrHeb-16.psfu'
;;
*) #L18L All European languages; new default ?!
zcat /lib/consolefonts/LatGrkCyr-8x16.psfu.gz | loadfont
FONTMAP='LatGrkCyr-8x16.psfu'
;;
esac
Thus I think you should try
- zcat .....
and / or
- setfont ........ -C /dev/ttyx