Tag Info

Hot answers tagged

6

The indexed color palette has the actual rendering open to interpretation - on actual hardware, there were different standards (especially brown vs. dark yellow, brown is more useful and nicer to look at). Just check out this: https://en.wikipedia.org/wiki/Color_Graphics_Adapter On terminal emulators, it depends on the configuration. Most emulators have a ...


5

This isn't as easy as it sounds to change. It's related to the terminal cooked vs. raw mode and whether echo is enabled or not. When the terminal is in cooked mode (the default), the kernel reads everything that comes in as input and processes it using rudimentary line editing capabilities which include echoing normal text immediately, processing the erase ...


4

People usually want to see what they're typing (unless it's a password) :-) The terminal accepts input at any time, and buffers it until an application reads it. More than that, when the tty is in cooked mode, the kernel buffers whole lines at a time and provides some rudimentary line editing functionality that allow you to kill the entire buffered line ...


4

As mikeserv explains, POSIX doesn't specify tput cup. POSIX does specify tput but only minimally. That said, tput cup is widely supported! The standardised way of positioning the cursor is using ANSI escape sequences. To position the cursor you'd use something like printf "\33[%d;%dH%s" "$Y" "$X" "$CHAR" which will print $CHAR at line $Y and column $X. A ...


4

As explained in man ssh: -t         Force pseudo-tty allocation. This can be used to execute arbi‐           trary screen-based programs on a remote machine, which can be           very ...


4

How this command exactly works step by step ? Recursively. rm will not delete a directory if its not empty. For that reason, it will first recurse into it, and delete its contents ("regular" files). This means that the unlinking process starts at the deepest level in your directory hierarchy, and goes up removing directories once they've been emptied. I ...


4

The telnet protocol, described in RFC 854, includes a way to send in-band commands, consisting of the IAC character, '\255', followed by several more bytes. These commands can do things like send an interrupt to the remote, but typically they're used to send options. A detailed look at an exchange that sends the terminal type option can be found in ...


4

If you use Urxvt, you can extend the keyboard functionality of the terminal using urxvt-perls, a collection of scripts that enables: selecting text passing URLs to your $browser searching your scrollback and yanking and pasting to and from your clipboard Essentially, with urxvt-perls installed, you can dispense with your mouse entirely.


4

Add the --batch option. If you would like to achieve the same result through redirection you would have to close STDIN through: gpg … <&-


4

The "problem" is, that gpg writes directly to the TTY instead of STDOUT or STDERR. That means it cannot be redirected. You can either use the --batch option as daniel suggested, but as a more general approach you can use the script tool, which fakes a TTY. Any output is then sent to STDOUT, so you can redirect it to /dev/null: script -c 'echo ...


3

Interesting, I also thought of screen -x or tmux attach like Celada's solution, but I would prefer setting up init (in /etc/inittab or /etc/init or /etc/systemd) or supervisor to automatically launch a getty-on-screen session on boot. Working configuration for supervisor: [program:screen] command=bash -c 'chvt 9 && TERM=linux exec screen getty tty ...


3

I'm not sure whether there might be a more "direct" solution involving only redirecting inputs and outputs, but I did manage to make something like this work using screen. The idea is to do all your work inside a screen session and attach twice to the session, once from your working SSH terminal and once from the attached display. First, you will need to ...


2

Your second problem seems to be an issue with tmux and the evaluation of certain AppleScripts through osascript. There's a wrapper you can install which should fix the problem. You'll want to install reattach-to-user-namespace through Homebrew or MacPorts and wrap the call to osascript: reattach-to-user-namespace osascript -e 'display notification "Hello, ...


2

It seems like the -o flag will take the actual column name. So if the top command shows only "mem" then the command should be "top -o mem". For the ubuntu machine I am testing with, the column is called "%MEM". On the OSX Yosemite I tried, it is "mem".


2

If you have xterm installed on the pi it should have included the luit terminal UTF-8 application - which is a little program which is often used to translate for other types of terminal applications that are not UTF-8 aware. luit works by allocating a pseudo-terminal - in much the way screen does but with a lot less overhead. One thing luit can do very ...


2

There is a "Reset" toolbar command to the right of compile. That will stop the running program in Dr. Java.


2

As i mentioned in the comments normaly you can easily select the text to copy the text and paste it with the third mouse button. The third button is the middle button, if you have no middle button use both buttons. But if you wish to use the shortcuts and you use xterm with awesome, than you can adjust your .Xresource file in your home directory. Add this ...


2

I wrote a little C program to print three lines of bricks across the terminal for this purpose. Not empty space, but it helps give visual separation in the same way, and stands out in verbose output that might have a bunch of vertical space. Swap out your favorite character to taste: #include <termios.h> #include <sys/ioctl.h> #include ...


2

users counts login sessions. From sudo: The su command is used to become another user during a login session. (Emphasis is mine.) A login session creates a new tty, where as su uses the existing tty. I just looked at the source code to the users command. What it does is read utmp. So I guess the bottom line is that if you write a program and write ...


2

There are a few options that spring to mind Spacer lines: sl() { yes '' | head -"${1:-5}"; } # Use as "sl 10" or "sl" Pipe the output of your make through a pager: make {whatever} 2>&1 | less Run the entire session under screen. You can then Ctrl AEsc and scroll up through the buffer a page at a time using Ctrl B. Use ReturnReturn to exit ...


2

With zsh, if you want to disable tty device local echo for a specific command, you can do: STTY=-echo a-specific-command zsh will apply the specific settings (by calling stty) and restore them when the command terminates. Of course, you'll probably only want to do that for applications that don't read from the tty device.


2

It depends on your terminal. If this is something important to you, you could consider Emacs term-mode which gives you the full text-manipulation capability of the editing environment. It's possible that you consider that to be overkill, of course!


2

This has nothing to do with bash, it is purely an effect of the terminal's behavior, specifically scroll. When you reach the bottom of the screen, and start to type on the next line, the terminal creates a new blank line by pushing everything up one line. (In older terminals this destroys the top line. In newer terminals the top line is just pushed into the ...


1

I have alias five='echo -e "\n\n\n\n"' for that, you can further shorten the alias to your liking of course.


1

Another approach could be to have some unique text in your prompt (I use $ followed by a non-breaking space (PS1=$'$\ua0')). And configure your terminal emulator to scroll-back to it upon some key press. For instance, with GNU screen, in ~/.screenrc: defscrollback 5000 bindkey \033` eval copy "stuff k?$\240\r" Would map that to Alt+Backtick


1

You can use clear multiple times (clear;clear) or just hold down Ctrl+L until you satisfy! With zsh, you can try (fun with repeat):- repeat 5 clear repeat 20 echo repeat 50 printf '\n' And of-course you may want to alias goaway='repeat 7 clear'.


1

I trust you already have enough ways to abbreviate echo -e "\n\n\n\n\n\n", so I won't add to that. But you have another option: Many terminal emulators support searching, so you can go to the start of the last command by searching backwards for some part of your prompt. (Or for some known string in the output, but the prompt is always there.) TBH I usually ...


1

About CJK input without X. You must first enable the display of multi-byte characters on the console. Maybe it would be possible in fbterm. To I guess(I do not have the experience of Chinese input), Chinese input might be possible in the uim + uim-fep + uim-chewing. Alternatively, you can use the extension of the editor (emacs, vim).


1

I can answer part of my own question: Yes, one can start X from within the chroot'ed environment. I just found the following gentoo wiki page: http://www.gentoo-wiki.info/HOWTO_startx_in_a_chroot So now I know it's theoretically possible. So if I manage to run KDE from the chroot'ed system, I'd be able to test Chinese input further... Also, this answer ...


1

Try to run gnome-terminal -x sh or gnome-terminal -e bash (from xterm or directly as command by Alt+F2) and you will get gnome-terminal with sh/bash. Then after Go to: Profiles > Profile Preferences > Command > Custom command (where you've set export TERM=xterm-256color) and make correction Hope this helps.



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