GNU screen ããããã¾ã¨ãã
å æ¥äººåæ¤ç´¢ã§ GNU screen ã®è¨å®TIPSã«ã¤ãã¦è³ªåãã¦ã¿ãã¨ãããããªã¼ãå½¹ç«ã¤è¨å®ã¨ããããããæãã¦ããããã¨ãã§ãã¾ãããã¿ãªããæè¬ã
ããã§ãæãã¦ããã ããéãã«ã«ã¹ã¿ãã¤ãºããçµæããããªæãã®ã¹ã¯ãªã¼ã³ã·ã§ãããæ®ãã¾ãããMacOSX ã®ã¿ã¼ããã«ã§ãã
ããããã¾ã§ããªã便å©ã«ãªã£ã¦ä½æ¥å¹çãä¸ãã£ãã¨æãã¾ããããããæãã¦ããã£ãã礼ã¨ã¾ã§ã¯ããã¾ãããããã£ãè¨å®ã¨ããã¯ã¾ãã©ããã¨ãã交ãã¦ç´¹ä»ãã¦ã¿ã¾ããåä»ãã¦ãªãã¼ã¹NDOã¡ã½ãããã¡ãªã¿ã«ãç¥ã£ã¦ã人ã«ã¯ããå½ç¶ã®ãã¨ãå½ããåã®ããã«æ¸ãã¦ãã®ã§ãããã¾ãå½¹ã«ç«ããªãããããã¾ããã
hardstatus alwayslastline ã§æçµè¡ã«ã¦ã£ã³ãã¦ä¸è¦§ã表示
ããã¯ä»åã®è³ªåã¨ã¯ç´æ¥é¢ä¿ãªãã®ã§ãããããã¨ãããªãã¨ã§ããªã使ãåæãéãã®ã§ã
hardstatus alwayslastline "%w"
ã¨ãããã¨ãã¹ã¯ãªã¼ã³ã·ã§ããã«ããéãæçµè¡ã«ãã®ã¨ãéãã¦ãã¦ã£ã³ãã¦ä¸è¦§ãåºã¾ããå®ã¯ãããªè¨å®ãããã¨ããã®ã«ãã°ããæ°ã¥ããªãã§ã¦ãç¥ã£ãã¨ãã¯ã·ã§ãã¯ã§ããã
è¨å®è¡ã®å¼æ°ã«ã¯è¡¨ç¤ºãã©ã¼ããããæå®ããããã§ããããããè²ã 工夫ããã¨ã¡ãã£ã¨è¦ãç®ããããããã¨ãã§ãã¾ãããã©ã¼ãããæ示è©ãããªãè¬ã§ç解ããã®ã«æéããããããã ã£ãã®ã§ãtypester ããã®è¨å®ããã®ã¾ã¾ä½¿ããã¦ããããã¨ã«ãã¾ãããæåæè¬ãæéãåºãããã¢ã¯ãã£ããªã¦ã£ã³ãã¦ãéã表示ããããã¨ããtypester ããã¯ããã¯ã°ã©ã¦ã³ãã§ã¹ã¯ãªãããå®è¡ãã¦æ°çã¡ã¼ã«ã¨ããæªèªãã£ã¼ãã®ä»¶æ°ã¨ãã表示ãã¦ãã¿ããã§ããããããã
hardstatus alwayslastline "[%02c] %`%-w%{=b bw}%n %t%{-}%+w"
zsh ã¨ä½µç¨ãã
ããã質åã®åçã¨ã¯é¢ä¿ãªãã®ã§ãããscreen ã使ãã¨ã㯠zsh ã使ãã¨è¯ãããªãã§ãã¨ããã¨ãzsh ã ã¨è¤æ°ã¦ã£ã³ãã¦ã«ã¾ããã£ã¦ãã³ãã³ãå±¥æ´ãå ±æã§ããã®ã§ãåã¯ã³ãã³ããæã¤ã¨ãã¯ã¾ã C-r ã§ã¤ã³ã¯ãªã¡ã³ã¿ã«æ¤ç´¢ã§æ¢ãã®ãæ¥å¸¸ã§ãã¦ããã®æ©è½ãç¸å½ããã¼ã«ä½¿ã£ã¦ã¾ããã§ããscreen ã使ã£ã¦ã¦ã£ã³ãã¦ãè¤æ°ã«åããããã«ãªãã¨å±¥æ´ãã°ãã°ãã«ãªã£ã¦å°ãã®ã§ãããzsh ãªããã®è¾ºæ©ã¾ãªãã¦è¯ãã¨ããç¹ãããã¾ãã
zsh ã®å±¥æ´ã®è©±ã¨ãã¯ãé«æããã®è¨äºå±¥æ´ããã¢ã«è©³ããæ¸ãã¦ã¾ãã
ã¹ãã¼ã¿ã¹ã©ã¤ã³ã«åã¦ã£ã³ãã¦ã§æã£ãã³ãã³ãã表示
質åã®åçã§æåã«æãã¦ããã£ãã®ããã®è¨å®ãzsh ãå¿ è¦ã§ããã¹ã¯ãªã¼ã³ã·ã§ããã§ã¯åã¦ã£ã³ãã¦ã®ååã mysql ã¨ã server.pl ã¨ãã«ãªã£ã¦ã¾ãããããã¯èªåã§ä»ããååã§ã¯ãªãã¦ããã®ã¦ã£ã³ãã¦ã§æå¾ã«æã£ãã³ãã³ãåã表示ããã¦ã¾ãããã perldoc éãã£ã±ãªãã¨ã mysql ã¯ã©ã¤ã¢ã³ãç«ã¡ä¸ãã£ã±ãªãã¨ã tail -f ãã£ã±ãªãã¨ãã«ãã¦ä»ã®ã¦ã£ã³ãã¦ã§ä½æ¥ãã¦ã¯ããã«æ»ã£ã¦ç¢ºèªã¿ãããªãã¨ããã¾ãããããããã¨ãã«ã¦ã£ã³ãã¦åã "zsh" ã¨ãã ã¨ããããã©ãã ã£ããã¿ãããªè©±ã«ãªããã§ããããã®æ¹æ³ã§ãã¹ã¦è§£æ±º!
ãã㯠id:secondlife æ°ã«æãã¦ãããã¾ãããæè¬ã
è¨å®æ¹æ³ã¨ã㯠ari's diary ã® 2002å¹´6æ14æ¥ã®è¨äºã«ããã¾ãã
ã¡ãªã¿ã«ãã®è¨äºã®ä¸ã§ãzshrc ã«è¨è¿°ããã¹ã¯ãªãããåºã¦ãã¾ãããæåãããã¾ãã¾ã³ãã¼ãã¦åããªãã¦ä¸ç¬ã¯ã¾ãã¾ããã
^[k
ã¨ããªã£ã¦ãã¨ããã® ^[ ããå¶å¾¡æåã§ãã¦ããã®ã¾ã¾ãã¼ã¹ãã ã¨æååã¨ãã¦èªèããã¡ããã¨ãããvi ã¨ãã 㨠Insert mode ã®ã¨ãã« Ctrl + v ã㦠Escape ãæ¼ãã¨å ¥åã§ãã¾ããEmacs ã¯ã©ãã ã£ãããªãEmacs 㧠rc ã¨ãããããªãã®ã§ç¥ããªãã
ã¦ã£ã³ãã¦åå²ã Emacs ã©ã¤ã¯ãªãã¼ãã¤ã³ãã§æä½ã§ããããã«ãã
id:stealthinu ããã«æãã¦ããã£ãæãscreen ã«ã¯ã¦ã£ã³ãã¦åå²ã®æ©è½ãããã¾ããä¸ä¸ã«ã¦ã£ã³ãã¦ãåå²ãã¦ããããã«ç°ãªãã¦ã£ã³ãã¦ã表示ãããããããã¨ãã§ãã¦ãEmacs ã使ã£ã¦ã人ã«ã¯ç¹ã«æ¶ãã¡ãã¡ãããããããªæ©è½ã§ãããã®åé¢ãEmacs 使ã£ã¦ã人ã«ã¨ã£ã¦ã¯ãã¼ãã¤ã³ãã¯é¬¼éã§ãã«ã¼ã½ã«ç§»åã«æãã C-x o ã¨ãééã£ã¦æã£ã¦ãã¾ãçããã£ãããã¾ãã
ããããscreen å´ã Emacs ã®ãããªãã¼ãã¤ã³ãã«ãã¦ãã¾ã! ã¨ããã®ããã®è¨å®ã§ãã
bind 2 split bind o focus bind 1 only bind 0 remove
ã¨ããã®ã screenrc ã«æ¸ãã¨ã
ãã ããã®ãã¼ãã¤ã³ãä¸æ¸ãã ã¨ãããã©ã«ãã®ã¦ã£ã³ãã¦åãæ¿ãã³ãã³ããä¸æ¸ãã¦ãã¾ãã¨ããç½ ãããã®ã§ã
bind -c REGION 2 split bind -c REGION 1 only bind -c REGION 0 remove bind -c REGION o focus bind -c REGION \^ resize bind x command -c REGION
ã¨ãã¦ã¾ããC-t x 2 ã¨ããã¼ãã¤ã³ãã«ãªã£ã¡ããã¾ãããã¾ã Emacs ã¨ããªãä¼¼ã¦ãã®ã§ããã§ååæã«ãªãã¿ã¾ããå¾è ã®è©±ã¯ http://subtech.g.hatena.ne.jp/secondlife/20051216/1134741917 ããããã ãã¾ããã
æ¾ç½®ãã¦ãã¨ã¹ã¿ã¼ã¦ã©ã¼ãºã®åå°è©ã!
idle 3600
ã¨ãããã¨ã3600 ç§æä½ããªã㨠screen blanker (ã¹ã¯ãªã¼ã³ã»ã¼ãã¼ã¿ãããªãã) ãèµ·åãã㨠id:shigeno ããããæããã¾ãããã¾ã blankerprg ã§ãscreen blanker èµ·åæã«å¥½ã¿ã®ããã°ã©ã ãè¨å®ã§ããã¨ãããã¨ã§ãfortune ãã»ããããä¾ãæãã¦ããã ãã¾ããã
fortune ã¨ããã®ã¯ UNIX ã«ãããã¸ã§ã¼ã¯ããã°ã©ã ã§ãfortune ã³ãã³ããå®è¡ãã度ã«ã³ã³ãã¥ã¼ã¿ãµã¤ã¨ã³ã¹ã«é¢ããã¸ã§ã¼ã¯ã表示ãã¦ãããããã代ç©ã§ãã大å¦ã®ç 究室ã®ãã·ã³ã¯ããã°ã¤ã³ããã¨æ ¼è¨ããã¤ã表示ããã¦ããã ãã©ããã㯠fortune ãå®è¡ãã¦å®ç¾ããã¦ã¾ããã
ãã® fortune ã«ã¯ã表示ããã¡ãã»ã¼ã¸ã®ãã¼ã¿ã«å¥½ããªç©ãè¨å®ãããã¨ãã§ãã¾ããåå°è©ã¨ããã°ãã£ã±ãã¹ã¿ã¼ã¦ã©ã¼ãºã ãã£ã¦ãã¨ã§ http://sourceforge.net/projects/elkware/ ãã fortune ç¨ã®ã¹ã¿ã¼ã¦ã©ã¼ãºåå°è©ãã¼ã¿ãè²°ã£ã¦ãã¦ãããã使ãããã«è¨å®ãã¦ã¿ã¾ãããMacOSX ç¨ã® fortune ã³ãã³ã㯠Google ã§èª¿ã¹ãã¨ãã http://dsandler.org/soft/macosx/message.php ãè¦ã¤ããã¾ãã¦ããããã FreeBSD fortune ã®ããã±ã¼ã¸ãããã ãã¦ã¤ã³ã¹ãã¼ã«ãã¾ããã
screenrc ã«ã¯
idle 1200 blankerprg /usr/bin/fortune starwars
ã¨æ¸ãã¦ã¾ãã
ãã°ããæä½ããªãã¨ç»é¢ããã©ã³ã¯ã«ãªã£ã¦
Ben (Obi-Wan) Kenobi: Use the Force, Luke!
ã¨ãã
Darth Vader: There is no escape. Don't make me destroy you. pauses Luke, you do not yet realize your importance. You have only begun to discover your power. Join me, and I will complete your training. With our combined strength, we can end this destructive conflict and bring order to the galaxy. Luke Skywalker: I'll never join you! Darth Vader: If you only knew the *power* of the dark side. Obi-wan never told you what happened to your father. Luke Skywalker: He told me enough! He told me *you* killed him. Darth Vader: No. *I* am your father.
ã¨ã表示ããã¾ãããã³ãã!
ãã®ä»
ããã§ç´¹ä»ãã以å¤ã«ã
- ã¦ã£ã³ãã¦æ¯ã«ãã°ãåãæ¹æ³ (id:babie ãã)
- ã¦ã£ã³ãã¦ãã¨ã«æåã¨ã³ã³ã¼ããå¤ããæ¹æ³ (id:typester ãã)
- screen ã®ãã¼ãã¤ã³ãã§ä»»æã®ã³ãã³ããå®è¡ããæ¹æ³ (id:teny ãã)
- ããã¸ã§ã¯ãæ¯ã« screenrc ãç¨æããæ¹æ³ (id:jestersera ãã)
- å±¥æ´ãããã¡ã®è¡æ°ãå¢ããè¨å® (id:rehash ãã)
- screen 㧠CGI ããããã°ãã試㿠(id:teny ãã)
ãªã©ãåçã«ããã ãã¾ãããå ¨é¨ç´¹ä»ããã¤ããã ã£ããã©æ¸ãã¦ããç²ãã¦ãã¾ã£ããããããªããï½
ãããã«ãã¾ã
ãã㯠id:hideoki ããæãã¦ããã£ããã®ãzshrc ã¨ãã«
function ssh_screen(){ eval server=?${$#} screen -t $server ssh "$@" } if [ x$TERM = xscreen ]; then alias ssh=ssh_screen fi
ã¨æ¸ãã¦ããã¨*1ãssh ããã¨ãã«æ°ããã¦ã£ã³ãã¦ãéãã¦ãã㧠ssh ãã¦ãã¦ã£ã³ãã¦åããã°ã¤ã³å ã®ãã¹ãåã«èªåçã«åä»ãã¦ããã¾ãã便å©ã
æãåº
æãè¿ãã°å¦çã®ãããã¹ã¼ãã¼ãã«ã¼ãªã¨ããé»æ°é»åå¦ç§ã®ææã®ã¢ãã¿ãå¾ãããè¦ã¦ãããªããã¦ã£ã³ãã¦ããã¼ãã¼ãã§åãæ¿ãã¾ãã£ã¦ãããæä½ãã¦ã¦ãããã©ããã£ã¦ãã ãããªã¼ã£ã¦æã£ããã¨ãããã¾ããããscreen 使ã£ã¦ããã ãªãã£ã¦ãããå¾ã«ãªã£ã¦ç¥ã£ãã¨ããããããªãã¨ãæãåºãã¾ããããã®ææ㯠Perl 㨠Emacs ã®ããã¼ã¦ã¼ã¶ã¼ã§ããã¨åã®ç 究室ã®ææããããªæãã§ãç´æ¥æãã¦ããã£ããã¨ã¯ãªãã£ããã©ãããã人ã®ã¢ãã¿ã¨ãæéµã横ã§è¦ã¦ã¯é©ãã¤ã¤çä¼¼ãã¦ãã¨ããã®ãããã¾ããå¤ã®éå ·ã«ã¯ãã©ã¼ã¹ã宿ã£ã¦ããã§ããã©ã¼ã¹ã¯ç解ãããã§ã¯ãªãæãããã®ãªãã§ãã! May the force be with you, always!