xauth
ssh -XWarning: No xauth data; using fake authentication data for X11 forwarding.
不存在xauth命令
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
xauth命令出错
X server 没有启动
start a new screen session: screen
.. with session name: screen -S
attach to a running session: screen -r
.. to session with name: screen -r
the “ultimate attach”: screen -dRR (Attaches to a screen session. If the session is attached elsewhere, detaches that other display. If no session exists, creates one. If multiple sessions exist, uses the first one.)
All screen commands are prefixed by an escape key, by default C-a (that's Control-a, sometimes written ^A). To send a literal C-a to the programs in screen, use C-a a.
detach: C-a d
detach and logout (quick exit): C-a D D
exit screen: exit all of the programs in screen.
force-exit screen: C-a C-\ (not recommended)
See help: C-a ? (lists keybindings)
create new window: C-a c
change to last-visited active window: C-a C-a (commonly used to flip-flop between two windows)
change to window by number: C-a (only for windows 0 to 9)
change to window by number or name: C-a '
change to next window in list: C-a n or C-a
change to previous window in list: C-a p
see window list: C-a ” (allows you to select a window to change to)
show window bar C-a w (if you don't have window bar)
close current window: Close all applications in the current window (including shell)
kill current window: C-a k (not recommended)
rename current window: C-a A
split display: C-a S
jump to next display region: C-a tab
remove current region: C-a X
remove all regions but the current one: C-a Q
C-a C-lC-a [ (also used for viewing scrollback buffer)C-a ]C-a MC-a _C-a C-vC-a xC-a :
#termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'
termcapinfo xterm 'hs:ts=\E]0;:fs=\007:ds=\E]0;bash\007'
caption always "%{= bk} %{= wk} %-Lw%{by}%n+%f %t%{wk}%{wk}%+Lw %=%{kw}%{= R}%{-}"
shelltitle '$ |bash'
defhstatus "\005t"
hardstatus on
另外需要設定 shell 的 prompt
PS1="\033k\033\\\\\\W\\$ "; export PS1
這是 screen 偵測執行中程式,所使用的提示字串。 screen 靠這個字串,判斷 shell 正在接受使用者的 command 。
Reference
%[flags][width][.precision][length]specifierWhere specifier is the most significant one and defines the type and the interpretation of the value of the coresponding argument:
| specifier | Output | Example |
|---|---|---|
| c | Character | a |
| d or i | Signed decimal integer | 392 |
| e | Scientific notation (mantise/exponent) using e character | 3.9265e+2 |
| E | Scientific notation (mantise/exponent) using E character | 3.9265E+2 |
| f | Decimal floating point | 392.65 |
| g | Use the shorter of %e or %f | 392.65 |
| G | Use the shorter of %E or %f | 392.65 |
| o | Signed octal | 610 |
| s | String of characters | sample |
| u | Unsigned decimal integer | 7235 |
| x | Unsigned hexadecimal integer | 7fa |
| X | Unsigned hexadecimal integer (capital letters) | 7FA |
| p | Pointer address | B800:0000 |
| n | Nothing printed. The argument must be a pointer to a signed int, where the number of characters written so far is stored. | |
| % | A % followed by another % character will write % to the string. |
| flags | description |
|---|---|
| - | Left-justify within the given field width; Right justification is the default (see width sub-specifier). |
| + | Forces to preceed the result with a plus or minus sign (+ or -) even for positive numbers. By default, only negative numbers are preceded with a - sign. |
| (space) | If no sign is going to be written, a blank space is inserted before the value. |
| # | Used with o, x or X specifiers the value is preceeded with 0, 0x or 0X respectively for values different than zero. Used with e, E and f, it forces the written output to contain a decimal point even if no digits would follow. By default, if no digits follow, no decimal point is written. Used with g or G the result is the same as with e or E but trailing zeros are not removed. |
| 0 | Left-pads the number with zeroes (0) instead of spaces, where padding is specified (see width sub-specifier). |
| width | description |
|---|---|
| (number) | Minimum number of characters to be printed. If the value to be printed is shorter than this number, the result is padded with blank spaces. The value is not truncated even if the result is larger. |
| * | The width is not specified in the format string, but as an additional integer value argument preceding the argument that has to be formatted. |
| .precision | description |
|---|---|
| .number | For integer specifiers (d, i, o, u, x, X): precision specifies the minimum number of digits to be written. If the value to be written is shorter than this number, the result is padded with leading zeros. The value is not truncated even if the result is longer. A precision of 0 means that no character is written for the value 0. For e, E and f specifiers: this is the number of digits to be printed after the decimal point. For g and G specifiers: This is the maximum number of significant digits to be printed. For s: this is the maximum number of characters to be printed. By default all characters are printed until the ending null character is encountered. For c type: it has no effect. When no precision is specified, the default is 1. If the period is specified without an explicit value for precision, 0 is assumed. |
| .* | The precision is not specified in the format string, but as an additional integer value argument preceding the argument that has to be formatted. |
| length | description |
|---|---|
| h | The argument is interpreted as a short int or unsigned short int (only applies to integer specifiers: i, d, o, u, x and X). |
| l | The argument is interpreted as a long int or unsigned long int for integer specifiers (i, d, o, u, x and X), and as a wide character or wide character string for specifiers c and s. |
| L | The argument is interpreted as a long double (only applies to floating point specifiers: e, E, f, g and G). |
terminal & console
表情符号
优化Linux的内核参数来提高服务器并发处理能力
Reverse Engineering Tools in Linux – strings, nm, ltrace, strace, LD_PRELOAD
HTML5 Custom Data Attributes (data-*)
Top 20 Nginx WebServer Best Security Practices
awk详解
在fedora10下面打开telnet服务
How to: Compile Linux kernel modules
GCC and Make Compiling, Linking and Building C/C++ Applications