[SOLVED] is there a non-volitile way to setfont ter-v24b

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] is there a non-volitile way to setfont ter-v24b

Postby jtwdyp » Jul 22nd, '13, 04:31

I've decided that I like Mageia3 enough on my desktop that I decided to add it to my laptop... That was last night. Today I started configuring things. Tonight, I've got most things working the way I want. But on my laptop, the default console font is an eyestrain.
After installing the terminus font package I can get the font size my eyes need by typing
Code: Select all
setfont ter-v24b.psf.gz
in each console I login to. But it's a PITA...

How can I change the default console font in Mageia?
Last edited by jtwdyp on Jul 25th, '13, 04:49, edited 1 time in total.
--
JtWdyP
User avatar
jtwdyp
 
Posts: 88
Joined: Jun 10th, '13, 08:30

Re: is there a non-volitile way to setfont ter-v24b.psf.gz

Postby djennings » Jul 22nd, '13, 08:08

Try putting the command into ~/.bashrc
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: is there a non-volitile way to setfont ter-v24b.psf.gz

Postby doktor5000 » Jul 22nd, '13, 19:18

Do you want to change it only for ttys, or in every terminal emulator, also under graphical logins?
I'd put it into /etc/profile or under /etc/profile.d/something.sh if you want it for all.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18068
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: is there a non-volitile way to setfont ter-v24b.psf.gz

Postby jtwdyp » Jul 23rd, '13, 10:32

djennings wrote:Try putting the command into ~/.bashrc


I suppose I could do that. But then every time I opened an xterm (or fired up a bash subshell in an existing one) I'd have to look at it complaining:
xterm wrote:Couldn't get a file descriptor referring to the console


doktor5000 wrote:Do you want to change it only for ttys, or in every terminal emulator, also under graphical logins?
I'd put it into /etc/profile or under /etc/profile.d/something.sh if you want it for all.


That is a little better, putting
Code: Select all
setfont ter-v24b.psf.gz
in the /etc/profile will at least only take effect for login shells. I suppose that since that command is designed only for the console font, it might generate an similar error message as the above, during an graphical login. But I doubt it would be displayed for the user to see, And wouldn't affect me anyway, I set systemd's default target to /lib/systemd/system/runlevel3.target, so I don't ever have to look at one of those horrible gui login screens. When/if I'm ready to use the gui, I use startx... Though I'll admit that at least 95% of the time I run startx within a couple minutes of logging in. Still it tasks me that I can't quite read the login prompt until after I login, I suppose I could put on my reading glasses, but they magnify the glare from the monitor screen, which would soon give me a splitting headache. :sigh:

Some distributions have a command or configuration file where this can be set. So that the virtual consoles are spawned with the selected font already in place. But it's been so long since I did that, that *CRS :roll: seems to have deprived me of the command name that may or may not exist on Mageia. And/or where said console configuration file might be located. So I may be asking the wrong question...

Code: Select all
* CRS : "Can't Remember Sh^Htuff" : In my case this means that unless I
* do something the same way every day for a LONG time, or have examples
* of how I did it before (where I can still find them), I usually wind up
* scratching my head the next time I need to do a non-daily task. Or for
* that matter, to remember what I was doing before the durned phone rang etc...
--
JtWdyP
User avatar
jtwdyp
 
Posts: 88
Joined: Jun 10th, '13, 08:30

Re: is there a non-volitile way to setfont ter-v24b.psf.gz

Postby djennings » Jul 23rd, '13, 15:35

Create a file /etc/vconsole.conf
containing
Code: Select all
FONT=ter-v24b


That should do the trick.
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: is there a non-volitile way to setfont ter-v24b.psf.gz

Postby jtwdyp » Jul 23rd, '13, 19:04

djennings wrote:Create a file /etc/vconsole.conf
containing
Code: Select all
FONT=ter-v24b


That should do the trick.

Yeah, I've been searching and experimenting... And I tripped over that. {pasting in precomposed text now}...

Well, for a second there, I thought I found the solution. At least I think the man documents indicate that it should work. And in fact it does, until I login to a console...

I did a bit of web searching on the subject. Eventually I came across a clue about how systemd does this that got me looking at a couple of man documents.

See:

man systemd-vconsole-setup.service

&

man vconsole.conf

For why I think that this:

Code: Select all
JtWdyP -> ~
> cat /etc/vconsole.conf
FONT=ter-v24b.psf.gz
JtWdyP -> ~
>


Should have fixed it...

And it does {sort of} until I login.

Since I boot to console, and don't use any "splash" kernel options, I get to see ALL the pretty boot text messages scroll by...

The font starts out good sized for about the first couple screenfuls. (as always) Then it shrinks to the standard system default. (as always) But with that terminus package font set in /etc/vconsole.conf, the font becomes legible again a few lines before it says something about checking or remounting the root filesystem... For the rest of the boot process the terminus font is in use.

When I get to the login: prompt on tty1, I can check the other tty... And all six tty are using the terminus font. Until I login to one of them. Just as soon as I enter a valid password, the tty I login to reverts to the original system default. (I think somebody musta hardcoded it someplace.) Though I note that the other tty where nobody has yet logged in, continue to use the terminus font.

So I added that /etc/profile kludge back into the mix, I put the:

Code: Select all
setfont ter-v24b.psf.gz


command back into the profile.

Now when I boot the /etc/vconsole.conf setting sets the initial console font. And then when I login, the original default font only flashes into use for a split second before the setfont command in /etc/profile resets it back to my chosen font.

This works well enough for me, but something someplace isn't right...

I'd probably ask about filing a bug report, but I have no idea which process in the console login sequence is ignoring the /etc/vconsole.conf setting, and hardcoding the use of the original default font. So I wouldn't know what to file the bug against...
--
JtWdyP
User avatar
jtwdyp
 
Posts: 88
Joined: Jun 10th, '13, 08:30

Re: is there a non-volitile way to setfont ter-v24b.psf.gz

Postby doktor5000 » Jul 23rd, '13, 21:02

IIRC you can also set the font on kernel command line, so it will be inherited by init/pid 1: https://lists.fedoraproject.org/piperma ... 05929.html
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18068
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: is there a non-volitile way to setfont ter-v24b.psf.gz

Postby jtwdyp » Jul 24th, '13, 05:41

doktor5000 wrote:IIRC you can also set the font on kernel command line, so it will be inherited by init/pid 1: https://lists.fedoraproject.org/piperma ... 05929.html


If your referring to:

VCONSOLE.CONF(5) wrote:Note that the kernel command line options vconsole.keymap=, vconsole.keymap.toggle=,
vconsole.font=, vconsole.font.map=, vconsole.font.unimap= may be used to override the console
settings at boot.


Then Yes I'd heard. But I got the impression that either way the actual setting of the font would be done by:

VCONSOLE.CONF(5) wrote:It is applied at boot by systemd-vconsole-setup.service(8).


I don't see how the difference between systemd-vconsole-setup.service getting it's target font data from the kernel command line instead of from reading the setting in vconsole.conf would prevent what ever console login process or sub-process is setting it back to something more like lat0-16.psfu.gz upon console login, from continuing to do so at some point before the fix I put in /etc/profile restores my font setting again. Do you have any idea what process might be doing this?
--
JtWdyP
User avatar
jtwdyp
 
Posts: 88
Joined: Jun 10th, '13, 08:30

Re: is there a non-volitile way to setfont ter-v24b.psf.gz

Postby doktor5000 » Jul 24th, '13, 20:45

Well, as it's only an environment variable, any process can unset it.

And actually what i meant was SYSFONT as stated in the linked mail thread. That's also what Redhat uses by default.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18068
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: is there a non-volitile way to setfont ter-v24b.psf.gz

Postby jtwdyp » Jul 25th, '13, 02:47

doktor5000 wrote:Well, as it's only an environment variable, any process can unset it.


True. But what is the point of having a "FONT=" setting in the vconsole.conf if Mageia is going to unset that variable during the login process??

If I had to hazard a guess; At some point in the development process of mageia3, before systemd's systemd-vconsole-setup.service was fully functional, somebody musta inserted temporary fix someplace that never got removed. And since the smaller font is the default, I'd hazard another guess that most of those devs who actually bother with console logins probably prefer the smaller text {so that longer lines can fit on their monitors etc...} Thus they haven't noticed the problem...

Since the man documents for vconsole.conf and systemd-vconsole-setup.service so clearly indicate that the virtual console's font can be configured this way, having a system process throw away the configured font upon user login defeats the purpose, and in my opinion, indicates a bug.

OK maybe not! see next post in thread...

But because I can see that systemd-vconsole-setup.service itself does in fact so configure the font, as can be seen on all 6 tty upon the completion of the boot process, I'm loath to claim it's a bug with systemd-vconsole-setup.service itself. But otherwise the closest I can come to identifying the process with the bug is to say the "console login process" Which doesn't sound like a properly identified process to me...

Two questions:
    (1) If you were writing this up as a bug, which process would you name?
    (2) Where can I find a how-to for the prefered method of reporting such a bug?? {So that Mageia's devs might maybe think about solving it some day when they have nothing else to do... :roll: )


Would still like a pointer on a bug howto...Maybe one that also explained when to call something a bug...

doktor5000 wrote:And actually what i meant was SYSFONT as stated in the linked mail thread. That's also what Redhat uses by default.


OH! I thought the point was just that such a boot parameter, isn't parsed by the kernel, but was passed to PID 1...

Since it was a fedoraproject link I wasn't sure the actual parameter in the thread was viable on mageia, when magia's
Code: Select all
man vconsole.conf

clearly says to use the kernel command line option:
Code: Select all
vconsole.font=

Still nothing ventured nothing gained. I disabled my /etc/profile fix again, so that I could test that kernel parameter...Same result. When I logged in without the "setfont" fix in /etc/profile... :sigh: Still it was worth a try.
Last edited by jtwdyp on Jul 25th, '13, 04:47, edited 1 time in total.
--
JtWdyP
User avatar
jtwdyp
 
Posts: 88
Joined: Jun 10th, '13, 08:30

Re: is there a non-volitile way to setfont ter-v24b.psf.gz

Postby jtwdyp » Jul 25th, '13, 04:38

jtwdyp wrote:Still nothing ventured nothing gained. I disabled my /etc/profile fix again, so that I could test that kernel parameter...Same result. When I logged in without the "setfont" fix in /etc/profile... :sigh: Still it was worth a try.


OOPS! I missed part of the "SYSFONT kernel parameter" process. The previously referenced fedora discussion seemed to be about using the actual font name rather than the binary value of "True"... I figured that if your supposed to include the font name there, then I shouldn't need to include it in the classic config file "/etc/sysconfig/i18n" to... But I forgot that it might already be explicitly set there to the default font. It was... So I edited it's font setting line to say "SYSFONT=ter-v24b.psf.gz" And suddenly the /etc/profile fix isn't needed any more...

So since the /etc/sysconfig/i18n config file appears to be the classic (pre-systemd?) way to do this I guess I was wrong to think it was a bug... :sigh: Some days I can't seem to get anything right.
--
JtWdyP
User avatar
jtwdyp
 
Posts: 88
Joined: Jun 10th, '13, 08:30

Re: [SOLVED] is there a non-volitile way to setfont ter-v24b

Postby doktor5000 » Jul 26th, '13, 01:08

As you asked for the howto: After searching if it hasn't been reported yet already: https://wiki.mageia.org/en/How_to_report_a_bug_properly
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18068
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: doktor5000 and 1 guest