LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 03-23-2011, 04:20 AM   #1
Abid Malik
LQ Newbie
 
Registered: Sep 2010
Posts: 25

Rep: Reputation: -1
Smile Kernel Module waits for user input


Hello friends,

I need help regarding to the Linux kernel module that waites for user input from keyboard and then display or prints it on the terminal only.

I have made a function that uses tty structure but it works only in _init or main only. Please give me a simple Linux Kernel Module code in c that works accordingly.

Thank you.
 
Old 03-23-2011, 04:32 AM   #2
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 106Reputation: 106
Do you mean you are booting to a command prompt & you want to start a GUI ( Gnome et cettera) ?

try



Quote:
startx

or

sudo startx
 
Old 03-23-2011, 12:08 PM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Moved: This thread is more suitable in Linux - Kernel and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 03-23-2011, 12:13 PM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
@Abid_Malik: maybe you accidentaly clicked the Report button instead of the Quote button in the lower-right corner of the jv2112's post. Anyway, I write down your answer here:
Quote:
Originally Posted by jv2112 View Post
Do you mean you are booting to a command prompt & you want to start a GUI ( Gnome et cettera) ?
No, i just want to wait the kernel for user input
 
1 members found this post helpful.
Old 03-25-2011, 10:50 AM   #5
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Quote:
Originally Posted by colucix View Post
Anyway, I write down your answer here
Thanks for bothering so much.

Quote:
Originally Posted by Abid Malik View Post
No, i just want to wait the kernel for user input
Hit out Google with the keywords: TLDP Passing Command Line Arguments to a Module
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I/O activity waits for keyboard or mouse input CollieJim Linux - Kernel 2 12-01-2010 01:44 AM
[SOLVED] Does a kernel module run in kernel or user space? paliga Linux - General 4 10-31-2010 07:22 AM
how to input data from user space to kernel unikgila Linux - Kernel 3 08-26-2008 10:04 PM
User input into Bash scripts and checking validity of user input?? helptonewbie Programming 8 07-07-2008 06:40 PM
Kernel waits for unconnected hda AntonWert Linux - General 4 01-24-2006 04:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 11:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration