OpenBSD and NetBSD kernel fonts and colors. - BSD
yrmt
What you'll be able to do:

- Change the kernel background/foreground color.
- Change the font

On NetBSD:
``—— ftp http://ftp.ftp.netbsd.org/pub/NetBSD/Net...urce/sets/``
``—— get sysrc.txz``
``—— tar xf sysrc.txz /``

On OpenBSD:
``—— ftp http://ftp.ftp.belnet.be/pub/OpenBSD/5.3/``
``—— get sys.txz``
``—— tar xf sys.txz /``

- Then edit the config:

``—— cd /usr/src/sys/arch/i386/conf/``
``—— cp GENERIC MYKERNEL``


#Kernel Font:

- You can use [this](https://github.com/polachok/bdf2wscons) to convert bdf fonts to wscons fonts.
- You should now have a .h font. Put it in /usr/src/sys/dev/wsfont/.
- or get a few premade fonts [from my github](https://github.com/yrmt/ModdedFonts), I'm using my mod of terminus14 which I find really readable.
- Edit /usr/src/sys/dev/wsfont/wsfont.c

Code:
#ifdef FONT_<NAME><YOURxSIZE>
#define HAVE_FONT 1
#include "path/to/include"
#endif
/* Our list of built-in fonts */
static struct font *list, builtin_fonts[] = {
#ifdef FONT_<NAME><YOURxSIZE>
    { NULL, NULL, &<NAME><SIZE>, 0, 1, WSFONT_STATIC | WSFONT_BUILTIN  },
#endif

Add this line to your kernel config, for example:
``options FONT_TERMINUS6x11``
#Kernel Color:

- Change to the color you want in the kernel config:

``options WS_KERNEL_FG=WSCOL_GREEN``
``options WS_KERNEL_BG=WSCOL_BLACK``

- For example, I use:

``options WS_KERNEL_FG=WSCOL_RED``
``options WS_KERNEL_BG=WSCOL_BLACK``

# Compile!
``—— config MYKERNEL``
``—— cd ../compile/MYKERNEL``

On OpenBSD:

``—— make clean;make``
``—— make install``

On NetBSD:

``—— make depend;make``
``—— cp /netbsd /netbsd.old``
``—— cp netbsd /``

On NetBSD you can also use genfb to have a higher resolution; in /boot.cfg, add:
`` menu=Boot NetBSD:vesa 1280x800;boot netbsd``
Only on amd64, macppc and i386 architectures.
venam
Another useful thread!
We need more of these threads that are particularly interesting and that aim at subjects hard to find on the internet.
yrmt
Thank you, and yeah I'll keep on making threads with little tips like this one.
dcoppa
This (alternative wsfont fonts in console) is possible because OpenBSD (-current, to be shipped with 5.4) now supports KMS and framebuffer consoles on Intel GPUs, thanks to the *awesome* work of jsg@.
yrmt
(05-07-2013, 06:14 AM)dcoppa Wrote: This (alternative wsfont fonts in console) is possible because OpenBSD (-current, to be shipped with 5.4) now supports KMS and framebuffer consoles on Intel GPUs, thanks to the *awesome* work of jsg@.

Yeah! I mostly use genfb though.
yrmt
I added my Terminus12 and my Gohufont mod wscons fonts for OpenBSD and NetBSD!

Grab them [here](https://github.com/yrmt/ModdedFonts)!
zygotb
Someday I'll give this a try... Thanks for sharing!
yrmt
I'm making a version for FreeBSD so you'll be able to try it later!
cyberpunkz
Hey yrmt thanks for that colour change wallthrough , i have forgot how i done that ... i remember i change it a few years ago , and forgot, but thanks for the reminder i will have to bookmark this page and change kernel text colours to black background and orange text.

now i have a tiny question here .. yrmt how can i compile compton on openbsd 5.5 ?
BSD (OS X & FreeBSD)
UNIX & VMS/VAX emulation simh: Ultrix 4.3BSD, WISC UNIX, OpenVMS 7.3, and
SunOS Solaris.
PekWM :: BMPanel2
Mafia
(04-03-2014, 08:14 PM)cyberpunkz Wrote: Hey yrmt thanks for that colour change wallthrough , i have forgot how i done that ... i remember i change it a few years ago , and forgot, but thanks for the reminder i will have to bookmark this page and change kernel text colours to black background and orange text.

now i have a tiny question here .. yrmt how can i compile compton on openbsd 5.5 ?

Compton doesn't like OpenBSD.
That's all i'll say.




Members  |  Stats  |  Night Mode  |  Help