LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 06-29-2019, 08:49 AM   #1
someone else
Member
 
Registered: Jul 2010
Distribution: slackware
Posts: 43

Rep: Reputation: 0
'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.

Last edited by someone else; 07-07-2019 at 08:31 AM. Reason: this was a terrible description of my problem...apparently
 
Old 06-29-2019, 12:41 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,148

Rep: Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308
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.
 
Old 06-30-2019, 03:31 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by someone else View Post
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.
 
Old 07-07-2019, 08:21 AM   #4
someone else
Member
 
Registered: Jul 2010
Distribution: slackware
Posts: 43

Original Poster
Rep: Reputation: 0
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
 
Old 07-07-2019, 08:27 PM   #5
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by someone else View Post
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.

Last edited by berndbausch; 07-07-2019 at 08:33 PM.
 
1 members found this post helpful.
Old 07-08-2019, 04:02 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,148

Rep: Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308
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.
 
2 members found this post helpful.
Old 07-09-2019, 03:49 AM   #7
someone else
Member
 
Registered: Jul 2010
Distribution: slackware
Posts: 43

Original Poster
Rep: Reputation: 0
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.
 
Old 07-09-2019, 01:40 PM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,148

Rep: Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308
Quote:
Originally Posted by someone else View Post
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.
 
1 members found this post helpful.
Old 07-09-2019, 05:42 PM   #9
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by berndbausch View Post
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)

Last edited by ehartman; 07-09-2019 at 05:44 PM.
 
Old 07-09-2019, 06:56 PM   #10
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by ehartman View Post
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.
 
Old 07-10-2019, 03:44 AM   #11
someone else
Member
 
Registered: Jul 2010
Distribution: slackware
Posts: 43

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by business_kid View Post
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.
 
Old 07-10-2019, 04:47 AM   #12
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,148

Rep: Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308
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).
 
1 members found this post helpful.
Old 07-11-2019, 01:41 PM   #13
someone else
Member
 
Registered: Jul 2010
Distribution: slackware
Posts: 43

Original Poster
Rep: Reputation: 0
[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.
 
Old 07-11-2019, 06:53 PM   #14
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
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.
 
Old 07-12-2019, 04:20 AM   #15
someone else
Member
 
Registered: Jul 2010
Distribution: slackware
Posts: 43

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
std::cin/std::cout or cin/cout? shifter Programming 1 10-16-2013 01:24 PM
std::async vs std::thread grob115 Programming 1 09-21-2013 10:03 AM
printf vs std::cout and std::ofstream grob115 Programming 2 01-16-2013 11:49 AM
Perl: suppress std output and std error say_hi_ravi Programming 1 11-01-2012 06:22 AM
Template algorithm for std::vector and std::string CartmanYO Programming 4 09-08-2010 09:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration