From: "Witold Filipczyk" <juandon@poczta.onet.pl>
To: linux-msdos@vger.kernel.org
Subject: Re: non-privileged raw keyboard
Date: Sun, 7 Apr 2002 18:34:39 +0200 [thread overview]
Message-ID: <20020407163439.GA7681@wagsty> (raw)
In-Reply-To: <Pine.LNX.4.21.0204040205400.17205-100000@pg5.enm.bris.ac.uk>
[-- Attachment #1: Type: text/plain, Size: 1897 bytes --]
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
[-- Attachment #2: dosemu-rawkeyboard-console.patch --]
[-- Type: text/plain, Size: 587 bytes --]
--- 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;
next parent reply other threads:[~2002-04-07 16:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.21.0204040045290.17033-100000@pg5.enm.bris.ac.uk>
[not found] ` <Pine.LNX.4.21.0204040205400.17205-100000@pg5.enm.bris.ac.uk>
2002-04-07 16:34 ` Witold Filipczyk [this message]
2002-04-07 17:52 ` non-privileged raw keyboard Bart Oldeman
2002-04-07 19:13 ` Witold Filipczyk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020407163439.GA7681@wagsty \
--to=juandon@poczta.onet.pl \
--cc=linux-msdos@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox