need help with using a new terminal for my programs

This is a discussion on need help with using a new terminal for my programs within the Linux Programming forums, part of the Platform Specific Boards category; hey all I wounder how I should take up new terminal for my programs to be runed in when I ...

  1. #1
    Wannabe Coding God
    Join Date
    Mar 2003
    Posts
    259

    need help with using a new terminal for my programs

    hey all I wounder how I should take up new terminal for my programs to be runed in when I print ./program I have looked for some tuts but since I dont really know what I am looking for I havn´t had any succes oh and I`M using a text editor to make my code and then usea shell skript to compile it oh and I`M using C


    /thx in advance


    (this really looks like a newbie post doesn´t it?)
    They say that if you play a Windows Install CD backwords, you hear satanic messages. That's nothing; play it forward and it installs Windows.

  2. #2
    Wannabe Coding God
    Join Date
    Mar 2003
    Posts
    259
    I simply whant a new window to pop up when I start the program and that the program will run in it.



    (man thats a way smaller post for saying the same thing as my first one, I should have put it like this right away....)
    They say that if you play a Windows Install CD backwords, you hear satanic messages. That's nothing; play it forward and it installs Windows.

  3. #3
    bored
    Guest
    how could you create a virtual cosole? no x's xterm.

  4. #4
    Wannabe Coding God
    Join Date
    Mar 2003
    Posts
    259
    Originally posted by vVv
    Code:
    #include <stdio.h>
    #include <unistd.h>
    
    int main( ) {
      execl( "/usr/bin/xterm", "-e", "./prog", ( char* )0 );
      perror( "execl" );
    }
    Try something like this to run your program. Could even do that as shell script:

    Code:
    #!/bin/sh
    
    /usr/bin/xterm -e ./prog
    (Of course, your program is called ``prog'' here, and xterm is expected to reside in /usr/bin. Type ``whereis xterm'', if you don't know where it is)

    I`m not complitly sure I understand this...(the shell sript pritty much confussed me) so this pice of code takes up a new window when I start my program and let the program take place in it instad of in the old terminal that I used to start it?
    They say that if you play a Windows Install CD backwords, you hear satanic messages. That's nothing; play it forward and it installs Windows.

  5. #5
    Wannabe Coding God
    Join Date
    Mar 2003
    Posts
    259
    lol I`ll try it and thx for explaining :-)
    They say that if you play a Windows Install CD backwords, you hear satanic messages. That's nothing; play it forward and it installs Windows.

  6. #6
    Wannabe Coding God
    Join Date
    Mar 2003
    Posts
    259
    this idea poped up...what if I wanna take up a new window while my program is running to just use some code in it like say that you um answer yes to a question then a new window pop ups and there it says "ok" or somthing like that...how do I do that?
    They say that if you play a Windows Install CD backwords, you hear satanic messages. That's nothing; play it forward and it installs Windows.

  7. #7
    Wannabe Coding God
    Join Date
    Mar 2003
    Posts
    259
    where can I get those and some manuals for them?
    They say that if you play a Windows Install CD backwords, you hear satanic messages. That's nothing; play it forward and it installs Windows.

  8. #8
    Wannabe Coding God
    Join Date
    Mar 2003
    Posts
    259
    Originally posted by vVv
    Code:
    #include <stdio.h>
    #include <unistd.h>
    
    int main( ) {
      execl( "/usr/bin/xterm", "-e", "./prog", ( char* )0 );
      perror( "execl" );
    }

    it didint work...it compiled fine but when I tryed to execute it it sad no dirtorty or file for execl
    They say that if you play a Windows Install CD backwords, you hear satanic messages. That's nothing; play it forward and it installs Windows.

  9. #9
    Wannabe Coding God
    Join Date
    Mar 2003
    Posts
    259
    ummm..welll...that was pritty big letters ya know...Im not sure where exelc is I`ll have a look around and I named my program prog just to be on the safe side if you would say anything like that but I still have the felling with wont work since when I tryed the clrscr it compile fine but told me the same thing when I tryed to execute it.
    Last edited by Shogun; 04-08-2003 at 12:28 PM.
    They say that if you play a Windows Install CD backwords, you hear satanic messages. That's nothing; play it forward and it installs Windows.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem Clearing Terminal
    By mrginger in forum C Programming
    Replies: 3
    Last Post: 04-15-2009, 12:58 PM
  2. Console, Terminal and Terminal Emulator
    By lehe in forum C Programming
    Replies: 4
    Last Post: 02-15-2009, 09:59 PM
  3. Recommend upgrade path for C programs
    By emanresu in forum C Programming
    Replies: 3
    Last Post: 11-22-2007, 07:32 AM
  4. POSIX/DOS programs?
    By nickname_changed in forum C++ Programming
    Replies: 1
    Last Post: 02-28-2003, 05:42 AM
  5. executing c++ programs on the web
    By gulti01 in forum C++ Programming
    Replies: 4
    Last Post: 08-12-2002, 04:12 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21