LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   'I' cannot see the std console text and need to change it (https://www.linuxquestions.org/questions/linux-newbie-8/i-cannot-see-the-std-console-text-and-need-to-change-it-4175656594/)

someone else 06-29-2019 08:49 AM

'I' cannot see the std console text and need to change it
 
pleased see my next reply for hopefully better description

any help will be great...and thank you.

business_kid 06-29-2019 12:41 PM

I grappled with tiny fonts
  1. In the console, you can use any font from /usr/share/kbd/consolefonts. To change it, use the 'setfont' program. I have installed terminus fonts and have a 'setfont' command for a 28pt font. Terminus fonts go up to 32, but 30 or 32 don't work well here. It's 'setfont <new font>'
  2. In XFCE, use xterm which has a settings tab and do clever stuff there.

ondoho 06-30-2019 03:31 AM

Quote:

Originally Posted by someone else (Post 6010279)
was using sw10.something up from 4.something... and recently moved to sw64.14.2. loaded up fine but the text was smaller than the other versions. chose std console no custom fonts, and rebooted. loading text was still small. i made a change in the boot script and rebooted. the text was much larger (and on two machines much much larger, double line big), but at a point in the load and configure portion lines are rolling up the screen suddenly the text goes back to i believe is the tiny utf-8 font that the setup program stated was the standard now.
i though this was an environment variable and there was a bash command to exec, but i have spend a good amount of time trying to find where/how to change this because i want to figure stuff out on my own, but i simply cannot find any reference how to change the console lines to 25 and the columns to 80 i have had for way to long. the one place i did find a column and row pair mentioned 100/48 respectively. i did not want to change these until i asked on lq just in case that setting is configured by or used with the xface system which is my dte and am not sure of that.
any help will be great...and thank you.

What a confusing description.
Please, you need to show us the commands issued, files edited etc.
Use CODE tags for code.

someone else 07-07-2019 08:21 AM

first sorry for the delay, i looked forward to peoples answer/help and did type a reply but apparently did not post it? worse... then kept checking email for a reply not realizing i had never answered the last post. oops?!


my problem simply stated:

i typed "set" and in the listing there is a "COLUMNS" and "LINES". mine is equal to 128 and 48 respectively. i type "set COLUMNS=80" and "set LINES=25" in two separate commands

then type set again. the listing shows that both vars are as i set them.

i logout and back in and literally nothing has changed. type set again and both vars are back to the original values 128 and 48 respectively.

i even list the two variables in .bash_profile, logout/login, but the COLUMNS/LINES appearance does not change.

i have tried this a bunch of times on installs on three different machines of this sw64.14.2 but the settings revert to the original values each time on each machine.

when i loaded the system setup stated that the tiny utf-8 was the "standard default". does this mean that it is hard coded in the kernel when compiled? is that now where i need to change this variable? which just seems silly but...

also after-the-fact i realize this may be two separate items i am asking about, but for the moment i am trying to work on the columns/lines situation.

berndbausch 07-07-2019 08:27 PM

Quote:

Originally Posted by someone else (Post 6012798)
i logout and back in and literally nothing has changed. type set again and both vars are back to the original values 128 and 48 respectively.

Shell variables, more correctly environment variables, exist in the environment of a process. When that process disappears, so does its environment and the variables it contains.

In your case, the process is your shell. When you log out, this shell process exists, and all variables disappear.

When you log in again, another shell process is created. It initializes its environment from various places, including files like /etc/profile, .bash_profile, .bashrc.
Quote:

i even list the two variables in .bash_profile, logout/login, but the COLUMNS/LINES appearance does not change.
I am not sure what you did. Listing variables doesn't change anything.

I have a Ubuntu 18.04 server where COLUMNS and LINES are set in the .bashrc script, as follows:
Code:

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS
shopt -s checkwinsize

In this case, LINES and COLUMNS are reset dynamically and automatically each time the terminal window size changes.
Quote:

i have tried this a bunch of times on installs on three different machines of this sw64.14.2 but the settings revert to the original values each time on each machine.
What is sw64.14.2?

EDIT: It seems to be a Slackware version. I can't tell how Slackware configures LINES and COLUMNS, but .bashrc is probably a good guess.

In any case, you could, for example, set LINES and COLUMNS in the .bashrc file.
Code:

LINES=24
COLUMNS=80

This way, each time your shell starts, the variables are initialized from that file.
Quote:

when i loaded the system setup stated that the tiny utf-8 was the "standard default". does this mean that it is hard coded in the kernel when compiled? is that now where i need to change this variable? which just seems silly but...

also after-the-fact i realize this may be two separate items i am asking about, but for the moment i am trying to work on the columns/lines situation.
Yes, these are two different questions. Carla Schroeder's instructions how to change the console font might be helpful.

EDIT: I don't know to what extent Carla's instructions apply to Slackware. The systemd paragraph at the end certainly doesn't.

business_kid 07-08-2019 04:02 AM

If you're using terminals outside X windows with the console thrown up by the linux kernel, the font directory is /usr/share/kbd/consolefonts, and you can set any fonts from that directory. I like big fonts, so I installed the terminus fonts and put a setting in /etc/rc.d/rc.font
Code:

setfont -v ter-928n.psf.gz

If you are using X consoles, laziest way is to use xterm, which has a visible Edit/Preferences menu where you can set font size.

someone else 07-09-2019 03:49 AM

berndbausch i tried putting COLUMNS/LINES in the .bashrc file and that did not work either. that has to be being set from somewhere/how else...

business kid indeed i am using the kernel console and at the moment am just trying to set the COLUMNS=80 and LINES=25, then i will get to the fonts. just trying not to confuse the issue more than i have. i do appreciate the command suggestion and will try that.

business_kid 07-09-2019 01:40 PM

Quote:

Originally Posted by someone else (Post 6013325)
business kid indeed i am using the kernel console and at the moment am just trying to set the COLUMNS=80 and LINES=25, then i will get to the fonts. just trying not to confuse the issue more than i have. i do appreciate the command suggestion and will try that.

No dice. The kernel sets the lines and columns for the fonts once the video driver gets loaded. Maybe a 'nomodeset' boot parameter would get you out of that, but it has other associated problems.

ehartman 07-09-2019 05:42 PM

Quote:

Originally Posted by berndbausch (Post 6012944)
In this case, LINES and COLUMNS are reset dynamically and automatically each time the terminal window size changes.

What is sw64.14.2?

EDIT: It seems to be a Slackware version. I can't tell how Slackware configures LINES and COLUMNS, but .bashrc is probably a good guess.

LINES and COLUMNS are set by the terminal application itself, when it starts the shell, to inform future children how BIG the window is.
Changing the values will NOT change the window size itself, so the child will get wrong values. Changing the size of the window will automatically change them, so after the resize these values have been set to the new window size.
You can set the right values too with the 'eval `resize`' command when the window of the shell doesn't do so automatically. This assume your terminal window interpretes VT100-style commands:
Quote:

The VT100-style escape sequence used to determine the screen size always works for VT100-compatible terminals. VT100s have no corresponding way to modify the screensize.
(from man resize)

berndbausch 07-09-2019 06:56 PM

Quote:

Originally Posted by ehartman (Post 6013575)
LINES and COLUMNS are set by the terminal application itself, when it starts the shell, to inform future children how BIG the window is.

True but the original poster asked for console terminals, which you can't resize that easily.

someone else 07-10-2019 03:44 AM

Quote:

Originally Posted by business_kid (Post 6013519)
No dice. The kernel sets the lines and columns for the fonts once the video driver gets loaded. Maybe a 'nomodeset' boot parameter would get you out of that, but it has other associated problems.

so the COLUMNS=128 LINES=48 is set in the kernel when it compiles? or does the video driver (or kernel) choose the COLUMNS/LINES settings based on the font chosen by the user?

and if the latter is true how does one know what font results in the COLUMNS=80 and LINES=25 that i am used to having?

business_kid 07-10-2019 04:47 AM

AFAIK, on boot the kernel comes up in a default mode, common to all video cards. It used to be 640x480, but aspect ratios have changed and itr's 16:9 monitors now. The old 80x25 was the product of a 640x480 screen res (4:3 aspect ratio).

When the driver loads, max resolution is set and the fonts go tiny. When the screen font is loaded an appropriate mode is set. I have a 17.3" or thereabouts screen and my lines/columns on the ter-928n font is 114x30/31. It looks much like the 80/25 of old, and is quite readable. Terminus fonts go up to 32, but 30 & 32 pt. fonts do strange things to the console here.
Then we come back to your init program. I have old-fashioned sysvinit, and one can fiddle init scripts. Systemd does have scripts buried in it's depths, but you are definitely on your own there. There is /etc/profile.d for running login commands and I have /etc/rc.d/rc.local for system-wide startup commands but with systemd, you're on your own. Knock yourself out.
At any stage you can run 'setfont <some-font>' and it will switch that terminal to that particular font, adjusting lines/cols accordingly. Or 'setfont' with no options restores the default (IIRC).

someone else 07-11-2019 01:41 PM

[QUOTE=business_kid;6013712]AFAIK, on boot the kernel comes up in a default mode, common to all video cards. It used to be 640x480, but aspect ratios have changed and itr's 16:9 monitors now. The old 80x25 was the product of a 640x480 screen res (4:3 aspect ratio).

that makes sense. so the font then will dictate the columns/lines pair on the the screen, bigger font takes up more space per character.

i looked through the fonts directory and well there is probably more than 100,000 of them so it will take a while to try each of them and see if i like it.


now this is still just the std console and not the frame buffer correct? setup stated the frame buffer was slower.

Shadow_7 07-11-2019 06:53 PM

You could (if only in theory) control $COLUMNS x $LINES by controlling your font.

$ echo $(( 1920 / 80 ))
24
$ echo $(( 1080 / 25 ))
43

A bit hard to come by a console font of that size. But an old 8x14 px font at 3x's the size mostly fits that bill.

$ echo $(( 80 * 8 * 3 ))
1920
$ echo $(( 25 * 14 * 3 ))
1050

Something that I do in X anyway. Also *3 when scaled to 640x360 is a *1 in terms of px scaling. As in good for youtube videos that show a fullscreen terminal. Not that that does much good in a console. There's actual code for the fonts in the kernel source tree. Not that one wants to start there when it comes to "custom"izations.

someone else 07-12-2019 04:20 AM

well, i tried three different fonts 7 times.

all three .gz packages unpacked no problem.

the first font was a "tech14.pcf" that with the command "setfont /usr/share/font/100dpi/tech14.pcf" did not complain. but after logging out/ back in the characters did maybe seem different "possibly", i did not see any difference, so i rebooted and still the same as before, nothing stands out.

so i have tried two other fonts, they unpack great...

but when i tried the above command with the name of the two different fonts and "timB18" and the "timB24.pcf" the complaint is "bad input file size" and will do anything else

not sure what else to do.


All times are GMT -5. The time now is 07:01 AM.