Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 at 16:54
1  
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 at 17:13
    
I haven't been able to find anything related to this???? Have you just tried man system? –  MariusMatutiae Jan 2 at 19:20

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.