Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 08-21-2003, 10:11 AM   #1
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
Senior Member
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 110Reputation: 110
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:44 AM.

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