Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an assignment in which I have to use socket programming in C to connect multiple clients with the same server. The problem is that every time a client connects to the server the server must open a new terminal for the client (using fork I guess). The teacher gave us a hint that this can be done using system(); function. However, I haven't been able to find anything related to this. Can anyone please help me with this?

In a nutshell, all I want to know is how to open a new terminal from within a terminal in linux.

share|improve this question
Ummm, run xterm from within the terminal? What exactly are you asking here? – terdon Jan 1 '14 at 16:54
I suspect that this question should read: My teacher gave us a class assignment. Its main thrust is client-server interaction using sockets and I'm not asking about that because it would be asking for you to do my assignment. My problem is the (dummy example) service that is provided to the client by the server. I've been a bit confused by the spec saying to "open a new terminal". Perhaps my teacher meant "open a new shell". Anyway, that's what I'm asking about. Yes, I know that you cannot read my teacher's mind. Could you migrate this programming question to StackOverflow? – JdeBP Jan 1 '14 at 17:13
I haven't been able to find anything related to this???? Have you just tried man system? – MariusMatutiae Jan 2 '14 at 19:20

It is system dependant.

  • For KDE type konsole
  • For GNOME type gnome-terminal

The most "universal" command for X systems would be xterm.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .