Hi,
included a patch against 2.4.0-test9 (should apply against latest but
haven't checked) which adds the config option to have a bsd-style cursor
in VT's by default. I was hoping it might be considered for inclusion so
that I don't have to patch it in myself every time :-)
cheers,
Lennert
--- linux-2.4.0-test9vm/include/linux/console_struct.h.old Fri Dec 8 11:37:47 2000
+++ linux-2.4.0-test9vm/include/linux/console_struct.h Fri Dec 8 11:37:29 2000
@@ -9,6 +9,8 @@
* to achieve effects such as fast scrolling by changing the origin.
*/
+#include <linux/config.h>
+
#define NPAR 16
struct vc_data {
@@ -104,6 +106,10 @@
#define CUR_HWMASK 0x0f
#define CUR_SWMASK 0xfff0
+#ifndef CONFIG_VT_BSD_CURSOR
#define CUR_DEFAULT CUR_UNDERLINE
+#else
+#define CUR_DEFAULT 0x7f11
+#endif
#define CON_IS_VISIBLE(conp) (*conp->vc_display_fg == conp)
--- linux-2.4.0-test9vm/drivers/char/Config.in.old Fri Dec 8 11:38:29 2000
+++ linux-2.4.0-test9vm/drivers/char/Config.in Fri Dec 8 11:38:24 2000
@@ -7,6 +7,7 @@
bool 'Virtual terminal' CONFIG_VT
if [ "$CONFIG_VT" = "y" ]; then
bool ' Support for console on virtual terminal' CONFIG_VT_CONSOLE
+ bool ' BSD-style cursor' CONFIG_VT_BSD_CURSOR
fi
tristate 'Standard/generic (8250/16550 and compatible UARTs) serial support' CONFIG_SERIAL
if [ "$CONFIG_SERIAL" = "y" ]; then
--- linux-2.4.0-test9vm/arch/i386/defconfig.old Fri Dec 8 11:39:19 2000
+++ linux-2.4.0-test9vm/arch/i386/defconfig Fri Dec 8 11:38:57 2000
@@ -450,6 +450,7 @@
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
+# CONFIG_VT_BSD_CURSOR is not set
CONFIG_SERIAL=y
# CONFIG_SERIAL_CONSOLE is not set
# CONFIG_SERIAL_EXTENDED is not set
--- linux-2.4.0-test9vm/Documentation/Configure.help.old Fri Dec 8 11:40:47 2000
+++ linux-2.4.0-test9vm/Documentation/Configure.help Fri Dec 8 11:43:43 2000
@@ -11931,6 +11931,13 @@
If unsure, say Y.
+BSD-style cursor
+CONFIG_VT_BSD_CURSOR
+ If you say Y here, the cursor style for virtual terminals will default to
+ a non-blinking block (BSD-style).
+
+ If you have a strong dislike of BSD, say N here.
+
Support for PowerMac keyboard
CONFIG_MAC_KEYBOARD
This option allows you to use an ADB keyboard attached to your
> included a patch against 2.4.0-test9 (should apply against latest but
> haven't checked) which adds the config option to have a bsd-style cursor
> in VT's by default. I was hoping it might be considered for inclusion so
> that I don't have to patch it in myself every time :-)
How about placing
echo '\033[?17;120c'
In one of your startup scripts. This will give you this nice BSD cursor
you like.
On Wed, 13 Dec 2000, James Simmons wrote:
> > included a patch against 2.4.0-test9 (should apply against latest but
> > haven't checked) which adds the config option to have a bsd-style cursor
> > in VT's by default. I was hoping it might be considered for inclusion so
> > that I don't have to patch it in myself every time :-)
>
> How about placing
>
> echo '\033[?17;120c'
>
> In one of your startup scripts. This will give you this nice BSD
> cursor you like.
[buytenh@mara buytenh]$ tail -1 ~/.bash_profile
echo -e -n '\033[?17;127c'
[buytenh@mara buytenh]$
This has Issues though: try entering vi for example.
I'd just like a way of altering CUR_DEFAULT (which is hardcoded here and
there); sysctl would be fine too for that matter.
cheers,
Lennert
Lennert Buytenhek wrote:
> On Wed, 13 Dec 2000, James Simmons wrote:
> > How about placing
> > echo '\033[?17;120c'
> > In one of your startup scripts. This will give you this nice BSD
> > cursor you like.
>
> [ buytenh@mara buytenh]$ tail -1 ~/.bash_profile
> echo -e -n '\033[?17;127c'
> [buytenh@mara buytenh]$
>
> This has Issues though: try entering vi for example.
My /etc/inittab has lines that look like this:
1:2345:respawn:/sbin/getty 38400 tty1 -I '^[c^[[?17;55;248c'
This gives me a nice red non-blinking cursor. No problems with vi
whatsoever. Of course, this only works on the console, but for my
terminal windows, I can set these values in resource or configuration
files. So, all of this is a user-space problem. No need to complicate
the kernel code.
Markus
--
Markus Gutschke Resonate, Inc.
3637 Fillmore Street #106 385 Moffett Park Drive
San Francisco, CA 94123-1600 Sunnyvale, CA 94089
+1-415-567-8449 +1-408-548-5528
[email protected] [email protected]