Is it possible to change cursor style in console?

Good day!

I like a _ cursor instead of block, in console. And in x11 terminals like x11/guake I can change cursor symbol, but in plain console I can't found way to change it. Is it possible?
 
In the past this could be done with vidcontrol -c destructive, but it is apparently not supported anymore. I am getting:vidcontrol: setting cursor type: Inappropriate ioctl for device.
From vidcontrol(): “Unsupported options lead to error messages, typically including the text "Inappropriate ioctl for device".
 
Go to file vga.c.
Look where the 6845 cursor block start and end registers (see here, Table 2) are being set.
Change the values to your liking.

Edit: To make vga.c work instead of vesa.c, you must also turn off kernel conf setting ' options VESA'.
 
Go to file vga.c.
Look where the 6845 cursor block start and end registers (see here, Table 2) are being set.
Change the values to your liking.

Edit: To make vga.c work instead of vesa.c, you must also turn off kernel conf setting ' options VESA'.
I'm see /usr/src/sys/dev/fb/vga.c
And found piece of code in function vga_set_hw_cursor_shape as I mean relative to cursor shape:
Code:
outb(adp->va_crtc_addr, 10);
outb(adp->va_crtc_addr + 1, celsize - base - height);
outb(adp->va_crtc_addr, 11);
outb(adp->va_crtc_addr + 1, celsize - base - 1);
But as I'm not strong C-programmer, I don't understand what that code means. I try to propose, that hardware cursor sets up as series of filled lines of char-place on the screen. And that code shows that by default it is a rectangle which formed by filled lines from 1 to height. And if I need a underscore character as cursor, I need to change that piece of code to:
Code:
outb(adp->va_crtc_addr, 10);
outb(adp->va_crtc_addr + 1, celsize - base - 2);
outb(adp->va_crtc_addr, 11);
outb(adp->va_crtc_addr + 1, celsize - base - 1);

Is my discourse are totally nonsense or not? :)
 
vidcontrol -c destructive will work if you make sc the default for kern.vty in loader.conf.

Some newer video drivers will not work with sc(4), and booting from UEFI can be problematic. Just bear in mind that vt(4) wasn't made just for fun. It's a replacement for outdated tech.
 
Back
Top