[SOLVED] 'I' cannot see the std console text and need to change it
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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>'
In XFCE, use xterm which has a settings tab and do clever stuff there.
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.
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.
Last edited by someone else; 07-07-2019 at 08:38 AM.
Reason: trying to be more clear
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.
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.
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 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.
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.
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?
Last edited by someone else; 07-10-2019 at 03:49 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).
[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.
Last edited by someone else; 07-11-2019 at 01:43 PM.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.