On Thu, Apr 04, 2002 at 02:30:24AM +0100, Bart Oldeman wrote:
> On Thu, 4 Apr 2002, Bart Oldeman wrote:
>
> > There exist a few possibilities and work arounds.
> > b) use $_rawkeyboard=(1) or the -k option. This requires (suid)root for
> > dosemu.bin, bypasses the terminal and passes keystrokes directly (use
> > ctrl+alt+fkey to switch consoles) or
>
> and then I suddenly realized that you DON'T need to be root to be able to
> use the raw keyboard, but dosemu enforced that, in my opinion
> unnecessarily.
>
> Here's the patch for dosemu-1.1.3;
> for 1.0.2.1:
> ignore first chunk
> second chunk is for src/base/keyboard/keyb_clients.c
> third chunk should apply
>
> note that raw keyboard is linux console only, not eg. ssh, telnet or
> xterm. I am also not sure whether this works on every linux kernel and in
> all configurations.
Second part - video doesn't work for me.
/dev/mem can't write errno 13 (something like this)
(I use SVGATextMode).
My proposal of this patch is in attachment (keyboard only)
> --- src/plugin/keyboard/keyb_clients.c.old Thu Apr 4 02:00:53 2002
> +++ src/plugin/keyboard/keyb_clients.c Thu Apr 4 02:01:10 2002
> @@ -188,7 +188,7 @@
> }
> else
> #endif
> - if (config.usesX || (config.console_keyb && can_do_root_stuff)) {
> + if (config.usesX || config.console_keyb) {
> if (config.usesX || config.console)
> Keyboard = &Keyboard_raw;
> else {
> --- src/env/video/vc.c.old Thu Apr 4 01:49:50 2002
> +++ src/env/video/vc.c Thu Apr 4 01:50:13 2002
> @@ -136,7 +136,7 @@
> c_printf("major = %d minor = %d\n",
> major, minor);
> /* console major num is 4, minor 64 is the first serial line */
> - if (can_do_root_stuff && (major == 4) && (minor < 64)) {
> + if ((major == 4) && (minor < 64)) {
> scr_state.console_no = minor;
> config.console=1;
> }
>
Witold Filipczyk
--- src/base/keyboard/keyb_clients.c.old Sun Mar 11 14:27:25 2001
+++ src/base/keyboard/keyb_clients.c Sun Apr 7 18:09:53 2002
@@ -188,13 +188,13 @@
}
else
#endif
- if (config.usesX || (config.console_keyb && can_do_root_stuff)) {
- if (config.usesX || config.console)
+ if (config.usesX || config.console_keyb) {
+/* if (config.usesX || config.console) */
Keyboard = &Keyboard_raw;
- else {
+/* else {
Keyboard = &Keyboard_slang;
config.console_keyb=0;
- }
+ } */
}
else {
Keyboard = &Keyboard_slang;