Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I wish to use the showkey function to develeop a keylogger. The problem is: the function terminates if no key is pressed for 10 consecutive seconds. I tried using the -t option as suggested in some forums, but my version of showkey doesn't have the option of changing the timeout.
The options I get are:
-h --help display this help text
-a --ascii display the decimal/octal/hex values of the keys
-s --scancodes display only the raw scan-codes
-k --keycodes display only the interpreted keycodes (default).
Is it possible to write a script to use this function and still keep the function active until an interrupt is recieved?
I looked at the code and observed, that the 10 seconds timeout is hardcoded. Maybe you can modify the source code to overcome this limit?
Otherwise you can call showkey in an endless loop.
If I run it in an endless loop, then multiple calls will be made if previous functions do not time out. Won't that create multiple logs and redundant data?
If I run it in an endless loop, then multiple calls will be made if previous functions do not time out. Won't that create multiple logs and redundant data?
You do not start infinitely many showkey processes at the same time, but just restart showkey, if it terminates.
Hi! I tried the code in the shell, it is working fine....but when I switch to another app(Word Processor etc), or switch to another terminal....it doesn't work.
Pretty stupid problem now.....it works normally if I remove >>mylog, the function showkey terminates and restarts on its own.
What does the >>mylog mean? Does the showkey function write the captured keypresses, maps it to some data structure present in mylog, and write out the equivalent alphanumeric characters on to the console?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.