473,749 Members | 2,463 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

c program running 2 terminal windows, how to specify in which to write?

Hi all,

I have a c program under linux, while running, it opens a new terminal
windows using a system call. I would like to display messages on both
windows.
But I can't find a way to specify the terminal window I want to write
in.

The program is for chat and I want to keep a terminal window to write
incoming messages, and use the other one for operation like sending
messages or viewing list of nicks in the room....

To start the new window, i use the command:
system("gnome-terminal");

but I really can't see if there is some possible way to write to it,
all my messages keep arriving in the original window.

If there is any way you can help me, I will be very thankful,

Thanks to all of you guys,
Achraf
Nov 14 '05 #1
2 2230
Achraf wrote:
Hi all,

I have a c program under linux, while running, it opens a new terminal
windows using a system call. I would like to display messages on both
windows.
But I can't find a way to specify the terminal window I want to write
in.

The program is for chat and I want to keep a terminal window to write
incoming messages, and use the other one for operation like sending
messages or viewing list of nicks in the room....

To start the new window, i use the command:
system("gnome-terminal");

but I really can't see if there is some possible way to write to it,
all my messages keep arriving in the original window.

If there is any way you can help me, I will be very thankful,

Thanks to all of you guys,
Achraf

There is a topic called IPC , which is out of topic of the current
newsgroup.
Check out comp.unix.progr ammer !

--
Karthik
Humans please 'removeme_' for my real email.
Nov 14 '05 #2
Achraf wrote:
I have a c program under linux, while running, it opens a new
terminal windows using a system call. I would like to display
messages on both windows. But I can't find a way to specify
the terminal window I want to write in.


Try comp.os.linux.d evelopment.apps

Nov 14 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3002
by: Will Stuyvesant | last post by:
I never used the popen or popen2 libraries but it is my understanding that they can capture the output of console based programs. Is it also possible to send keystrokes to console base programs? I would like to program a Python program that can play for instance the tty version of nethack 3.4.3 on Windows, simulating a human player: for nethack it would not be possible to know if a human or a computer program is playing it. It is a...
40
2641
by: findmadhav | last post by:
I need a program in C (something like a TSR) which will automatically press the function key F6, say about every 5 seconds. Can anyone provide me with an exe of such a program? Thanks in advance.
29
4405
by: keredil | last post by:
Hi, Will the memory allocated by malloc get released when program exits? I guess it will since when the program exits, the OS will free all the memory (global, stack, heap) used by this process. Is it correct?
8
9299
by: Sree | last post by:
hello friends, Can i make a C program run as as background service? for eg. like the windows services we have. which are not visible on the desktop but still running behind. If there is some possibility, please let me know how to do it.
4
1880
by: Stylus277 | last post by:
Hello, I am working with a client that has an old Linux server with a custom cbase program. The server has been humming along since 1989, with the exception of a HDD fail in 1994, which was replaced restored from tape. The uptime on this beast is like 12 years and counting. Just this week the last linux terminal was replaced with a new Dell running XP Pro. The client wants to keep the software but wants the space where the server fits...
8
2288
by: =?iso-8859-1?B?QW5kcuk=?= | last post by:
I would like to find out how I can launch an independent Python program from existing one in a cross-platform way. The result I am after is that a new terminal window should open (for io independent of the original script). The following seems to work correctly under Ubuntu and Windows ... but I haven't been able to find a way to make it work under Mac OS. def exec_external(code, path): """execute code in an external process
37
5069
by: Vince C. | last post by:
Hi all. I've installed Bloodshed Dev-C++ on a Windows 2000 SP4 machine. I'm using MinGW 3.4.2. I'd like to temporarily disable standard functions to write to stderr, i.e. for instance redirect stderr to a temporary file (or /dev/null but is there an equivalent under Windows? Is it "nul:") and then to *restore* the default stderr so that standard library functions that write to stderr produce output again.
14
2658
by: jmDesktop | last post by:
Hi, I'm trying to learn Python. I using Aquamac an emac implementation with mac os x. I have a program. If I go to the command prompt and type pythong myprog.py, it works. Can the program be run from within the editor or is that not how development is done? I ask because I was using Visual Studio with C# and, if you're familiar, you just hit run and it works. On Python do I use the editor for editing only and then run the program from...
11
4755
by: 960392954 | last post by:
The Towers of Hanoi is a famous problem about moving a certain number of disks from one peg to another.I write a recursive program for it.If you have known it ,you can skip the program. #include <stdio.h> void hanoi(int num,char initial,char terminal,char temporary); void main (){ int num;/*num is the number of disks of the initial peg*/ char a='a',b='b',c='c'; /*a is the initial peg ,c is the terminal peg,b is used as a temporary peg*/
0
8996
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8832
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9566
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9388
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9333
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8256
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.