I wanna write a terminal emulator program from scratch. I downloaded the sources of xterm but they are too complex...
I did not found any documentation on the Internet, so I asking you where I have to start.
I learnt only C, and I have the basics of GTK library.
Thanks for any reply.
Last edited by mghis; 07-30-2010 at 06:54 PM..
Reason: Minstake
You might want to break that big project into a bunch of smaller parts, or you'll never know where to begin!
Displaying the characters.
How difficult do you want to make it? You could make a simple ASCII-only terminal with an image mosaic as the "font", all the way up to a unicode terminal using unicode fonts...
Virtual Terminal.
A lot of terminal behavior is actually handled by the terminal device, not the user-mode program. Things like sending SIGINT on ctrl-C, EOF on ctrl-D, and so forth are handled not by your code but by kernel code controlling the device. In particular if you want programs in your terminal to get a "yes" when they ask the kernel if they're in a terminal, you'll need to use a virtual terminal. I've written a short example here when I was figuring out how to use virtual terminals myself.
Terminal Emulation
What terminal do you want to emulate? (Probably VT100 or related, right?) What features do you want? Should it support color? Repositioning the cursor? Multiple buffers? etc, etc, etc.
Since you'll need to build around virtual terminals in any case that's where I'd start, get virtual terminals working with no GUI element at all then build on it from there.
Thanks for the answers.
I wanna write a basic terminal emulator: no color, no bold, no double-width.
I wanna wrote the terminal emulator only for learning propouses!
I'm using KERMIT (the dos version), but I'd prefere to the /dev/pts/x files, just like a basic version of the gnome-terminal.
Thanks for the link, Corona688. The file is really useful! But i have a problem! I compiled with 'gcc -o vterm vterm.c' but there are some errors!
Thanks for any help
PS: I started learning the FLTK toolkit! It may be useful!
Last edited by mghis; 08-03-2010 at 08:40 PM..
Reason: Adding
This is a very interesting post. I want to do a similar project but have discovered documentation on the subject is either too limited or much too complex for someone not so experienced with c++.
Corona688, your input was especially helpful. I wonder whether you could breakdown the steps you highlighted or give reference documentation (beginner friendly) for the different categories you mentioned. Apparently this is not a going to be a simple undertaking as I had hoped.
Hi, I was just wondering how to distinguish between the two terms:
1. Terminal emulator (vt100, vt220 and so on)
2. shell command line
Then i decided to conclude myself that these 2 are very equivalent. am I right? this actually came to my mind when I was using my HP-UX terminal.
I am... (1 Reply)
Hello Expert! :b:
Question for you guys, Can anyone tell me how to use terminal emulator on Windows XP to view Solaris config? I have no idea on Solaris and the only thing I could do is to boot it up. Honestly, I have given a tasked to delete all the files and some necessary memory information... (2 Replies)
Hey,
Had anyone tried with writing a new FS - file system ( whether its useful or not, that doesn't matter ) ?
I tried one couple of years ago, but that was a fatal failure :( and can't continue working on it since then. :(
Anybody got some experience with writing file system from the... (4 Replies)
hi all,
i'm trying to write a unix system from scratch (not re-writing the kernel)
does anyone have information about that? tips and stuff...?i would appreciate every help,
thnks :) (9 Replies)
hello,
can any body tell how to use terminal emulator....
i want to check he serial port communication with the help of that terminal emmulator....
also tell me how to open terminal emmulator.....and how to configure it........and how to use it...
I am using fedora core 6..... (1 Reply)