Tag Info

Hot answers tagged

19

The master side replaces the line (the pair of TX/RX wires) that goes to the terminal. The terminal displays the characters that it receives on one of the wires (some of those are control characters and make it do things like move the cursor, change colour...) and sends on another wire the characters corresponding to the keys you type. Terminal emulators ...


16

Originally you had just dumb terminals - at first actually teletypewriters (similar to an electric typewriter, but with a roll of paper), but later screen+keyboard-combos - which just sent a key-code to the computer and the computer sent back a command that wrote the letter on the terminal (ie. the terminal was without local echo, the computer had to order ...


16

What is $TERM for? The $TERM variable is for use by applications to take advantage of capabilities of that terminal. For example, if a program want's to display colored text, it must first find out if the terminal you're using supports colored text, and then if it does, how to do colored text. The way this works is that the system keeps a library of known ...


12

When you “open a terminal”, you're starting a terminal emulator program, such as xterm, gnome-terminal, lxterm, konsole, … One of the first things the terminal emulator does is to allocate a pseudo terminal (often called a pseudo-tty, or pty for short). The pty is a pair of character device files: the pty master, which is the side that the terminal emulator ...


10

The process started by xterm will be the session leader in control of the terminal. When the terminal goes away, that process automatically receive a SIGHUP signal (followed by a SIGCONT). This is sent by the kernel in a similar way that processes receive SIGINT when you press CTRL-C. Additionally, a shell may send SIGHUP to some of its children upon ...


10

I don't think you can. xterm need not be installed everywhere, and indeed probably isn't by default. Especially when a desktop environment is in use that provides its own terminal. I think your best bet is probably to check for the existence of a few different terminals (say, xdg-terminal, x-terminal-emulator, gnome-terminal, konsole, xterm). And maybe work ...


10

After a lot of reading, this is what I understood. Has ptmx any purpose besides allocating the slave part? Does it provide some kind of "intelligence", or the emulated terminal (xterm for instance) has all the intelligence of behaving like a terminal? /dev/ptmx doesn't allocate the slave part: it allocates the "pseudo terminal master part". /dev/ptmx ...


9

\033 is the octal code for the Esc (Escape) character, which is a good hint that the echoed strings in your PROMPT_COMMAND are terminal control sequences. Both sequences in your examples look like they set the terminal title to user@host:pwd. The first case, xterm* sets the window name and icon title. For a detailed explanation, look at the list of xterm ...


9

Most terminals can be launched using the geometry switch allowing you to specify terminal's size and position (COLUMNSxROWS+X+Y) e.g.: gnome-terminal --geometry 73x31+100+300 or xterm -geometry 93x31+100+350 If you want to make the above permanent, copy the terminal launcher (terminal's .desktop file) from /usr/share/applications/ to ...


8

There is a perl script, 256colors2.pl, that will display all the colours on your terminal.


7

VT100s responded to character sequences sent to them as output. So echo'ing characters works because the terminal sees it as output. Typing characters is input; the terminal will respond only if the characters are echoed by the receiving computer. Your typical shell doesn't echo ESC, it interprets ESC as the prefix for some interactive input command. Run ...


7

When you press a key or key combination in a terminal, it is transmitted to the application running in the terminal as a sequence of one or more characters. For example, when you press a, the application receives a. When you press Enter, the application receives the character CR (a.k.a. ^M (pronounced “control-emm”), a.k.a. character number 13, a.k.a. \r or ...


7

The TERM environment variable indicates the terminal type, not the terminal application. TERM has a specific purpose: it tells applications running in that terminal how to interact with the terminal. Applications interact with terminals by writing escape sequences — sequences of characters that include nonprintable characters and have effects such as moving ...


6

A terminal emulator provides a standardised character based interface for text mode applications, it emulates the behavior of real or idealised hardware. Consoles typically run some sort of terminal emulation, (linux console emulates a VT220 with some additions) A terminal was dedicated hardware that implements the standard and iwas connected to ther ...


6

Screen does what you want. It wraps lines while resizing the window. sudo apt-get install screen screen HTH


6

I haven't used it as I don't speak Arabic, but this gets decent reviews: http://mlterm.sourceforge.net/ See also: A Quick Primer on Unicode and Software Internationalization under Linux and Unix.


5

if running Ctrl-Q (as described in another Answer) doesn't work, it's possible that your TTY has been mangled by some other program you've run. Try running reset and then clear (or ctrl-L) to initialze your terminal.


5

The value of $TERM does not give much information about the number of supported colors. Many terminals advertise themselves as xterm, and they can support any number of colors from just 2 to at least 256. You can query the value of each color with the OSC 4 ; c ; ? BEL control sequence. If the color number c is supported, the terminal will answer back with ...


5

The value of the environment variable TERM is used by the server (in system V, or BSD, derived OSes) to control how input is recognized by the system, and what capabilities exist for output. Some terminal types are similar enough that they can be interchanged while still remaining usefull, while others could make the system unusable until you open a new ...


5

There is a feature in terminals called "alternate screen". It lets a program use a different virtual "screen" and restore the previous one when it exits. You need a terminal emulator that supports this feature. Gnome-terminal, urxvt, and xterm all do. I've never seen it disabled by default, but if it is just disabled, you may be able to enable it using ...


5

Indeed it is. The /dev/vcs* and /dev/vcsa* devices corresponds to the /dev/tty* devices (the virtual terminals). F1=tty1=vcs1/vcsa1 and so on. The vcs/vcsa is like tty for the "current" virtual terminal. As root, you can just cat these devices (e.g. cat /dev/vcs2), and see what's on the corresponding VT (e.g. /dev/tty2 the on on F2) like taking a ...


5

I came across this one tool called ttylog. It's a Perl program available on CPAN here. It has a couple caveats, one being that I could only figure out how to attach to a terminal that was created as part of someone ssh'ing into my box. The other being that you have to run it with elevated privileges (i.e. root or sudo). But it works! For example First ssh ...


5

Perhaps your confusion arises from not having used an actual terminal. Back when serious computers were the size of several upright refrigerators, a terminal communicated with a central computer over a serial cable using characters and characters only. The characters were part of some standardized character set, e.g. ASCII or EBCDIC, but typically ASCII. ...


4

You're misunderstanding. Your console or terminal or PuTTY instance on the LOCAL side is the actual "terminal emulator", even though nowadays we just shorten then to "terminals". The usage stems from back when people actually used monitor-and-keyboard terminals to sign on to a mainframe server rather than using multiple consoles and graphical user ...


4

This may not be what you expect, nor was if for me, but it works (no mouse required)... (btw: I've just started using Terminator, and so far I like it).. A way to do it is to simply do this: If your active cursor is already in the Find box, just keep pressing Enter for Next.... and for Prev, press Tab to make the Prev button active an then just keep ...


4

I don't know specifically about AIX, but on most unices, you cannot do this, by design. You can't read or write on other people's terminals, what happens there is none of your business. The write program has extra privileges (setuid root, or setgid tty, depending on the system). It takes care to sanitize the input you throw at it so as not to disrupt the ...


4

I don't have Lubuntu installed to test but maybe: To configuration file ~/.config/openbox/lubuntu-rc.xml adding the lines below : <!-- Option to maximize all normal window when launched--> <application type="normal"> <maximized>true</maximized> </application> Removal of this was suggested as a way to STOP it from doing so ...


4

In case #2 and #3 you're mixing two different encoding UTF-8 and Latin-1. In case #1 you're using Latin-1 for both, so you don't have a problem. The ls command (and all other well behaving programms) use the LANG setting for determining the encoding. You may mixing two different Languages, but you shouldn't mix two different encodings. Ensure that the ...


4

Here is a simple script to help put local file names into a format which are ctl-clickable from within Gnome-Terminal. #!/bin/bash function asURL() { PREFIX="file://$(pwd)/"; sed "s*^*$PREFIX*" | sed 's/ /%20/g'; } find "$@" | asURL Examples, furl *.pdf furl -name \*.pdf



Only top voted, non community-wiki answers of a minimum length are eligible