piyo's computer tips
How to use screen part 3
Linux
Okay, I think I got the definition of screen wrong. It should be, the terminal multiplexer. Ha.
I figured out how to really set screen main control character:
# screen's shortcut entry character, cannot be set to ^Q
escape "^T^T"
And since I wanted to make the interface a little more familiar to my emacs-ways, I worked on some key redefinitions.
# make the interface like emacs
bind "x" command -c emacsx
bind "^X" command -c emacsx
bind -c emacsx "1" only
bind -c emacsx "2" split
bind -c emacsx "o" focus
bind -c emacsx "b" windowlist
# make the interface like windows
bind "c" copy
bind "^C" copy
bind "n" screen
bind "^n" screen
bind "v" paste .
bind "^v" paste .
bind "V" digraph
And what is a terminal without some color? This sets the status mode line to different colors depending on if it has the focus.
# Set the caption to something interseting
# dark gray with (active) white / (inactive) light gray
caption always "%{= Kw}%?%F%{..I}%:%{..i}%?%3n %t%? @%u%?%? %?%=%l %d%D%c "
Lastly, I love having a lot of history. I haven't yet hit a hard limit on memory usage. This setting below helps with scrollback selections as well.
# Save scroll history way way back
defscrollback 10000
Heck, I have a 20000 line history file for zsh. Maybe I should lower it.... Nah.
How to use screen part 2
Linux
Screen is your emacs-like interface for remote terminal sessions. Somewhat.
However it uses the Control-A character as command. I frequently use minicom, which also uses the Control-A character. so I needed to remap it to Control-T. So this is what you put in ~/.screenrc :
# ^T instead of ^A as screen control character
bindkey -d "^T" command
bindkey -d "^A" meta
# ^a should act like
bind "^a" meta
Speaking of keys, here are some useful ones (using the above command prefix):
Control-T SPACE = next window
Control-T S = split window
Control-T Q = hide other windows
Control-T TAB = next split window
Control-T : = screen command line control
Also you may want to change the status information. I haven't yet found a way to let the window title prompts set by my zsh process pass through the screen's prompt settings... but this is a start.
#caption always "%{= bB} %3n %t%? @%u%?%? [%h]%?%=%c"
caption always "%{= bB}%?%F%{C} %3n %t%? @%u%?%? [%h]%?%=%c"
hardstatus on
hardstatus string ""
My favorite windows apps, part 1
Windows
This recent
thread has prompted me to list all the Windows apps I feel is useful. I carry a Smart Media USB card reader with about 60 MB worth of useful utilities:
Archive/Decompress: Lhaplus [JP, Freeware] Seamless Windows Explorer integration, can decompress almost all popular formats except .rar, does not require any additional DLLs to function.
Audio: Winamp [EN, Freeware] with Japanese localization kit [JP, Freeware]
Graphics: Irfanview [EN, Freeware non-commercial] with Japanese localization kit
Hard Drive Utility: Deluxe System Commander [EN, Commercial]
Keyboard: Winkey [EN, Freeware non-commercial]
Network Diagnostics: Ethereal [EN, Freeware]
Serial terminal program: Teraterm [JP/EN, Freeware]
Programming: WinDiff [EN, Freeware]
Time/Tray Display: TClock [JP/EN, Freeware]
Utility/Tweaking: Button Boogie [EN, Freeware] Lets you move the program buttons on the start bar.
Utility/Tweaking: Copy Path Context Menu [EN, Freeware] Windows Explorer integrated tool that opies the currently selected file's path to the clipboard.
Utility/Tweaking: TweakUI [EN, Freeware]
Utility/Tweaking: Shortcut Target Menu [EN, Freeware] Opens a shortcut's parent window.
Other stuff I use regularly but I don't need to bring with me:
Internet Browser: Sleipnir [JP/EN, Freeware] Internet Explorer-based browser. Hierarchical Tabs, internet search on selected string
Internet Browser/Editor: Mozilla [EN, Freeware]
Download utility: GetRight [EN, Shareware]
Linux: How to use screen
Screen helps you create "detachable views" of processes on your linux box.
For example, create a server process, such as top, as a detachable view:
screen -A -m -d -S top top
The bold part is standard options for creating a detachable view that will run automatically in the background. Now you can log out and back in, and see that it is still running:
screen -r top
What about listing which screens you are running? Just don't type anything after
-r
or if you really want to get pedantic:
screen -list
src:
Windows that follow you
src:
http://server.counter-strike.net/server.php?cmd=howto&show=screen
Windows: Postscript and ps2pdf
GhostScript, GhostView is the PS viewer.
And
ps2pdf allows you to use the slick Adobe Acrobat 6 on your PostScript files. Here's some
usage
Bash: checking if scripts have a syntax error
To check if a bash script is free of syntax errors, call the script with a -n option.
bash -n there_is_no_error_here.sh
How I keep remembering new ways of using computers. My (computer-centric) new-optimization learning blog.