Sponsored Content
Top Forums Programming Read 1 of 2 keyboards connected Post 302980896 by bakunin on Sunday 4th of September 2016 05:22:42 PM
Old 09-04-2016
Quote:
Originally Posted by SerKan
2 usb keyboards connected to a normal x86
One keyboard working as usual in xorg, but I need that the other one doesn't send anything to xorg but instead I want to process its keystrokes with some kind of background process.
First a bit of theory: you communicate with a UNIX system by using a "tty": a "terminal" consisting of a keyboard and a screen, usually connected via a serial line.

If you connect to a UNIX system over a network you use a so-called "terminal emulator program" (many times "xterm", but that is not the only one) to emulate such a terminal and its serial connection is emulated via the network connection.

There is a special form of a tty, which is called console. This is not connected via the standard serial line but directly attached to the computer. Perhaps the local screen attached to your VGA-card and the (first) keyboard form this console.

Now, after that much theory, to your specific question: this might work, but not necessarily with a USB-attached keyboard and definitely not with a background process. Background processes are part of a process hierarchy, headed by some foreground process: this is usually the shell from which you initiated the background process, typically by issuing the command:

Code:
$ /path/to/command -someoptions &

Since the shell you typed that in was already connected to some tty (the one which keyboard you used to type it, probably the console) the background process inherited this connection. You can cut it off from this (by using the nohup command) but per default itis attached to the one you used to call it. Furthermore, a single USB-attached keyboard is not a terminal.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
 

10 More Discussions You Might Find Interesting

1. AIX

How can I get Information about who is connected???

Hello, I'm new here and I come from Germany. At our AIX-ORACLE-System someone has deleted one important file and we'd like to find out who did this, next time. Is there any command to find out who is connected? I'm not trying to find out if it's root, etc., I'd like to get the DNS-Name or... (3 Replies)
Discussion started by: Huch
3 Replies

2. Programming

Connected or not connected !

Hello ! I've got a question . I really don't het this point. Let's supose that I have a client connected to a server. I want the server IMEDIATLY know if the client is diconnected . How can I realize this ? :mad: Amd I'm just curios about one thing. I have a server and multiple clients... (3 Replies)
Discussion started by: !_30
3 Replies

3. IP Networking

check whether connected to network

hi... can anyone pls suggest a few methods to check whether a computer is connected to any network, using the terminal, not GUI. thanks eskay (1 Reply)
Discussion started by: eskay_karthik
1 Replies

4. UNIX for Advanced & Expert Users

linux connected to as400

we have a as400 5rev4 and want to use a rhel server to use as a file server. We exported a drive on the rhel box and then mounted it on the as400. We can see the top directory in our mounted as400 directory but when we attempt access subdirectories we get a no matching object error. When we open... (2 Replies)
Discussion started by: javagair
2 Replies

5. AIX

How do I know to which storage I am connected

Hello everyone. We have a environment where we have DS8K storage and ES800 storage, the way to check to which storage the box is connected is using the LUN ID I get frm " pcmpath query device " command. for ex: 75CXX - DS8K storage 26860 - ES 800 Storage I was told to check... (4 Replies)
Discussion started by: nivaspIND
4 Replies

6. IP Networking

Am I Connected?

Be Gentle folks, I am a baby OpenSuSe 11.2 user :-) In windows Vista, there is a world in the systray when you are Internet connected and not just local. I have searched all over for a .RPM for the Network Manager or another packeg in Suse that can show me the same thing or something close. ... (0 Replies)
Discussion started by: donmaxwelliii
0 Replies

7. UNIX for Dummies Questions & Answers

Non Internet connected distribution

Hi all I've been a Debian user since solidly since about 1997 so I'm fairly experienced Linux user as a whole but unfortunately the monoculture has hit be hard recently. I'm working off a Laptop a lot of the time which spends up to 2-4 weeks without an Internet connection. A few weeks ago it... (1 Reply)
Discussion started by: pointyhat
1 Replies

8. UNIX for Dummies Questions & Answers

Ftp showing connected only

hi, good morning. Anyone can help me out. A trying to ftp from server A to server B. from server A to B its working fine but from server B to A, its only showing connected only: finap7 #ftp 10.10.10.210 Connected to 10.10.10.210. I refresh the inetd but nothing is happening. Please... (1 Reply)
Discussion started by: kamaldev
1 Replies

9. OS X (Apple)

How to see connected macs through terminal?

Been a while since I've been here; I have my iMac and MBpro connected via firewire, and they can see each other when I open the finder windows. But I'd like to be able to 'see' each computer on the other via the terminal application; and I can't see them right now. I can transfer files via the... (0 Replies)
Discussion started by: Straitsfan
0 Replies

10. IP Networking

Connected to IANA anyway, why?

May someone can answer this. Anytime I ignite my laptop to go online I see via etherape that I am connected to IANA as shown below. Is my provider redirecting me there, the cable under the sea, what is the reason for this? This happened with a pretty normal desktop PC, as well with my ancient... (2 Replies)
Discussion started by: 1in10
2 Replies
scc(7)							 Miscellaneous Information Manual						    scc(7)

NAME
scc - Serial keyboard/mouse/communications interface SYNOPSIS
controller scc0 at tc0 slot 3 vector sccintr DESCRIPTION
Two base board Zilog scc dual UARTS provide DEC 3000 series personal systems with keyboard, mouse, and serial communications interfaces. The serial communications interfaces can operate at baud rates from B50 to B57600 (see tty(7)). The driver for the scc interface supports hardware flow control using the Request to Send (RTS) and Clear to Send (CTS) signals. When hardware flow control is enabled, the flow of input data is controlled by the RTS signal and the flow of output data is controlled by the CTS signal. If the CTS signal is off, the driver will suspend output to that line until the CTS lead is reasserted. Likewise, the driver will turn off the RTS lead to tell the device connected to the line to stop sending data as a result of congestion on the host side. When the condition clears, the driver will turn on the RTS lead to tell the device to resume sending data. In alternate console configurations (that is, no graphics head), communications port 2 (/dev/tty01) becomes the system console. The serial system console port always operates at 9600 BPS, 8-bits, no parity. No modem or hardware flow control is supported. RESTRICTIONS
Data communications equipment attached to the console serial port in alternate console configurations must be set to 9600 BPS, 8-bits, no parity. The scc driver enforces this restriction. Only communications port 1 (/dev/tty00) includes full modem control. FILES
console terminal local terminal local terminal RELATED INFORMATION
console(7), devio(7), modem(7), tty(7), MAKEDEV(8) delim off scc(7)
All times are GMT -4. The time now is 01:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy