Tag Info

New answers tagged

4

Those are sequences of characters sent by your terminal when you press a given key. Nothing to do with bash or readline per se, but you'll want to know what sequence of characters a given key or key combination sends if you want to configure readline to do something upon a given key press. When you press the A key, generally terminals send the a (0x61) ...


1

Do these codes come from the same source? The last one looks like a GNU readline binding. That's what the user sends to a bash (see rush's answer). The first two, however, look more like terminal control sequences (even though the first one would be an ill-formed one). That's what bash or another program send back to the terminal emulator in order to control ...


3

It is provided via gnu readline library. you should look into man 3 readline to find out its description. Looks like you also need information about what does escspe codes liks \[A mean. You can find this information in wikipedia ANSI esacape code article.


0

Eventually, we went with having the .bash_profile run screen if and only if the variable $SSH_CONNECTION was set. That means the normal use case (logging in via ssh) gets screen (and we can work around that by specifying bash --noprofile as the command to run on login), and for console connections we just get a regular session. Of course, if we hose things ...


2

A tilde suffix is usually used for backup files. Vim and Emacs use this convention and probably many other programs, too. .swp files are vim swap files which are only present during editing of a file or in the case vim crashed.


3

Typically files ending with a ~ are backup files created by an editing program like emacs or nano.


0

Check out the eclim package which can do this and much more: http://www.skybert.net/emacs/java/


0

You should be able to get there with Ctrl+c Ctrl+v Ctrl+y, assuming you have the Java Development Environment for Emacs installed.


0

Try Vertical Split for GNU Screen This patch provides a vertical split feature for current releases of GNU Screen. The feature is designed to function in the same manner as screen's existing split command, but dividing the regions vertically instead of horizontally. Both forms of splits can be used together in any combination/quantity/order desired. ...


2

Take a look at the command line tool rhythmbox-client. Looking at the options there's a --seek switch which should do what you want. rhytmbox-client --seek=+60 There are reports that this should work but doesn't. Might be a bug? As an alternative method you can fire the commands directly yourself using dbus: # seek forward 60 sec dbus-send --print-reply ...


8

When w's output goes to a terminal. w queries the terminal driver for the number of columns and adjusts the width accordingly. When output doesn't go to a terminal such as when it goes to a pipe, it reverts to a fixed width of 80 columns. Versions of procps since 3.3.2 allow to override that default with the $COLUMNS environment variable. Some shells like ...


0

After a bit of digging, it seems that this is expected behavior for now, because it's a security fix. On the other hand, I've discovered that it also adds a small security risk, but I'll have to do some more digging to make sure I'm not mistaking before reporting it to the Debian guys. Here is the bug they fixed: login: tty hijacking possible in "su" via ...


2

I don't think what you want is possible. See this superuser thread titled: How do I detach a process from Terminal, entirely?. I think you have essentially 3 options. Option #1 Run the scripts that are polluting you terminal such that they're run like so: nohup somescript &> /dev/null & Which should run their STDOUT & STDIN to ...


2

This is a bug in Sublime Text 2. Sublime remembers the last session and files that were opened after you exit the program by default. In some cases that is a good feature but for me and it seems as you as well it is not. So what happens is when you create the symbolic link so you can type "subl" in the terminal window Sublime text 2 will open the last ...


1

Put your terminal multiplexer (be it tmux, screen or something else) into your shell's initialization, but do not exec it (which one would probably do) - that will jump back into shell if anything goes wrong in the terminal multiplexer. To make it more user friendly, you can use the suggestion from comment by @EvanTeitelman and actually run multiplexer ...


3

blkid -d /dev/VOLUME /dev/VOLUME: UUID="97da23eb-542e-4f5f-9cc8-5108ee6a1f2e" TYPE="ext3" But with external disks: Mind the difference between disks and partitions: /dev/sdx vs. /dev/sdx1. It may be useful to check with fdisk -l /dev/sdx or cat /proc/partitions first.


0

You could copy the entry for user in /etc/passwd and change (a) the name from user to e.g. user_mod_shell, and (b) the default shell. The "who am i" chaos (probably without real problems) may be reduced by setting USER in the start processes.


0

In ~/.inputrc, there exists the following possibility, but it didn't do anything for me. It just rings the bell. This may be a bug in the Cygwin bash. set bell-style visible


0

AT&T Unix had sysline command, which provided a status line for terminals that don't have it in hardware. Maybe there is a GNU equivalent by now...


1

Xcode 4.3 moved make to /Applications/Xcode.app/Contents/Developer/usr/bin/make. You can install make to /usr/bin/ by downloading the command line tools package from Xcode's preferences or from developer.apple.com/downloads (which requires a free developer account but not Xcode). If make install results in an error like cp: directory /usr/local/bin does not ...


2

Get the source wget "http://www.sentex.net/~mwandel/jhead/jhead-2.97.tar.gz" Untar the source tar xzf jhead-2.97.tar.gz Or, get and untar the source in one step curl "http://www.sentex.net/~mwandel/jhead/jhead-2.97.tar.gz" | tar xz Now you have a directory called jhead-2.97. Enter that directory and run make. cd jhead-2.97 make This will compile ...


0

Have you ever thought about givin GNU screen a try? To be very honest i havent much experience with tmux, but screen always did the job nicely.


5

This changes the terminal title in GNOME Terminal 3.6.1, unless overridden by something like PS1: printf "\033]2;Script Kiddie was here\007" Now open a new GNOME Terminal window to test the cat version: printf "\033]2;Script Kiddie was here\007" > test.bin cat test.bin Yep, this also sets the terminal title. There used to be a security issue with ...


4

I have definitely experienced xterm inserting arbitrary characters into itself as if I had typed them. And on occasion this has apparently included newline character, so that I got ngwerm:0riu: command not found as a response. I see no reason why someone could not craft a file that would send specific, harmful commands. So yes, at least some terminals are ...


20

Most terminal emulators will send back some response, if they receive certain escape sequences (have a look at the xterm control sequences documentation). E.g., you can send \e[0c to a VT100-like emulator and it will send back the device attributes, something like \e[?1;2c (This is probably what Keith observed.) But these answers are not arbitrary strings. ...


3

Well, a terminal emulator basically simply prints out the characters set to it. Anything besides simply printing a character on the current position, like setting a new position, changing color, changing title, etc., is done by escape sequences. The set of supported escape sequences usually consists of well defined standards like ANSI, which does not ...


18

Whether such output can be exploited depends on the terminal program, and what that terminal does depending on escape codes that are being sent. I am not aware of terminal programs having such exploitable features, and the only problem now would be if there is an unknown buffer overflow or something like that, that could be exploited. With some older ...


0

Readline library has bell-style variable: Controls what happens when Readline wants to ring the terminal bell. If set to ‘none’, Readline never rings the bell. If set to ‘visible’, Readline uses a visible bell if one is available. If set to ‘audible’ (the default), Readline attempts to ring the terminal’s bell. So you can put into your ...


7

Depending on how the terminal is configured, typing Alt+Key is like typing the Esc and Key keys in sequence, so it sends the ESC character (aka \e or ^[ or \033) followed by the character or sequence of characters sent upon pressing that Key. Upon pressing Up, most terminal emulators send either the three characters \033[A or \033OA depending on whether ...


3

You can use Crtl+v to return input codes of your keyboard. If you do that for arrow keys, you will get [[D^, [[C^, [[A^, and [[B values. There aren't any default bindings for Alt+arrow keys, so it seems that performed action is printing letter code alone. Hovewer, if you create your local version of readline library configuration file: $ cp /etc/inputrc ...


5

I'm not aware of any way to disable the tab completion bell in bash (aside from disabling the bell entirely or changing it to the subjectively-more-annoying visual bell). You could try set show-all-if-ambiguous on in your ~/.inputrc - this makes the shell show the list of matching commands/items immediately when you hit tab instead of waiting for you to hit ...


2

There are no technical reason for it not to be possible. However there are not many reasons to why its not practical. With the limited amount of screen real-estate that characters represents on screen you would have a hard time finding use for more then 256 simultaneous colors on the screen. As far as I know terminal clients use indexed color space. One of ...


2

Depends what exactly you want to do. terminals have two major modes both of which can be fine tuned with extra settings: cooked/canonical mode. In that mode, the terminal comes with an internal line editor where the ^H (or ^?), ^W, ^U (or @), ^V (or \) characters can be used to edit the line. Nothing is sent to the application reading from the terminal ...



Top 50 recent answers are included