LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-11-2014, 02:52 AM   #1
imarriedyoung
LQ Newbie
 
Registered: Apr 2014
Posts: 20

Rep: Reputation: Disabled
Changing Slackware's "Raw" Console Font


This seems an easy fix in some other distros: Arch, for example, looks at a "vconsole.conf" file. I know Slackware has a "setconsolefont" command, but I've also read on the wiki's for it (and locale) that it won't accept new fonts, which seems to be the case whenever I add anything to /usr/share/kbd/consolefonts/.

At the moment I was going to edit setconsolefont and hack the initial script for it and just add the font I want to the menu listings. That said, I'd also prefer an easier way in case, in the future, I get some new console fonts I want to try out. All that I can think of, avoiding hacking setconsolefont, would be to have an init script run 'setfont' with the font of my choice everytime I boot as I know setfont is temporary. However, wouldn't setfont merely set the font for the current tty and not the others?
 
Old 07-11-2014, 03:15 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,044

Rep: Reputation: Disabled
Well, the list of fonts proposed by setconsolefont is hard coded (built in, in other words) and hasn't been modified for a while.

But instead of hacking that script it is simpler IMO to just edit /etc/rc.d/rc.font:
Code:
#!/bin/sh
#
# This selects your default screen font from among the ones in
# /usr/share/kbd/consolefonts.
#
setfont -v <your preferred font here>
Then make this script executable and you'll get the font you want on every tty at startup.

Last edited by Didier Spaier; 07-11-2014 at 03:18 AM.
 
11 members found this post helpful.
Old 07-11-2014, 05:49 AM   #3
imarriedyoung
LQ Newbie
 
Registered: Apr 2014
Posts: 20

Original Poster
Rep: Reputation: Disabled
Well, isn't that easy enough. Hacking the script isn't all that hard, you can just add your font(s) to be to two areas; the choice menu and the major list, but this is a lot easier to maintain and interface with. Thanks!
 
Old 07-11-2014, 06:47 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,099

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
In which case, add to Didiers reputation by hitting the "Yes" link after "Did you find this post helpful".
 
2 members found this post helpful.
Old 07-11-2014, 07:28 AM   #5
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; Slackware64-current (VM); Debian 12 (VM)
Posts: 8,272
Blog Entries: 61

Rep: Reputation: Disabled
Lat2-Terminus16 is a nice, clear console font.
 
3 members found this post helpful.
Old 12-01-2014, 12:28 PM   #6
bogzab
Member
 
Registered: Mar 2006
Location: Dyserth, Wales
Distribution: Slackware 14.0, Slackware 14.1, Slackware-current
Posts: 306

Rep: Reputation: 33
@BrainL - agreed Lat2-Terminus16 looks fine and dandy, except (for me) when I need it to draw something with box-drawing characters? What's the magic that loads the right code-page / Unicode map to make it do that properly?
 
Old 12-01-2014, 01:16 PM   #7
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; Slackware64-current (VM); Debian 12 (VM)
Posts: 8,272
Blog Entries: 61

Rep: Reputation: Disabled
I don't know. That's one of the many things I haven't got round to trying yet.
 
Old 12-01-2014, 08:43 PM   #8
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,176

Rep: Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759
Quote:
Originally Posted by bogzab View Post
@BrainL - agreed Lat2-Terminus16 looks fine and dandy, except (for me) when I need it to draw something with box-drawing characters? What's the magic that loads the right code-page / Unicode map to make it do that properly?
Are you having a problem with the box-drawing characters at the console or in a terminal emulator? I don't have access to a Slackware console at the moment but I do have access to a Crux console and Lat2-Terminus16 shows the box-drawing characters in tmux split panes fine. (Test: start tmux and type Ctrl-B Shft-%, which will split the screen into 2 panes.)

When I accessed this same Crux machine using a terminal emulator (Tera Term) I had to install a font provided by the Tera Term team to get the box characters to display properly, as lines rather than question marks. In ~/.profile on Crux I have $LANG set to en_US.UTF-8 and other LC variables (LC_TIME, LC_NUMERIC and LC_MONETARY) to en_IE.UTF-8. Some characters in man pages did not display properly with $LANG set to en_IE.UTF-8 or en_GB.UTF-8, so I stick to en_US.UTF-8 instead. If your problem appears in a SSH session, using a terminal emulator, make sure the locale setting in the emulator is correct, and it has the font installed on the local machine.

I suspect your problem with the line-drawing characters has to do with your locale. Type "locale" to check the values. Most values are inherited from the LANG variable, and they appear in quotation marks; values which are explicitly set are not inside quotation marks. Below are the values I have set in ~/.profile in Crux:
Code:
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_IE.UTF-8
LC_TIME=en_IE.UTF-8
LC_COLLATE=C
LC_MONETARY=en_IE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_IE.UTF-8
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Last edited by Gerard Lally; 12-01-2014 at 09:14 PM. Reason: Some clarification regarding SSH sessions
 
1 members found this post helpful.
Old 12-02-2014, 06:12 AM   #9
bogzab
Member
 
Registered: Mar 2006
Location: Dyserth, Wales
Distribution: Slackware 14.0, Slackware 14.1, Slackware-current
Posts: 306

Rep: Reputation: 33
Turned out that what I needed to do to get my console font showing box-drawing characters correctly was described here in the localisation bit of good old Slackdocs. I was already using the right localisation variable (en_GB.UTF-8) but I needed to use the
Code:
Unicode_start
command to get the Unicode characters displayed correctly.
 
Old 12-02-2014, 06:42 AM   #10
bormant
Member
 
Registered: Jan 2008
Posts: 425

Rep: Reputation: 240Reputation: 240Reputation: 240
bogzab,
setup asks about using UTF-8 in console with 'No' as default answer. It writes kernel parameter vt.default_utf8=0 (for No) or vt.default_utf8=1 (for Yes, it is default for modern kernels) into append= line of /etc/lilo.conf.

If you want to use utf8 in console without calling unicode_start, remove vt.default_utf8=0 or replace it with vt.default_utf8=1 in /etc/lilo.conf and rerun lilo as root.
 
Old 12-02-2014, 08:57 AM   #11
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; Slackware64-current (VM); Debian 12 (VM)
Posts: 8,272
Blog Entries: 61

Rep: Reputation: Disabled
Some good information on fonts here:
http://duganchen.ca/writings/slackware/fonts/
 
Old 12-02-2014, 09:15 AM   #12
bogzab
Member
 
Registered: Mar 2006
Location: Dyserth, Wales
Distribution: Slackware 14.0, Slackware 14.1, Slackware-current
Posts: 306

Rep: Reputation: 33
bormant: Thanks for that additional info.

One of the advantages of using a stable OS like Slackware is that once you've done the setup and fixed up lilo you can forget (as I have done) all about it. I'll go back and check up the lilo.conf to see if it turns Unicode off.
 
Old 12-18-2014, 03:08 PM   #13
imarriedyoung
LQ Newbie
 
Registered: Apr 2014
Posts: 20

Original Poster
Rep: Reputation: Disabled
Can't agree more about that sentiment. It's solid as a rock and as transparent as glass.
 
Old 12-21-2014, 01:07 PM   #14
sbolokanov
Member
 
Registered: Feb 2013
Location: Бдинъ, Бѫлгариѧ
Distribution: GNU/Linux
Posts: 104

Rep: Reputation: 27
I were wondering why do I get broken characters.
Checked, if vt.default_utf8=1 is set. Set.

Then I realize: wait, I've set font to Lat2-Terminus16 (latin), yet my locale is set bulgarian letters (cyrillic).
As expected switching to UniCyr_8x16 fixed broken chars. Finally! LOL

It actually pays off to read forums sometimes.
 
  


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
How to set the font-size for "xterm" terminal-emulator (running "bash" shell) ajaygarg Linux - Desktop 1 03-09-2012 12:38 PM
Make font paths compatible - "built-ins" font path ? Vilius Linux - Desktop 0 06-30-2011 01:01 AM
Is "Raw CD image" exactly same as an "ISO" file ? Aquarius_Girl General 7 10-27-2010 05:19 PM
Debian post-migration "Setting up general console font" message stalls stuartmfe Linux - Software 1 03-18-2007 10:23 AM
Could not init font path element. Could not find default font "fixed" SidA Red Hat 0 06-19-2004 08:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:34 PM.

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