OpenBSD and NetBSD kernel fonts and colors. - BSD

Users browsing this thread: 2 Guest(s)
yrmt
Grey Hair Nixers
What you'll be able to do:

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

On NetBSD:
``—— ftp ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-6.1/source/sets/``
``—— get sysrc.txz``
``—— tar xf sysrc.txz /``

On OpenBSD:
``—— ftp 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
Administrators
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
Grey Hair Nixers
Thank you, and yeah I'll keep on making threads with little tips like this one.
dcoppa
Members
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
Grey Hair Nixers
(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
Grey Hair Nixers
I added my Terminus12 and my Gohufont mod wscons fonts for OpenBSD and NetBSD!

Grab them [here](https://github.com/yrmt/ModdedFonts)!
zygotb
Long time nixers
Someday I'll give this a try... Thanks for sharing!
yrmt
Grey Hair Nixers
I'm making a version for FreeBSD so you'll be able to try it later!
cyberpunkz
Members
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
Long time nixers
(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.
cyberpunkz
Members
yeah i know , i'm toying around with the source, but gah i'm not having a good time here dude.

the thing is xcompmgr would be good if it gave me shadow openbsd, and i can get shadow with other OSes using xcompmgr , i use the simular command , and no shadow gets place under the window.

gah i guess i have to live without composite :(

i wish someone can get compton to work on OpenBSD 5.5 that would be sweet!

thanks for the help anyway

Cheer!
BSD (OS X & FreeBSD)
UNIX & VMS/VAX emulation simh: Ultrix 4.3BSD, WISC UNIX, OpenVMS 7.3, and
SunOS Solaris.
PekWM :: BMPanel2
Saos
Long time nixers
(04-03-2014, 09:44 PM)cyberpunkz Wrote: yeah i know , i'm toying around with the source, but gah i'm not having a good time here dude.

the thing is xcompmgr would be good if it gave me shadow openbsd, and i can get shadow with other OSes using xcompmgr , i use the simular command , and no shadow gets place under the window.

gah i guess i have to live without composite :(

i wish someone can get compton to work on OpenBSD 5.5 that would be sweet!

thanks for the help anyway

Cheer!

I actually had a similar issue recently, but on FreeBSD. Maybe it was just me, but xcompmgr just wouldn't set drop shadows no matter what I did.
Compton, of course, did it in a single command.
Mafia
Long time nixers
Yes xcompmgr does the same for me, but long ago I learned to live without composite. Threw it out the window when I first started using OpenBSD around 5.0.
cyberpunkz
Members
back on topic.


I don't see any sys.tar.gz for Current.

Just in 5.4

I suppose I should just wait for the 5.5 release to come out in may, and pimp up the kernel console text / colours.

:P
BSD (OS X & FreeBSD)
UNIX & VMS/VAX emulation simh: Ultrix 4.3BSD, WISC UNIX, OpenVMS 7.3, and
SunOS Solaris.
PekWM :: BMPanel2
yrmt
Grey Hair Nixers
Clone the cvs repo and compile from there.
cyberpunkz
Members
(05-03-2014, 11:33 AM)yrmt Wrote: Clone the cvs repo and compile from there.

aahh, thanks for the tip.

Cheers!
BSD (OS X & FreeBSD)
UNIX & VMS/VAX emulation simh: Ultrix 4.3BSD, WISC UNIX, OpenVMS 7.3, and
SunOS Solaris.
PekWM :: BMPanel2
cyberpunkz
Members
nice topic, but i notice u have option"S" and its just option, and you may want to direct new user to where the kernel src is. /usr/src/sys/arch/amd64 or whatever arch/conf/
mv GENERIC to-whatever-you-want
vi NEWKERNELNAME
add the colours and if so fonts

and the rest is good.

anyhow thanks for the guide @ yrmt
BSD (OS X & FreeBSD)
UNIX & VMS/VAX emulation simh: Ultrix 4.3BSD, WISC UNIX, OpenVMS 7.3, and
SunOS Solaris.
PekWM :: BMPanel2
cyberpunkz
Members
heres a little video on howto compile the kernel source and to change the kernel text colours.

https://www.youtube.com/watch?v=3Qipjwuh...MVobbngUeA

cheers!
BSD (OS X & FreeBSD)
UNIX & VMS/VAX emulation simh: Ultrix 4.3BSD, WISC UNIX, OpenVMS 7.3, and
SunOS Solaris.
PekWM :: BMPanel2