Disabling Console Cursor

From Buici

Jump to: navigation, search

Posted to the linux-arm-kernel list was this reply. It describes a method for disabling the console cursor. The cursor may be appear on the console when the console was activated via a framebuffer device.

From: Kein Yuan
Subject: Re: Need to turn cursor off
To: Terence Soh
Date: Mon, 5 Jun 2006 14:12:57 +0800
Cc: Linux ARM-kernel <linux-arm-kernel@lists.arm.linux.org.uk>

Thanks,  this works for me!   -Tao

On 6/2/06, Terence Soh <gopher@singnet.com.sg> wrote:
>
>> Hi all,
>>
>>   The following method can hide the blinking underline cursor, but
>> the solid black rectangle is still there.    Does naybody here knows
>> how to totally disable it?
>>
>> echo -e "\033[25l" > /dev/tty0
>Hi,
>
>Try this
>
>#include <stdio.h>
>#include <fcntl.h>
>#include <sys/ioctl.h>
>#include <linux/kd.h>
>
>main(){
>       int fd;
>
>       fd = open("/dev/tty0",O_WRONLY);
>       if(fd<0){
>               printf("No /dev/tty0 device\n");
>       } else {
>               ioctl(fd, KDSETMODE, KD_GRAPHICS);
>       }
>}
>
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php
Personal tools