LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-21-2003, 10:11 AM   #1
byronm
LQ Newbie
 
Registered: Aug 2003
Location: London
Distribution: Red Hat Linux 9.0
Posts: 1

Rep: Reputation: 0
Arrow console exclusivity to application


I am writing an application that requires a quasi realtime display using ncurses that runs in a standard text ("virtual"?) console.

My problem is knowing what to do to ensure that nothing else will write to this terminal and hence corrupt what is displayed.

It seems that my efforts so far are corrupted primarily by
- occasional system/kernal messages
- and even echos from other virtual terminals (e.g. echo "Hello" > /dev/tty1) appear and corrupt the display
(There may be other daemons just waiting to add to this list that I am not yet aware of)

Is there a programming solution to make what appears on the console under the exclusive control of the application that is running within it?
 
Old 08-21-2003, 11:56 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
1) change the init scripts sysklogd, klogd and maybe some others so the daemons will not write to the console. e.g. for klogd specify "-c 2" option.

2) don't echo to the terminal. Only root or the same user can do it, so you're in control of this yourself.

You probably thought about this yourself. More seriously: I wouldn't know really how to do that in a program, and I doubt if it is really possible. Interesting question however...

Last edited by Hko; 08-21-2003 at 11:57 AM.
 
  


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
Wine can run only console application. vadimkovalev Linux - Newbie 1 09-29-2005 11:57 AM
Starting an application on X by console tiagomadeira Programming 1 01-09-2005 07:20 AM
Starting an application on X by console tiagomadeira Linux - Software 4 01-09-2005 06:53 AM
JAVA: how to play wav file from a console application randomx Programming 5 10-12-2004 02:34 PM
Kylix Indy TrivialFTPServer on Console application Arunas Programming 1 05-09-2003 03:34 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:25 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