1 / 12

Linux Terminal System

Linux Terminal System. Conceptual Linux terminal Terminal API Terminal emulators Graphical user interfaces. Conceptual Linux terminal. Mainframe. Terminal. User. Application. Keyboard. Kernel. Display. Modem. Modem. stdin/stdout. Low-level calls: read(), write(), fd's

mandim
Download Presentation

Linux Terminal System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Linux Terminal System • Conceptual Linux terminal • Terminal API • Terminal emulators • Graphical user interfaces

  2. Conceptual Linux terminal Mainframe Terminal User Application Keyboard Kernel Display Modem Modem

  3. stdin/stdout • Low-level calls: read(), write(), fd's • High-level calls: fread(), fwrite(), FILE*'s • Formatted I/O: fscanf(), fprintf(), FILE*'s • Redirection: dup2(), pipes “|”, redir “>” $ randomize < input | rot13 | tee log | rot13 | sort $ cat log randomize rot13 tee rot13 sort input log cat terminal

  4. Escape sequences & function keys Application Escape sequences “\e[2J” = clear screen Terminal • Many incompatible escape sequences and terminal capabilities • $TERM identifies terminal type • termcap/terminfo defines terminal types Function key sequences “\e[A” = up arrow key

  5. ioctls and termios • ioctls give very low-level access • termios standardizes interface • ioctls/termios can adjust canonical (cooked) and non-canonical (raw) modes • Linux terminal provides font, etc. ioctls • Serial ports have baud rate, etc. ioctls

  6. curses, ncurses, and S-Lang • Wrapper libraries hide complexity of terminal programming • Provides portable interface to many terminal types • curses: cursor control library • ncurses: new curses • S-Lang: contains terminal control library

  7. Terminal emulators • Consumer computer systems have integrated human interface hardware, so terminal functionality must be emulated • Dumb terminal: works like a teletype • Linux vt100: VGA + keyboard + buzzer • GNU screen: display multiplexing • xterm: text terminals in graphical display

  8. X Window System • X server gives programs access to keyboard, mouse, and display hardware • Client apps tell the server what to draw • User sits in front of X server Mainframe Mainframe X server User X app 1 X app 2 Kbd/VGA

  9. VNC: Virtual Network Computing • Cross between GNU screen and X • User sits in front of VNC client (“viewer”) Mainframe Mainframe Workstation User gimp wmaker XFree86 Xvnc xterm vncviewer

  10. Conclusion • Archetypical Linux terminal system • Program input and output • Terminal API, low- and high-level • Terminal emulators • Graphical user interfaces Slides available online: http://ioioio.net/school/terminal/slides.pdf

  11. GNU screen

  12. VPN over SSH

More Related