|
Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
#######
#
# E-scripts on GNU Screen.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
# An introduction to eev can be found here:
#
# (find-eev-quick-intro)
# http://angg.twu.net/eev-intros/find-eev-quick-intro.html
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/console.e>
# or at <http://angg.twu.net/e/console.e.html>.
# See also <http://angg.twu.net/emacs.html>,
# <http://angg.twu.net/.emacs[.html]>,
# <http://angg.twu.net/.zshrc[.html]>,
# <http://angg.twu.net/escripts.html>,
# and <http://angg.twu.net/>.
#
#######
# «.screen» (to "screen")
# «.screen_demo_eeg2» (to "screen_demo_eeg2")
# «.screen-src» (to "screen-src")
# «.screen-src-gdbk» (to "screen-src-gdbk")
#####
#
# screen
# 2000jul15
#
#####
# «screen» (to ".screen")
# (find-status "screen")
# (find-vldifile "screen.list")
# (find-udfile "screen/")
# (find-udfile "screen/README")
# (find-udfile "screen/README.Debian")
# (find-node "(screen)Top")
# (find-node "(screen)Getting Started" "C-a ?")
# (find-node "(screen)Screen Command")
# (find-node "(screen)Default Key Bindings")
# (find-vldifile "screen.list")
# (find-fline "/usr/doc/screen/")
#*
zcatinfo /usr/share/info/screen > /tmp/screen.info
# (find-fline "/tmp/screen.info")
#*
# «screen_demo_eeg2» (to ".screen_demo_eeg2")
# (find-node "(screen)Screen Command" "`C-a c'")
# (find-node "(screen)Split" "`C-a S'")
# (find-node "(screen)Focus" "`C-a <Tab>'")
# (find-node "(screen)Redisplay" "`C-a l'")
# (find-node "(screen)Bell" "`C-a C-g'")
# (find-angg "EXPECT/eeg2")
#*
cat > $EEG <<'---'
Tcl: ac " " ^AS^A^I^Ac ^A^I
echo hello
echo hi
Tcl: a {message "An EEG-message!! Time to redraw the screen..."}
Tcl: ac ^Al ^A^I
echo -e '\a'
Tcl: ac ^A^G {^[[A} ^M ^A\\ y
---
eeg2 -c 'allowtcl; puts [join $lines "\n"]; exit'
echo "we're still on the shell; press enter, then many \`M-l's..."; read
eeg2 -c 'allowtcl' screen
# Eeg2 done.
#*
# (find-node "(screen)Bind Examples")
# (find-node "(screen)Colon")
# (find-node "(screen)Screen Command")
# (find-fline "/tmp/screen.info")
cat > $EEG <<'---'
Tcl: set tcl_prefix ""
in_screen
---
# unfinished
# Obfuscated tetris:
#*
# (find-fline "/usr/doc/screen/terminfo/")
cd /tmp/
gzip -cd < /usr/doc/screen/terminfo/tetris.c.gz > tetris.c
cat /tmp/tetris.c \
| indent \
> /tmp/tetris-ind.c
gcc -o tetris tetris.c
#*
/tmp/tetris
#*
# (find-fline "/tmp/" "tetris")
#####
#
# screen source
# 2001jun13
#
#####
# «screen-src» (to ".screen-src")
#*
pdsc $SDEBIAN/pool/main/s/screen/screen_3.9.9-2.dsc
cd /usr/src/screen-3.9.9/
find * | sort > .files
find * | grep '\.[ch]$' .files | sort > .files.ch
etags $(<.files.ch)
cp -iv comm.c comm.c.orig
cp -iv process.c process.c.orig
# (find-screenfile "comm.c")
patch -p0 comm.c <<'%%%'
172a173
> { "hackishkill", NEED_FORE|ARGS_2 },
%%%
# (find-screenfile "process.c" "case RC_KILL:")
patch -p0 process.c <<'%%%'
967a968,974
> case RC_HACKISHKILL: {
> /* edrx */
> int w_kill = atoi(args[0]),
> w_select = atoi(args[1]);
> Msg(0, "hackishkill: %d %d", w_kill, w_select);
> break;
> }
%%%
# (find-screenfile "process.c" "case RC_SELECT:")
# (find-screenfile "process.c" "case RC_HEIGHT:")
# (find-node "(screen)Window Size")
# (find-node "(libc)Parsing of Integers" "int atoi")
# (find-node "(diff)Detailed Normal")
#*
cd /usr/src/screen-3.9.9/
if [[ ! -e screen ]]
then debian/rules binary |& tee odrb
else make CFLAGS='-O2 -g -Wall -DUSE_PAM' |& tee om
fi
# dpkg -i /usr/src/screen_3.9.9-2_i386.deb
# (find-screenfile "odrb")
# (find-screenfile "comm.sh")
# (find-screenfile "comm.h" "RC_HACKISHKILL")
# (find-screenfile "process.c" "case RC_KILL")
#*
cd /usr/src/screen-3.9.9/
agrep -i debug $(<.files ) | sort | l -S
#*
# (find-es "emacs" "emacs21-gdb_1")
cat > $EEG <<'---'
Tcl: set tcl_prefix ""
proc prog {} { return /usr/src/screen-3.9.9/screen }
in_screen
puts hello
l {# window 0}
k C-a : s c r e e n spc 9 spc z s h ret
l {# window 9}
msg "Running the gnudoits now."
# (find-angg "EXPECT/eeg3" "k")
append_action {
catch {exec gnudoit "(find-es \"console\" \"screen-src-gdbk\")"}
catch {exec gnudoit "(gdbk-gdb t \"[prog] [exec pidof SCREEN]\")"}
send_user [yrstr {
I have just invoked the gnudoits.
Wait a bit to let the gdb attach and type another M-l to send the next keys.
}]}
k C-a w
# k C-d
# k C-d
---
eeg3 /usr/src/screen-3.9.9/screen zsh
#*
# «screen-src-gdbk» (to ".screen-src-gdbk")
# (find-screenfile "process.c")
br DoAction
br ShowWindows
br DisplaySleep
# br process.c:903
cont
#*
# (code-c-d "screen" "/usr/src/screen-3.9.9/")
# (find-screentag "pause")
# (find-screenfile "")
# (find-screenfile ".files")
# (find-screenfile "comm.c" "\"kill\"")
# (find-screenfile "comm.h" "RC_ACLADD")
# (find-screenfile "process.c")
# (find-screenfile "process.c" "case RC_KILL")
# (find-screentag "KillWindow")
# (find-screenfile "odrb")
# (find-screenfile "sched.c" "if (select(FD_SETSIZE")
# (find-screenfile "screen.c" "if (select(FD_SETSIZE")
# (find-screenfile "odrb")
# (find-node "(screen)Debug")
gnudoit '(find-es "emacs" "emacs21-gdb_1")'
GNUCLIENT=no exec expect -c '
spawn [set f /usr/src/emacs-21.0.93/src/emacs] -nw $env(HOME)/CRIM/014ideas
interact "\033g" {catch {exec gnudoit "(gdbk-gdb nil \"$f [exp_pid]\")"}}
http://www.xs4all.nl/~hanb/configs/dot-screenrc
#####
#
# multi-user (thanks to Igor Morgado)
# 2004nov19
#
#####
# (find-node "(screen)Multiuser Session")
ssh://edrx:mypassword@numenor.gtech.com.br
ssh edrx@numenor.gtech.com.br
password
screen
CTRL+a :multiuser on
CTRL+a :acladd igor
CTRL+a :chacl igor +w "#"
ate' pode retirar o usuario edrx depois se preferir
mude a senha tao logo logar
#####
#
# dagbrown's .screenrc (pasted into the pastebot)
# 2005feb09
#
#####
startup_message off
unsetenv DISPLAY
escape ^Ee
deflogin off
defscrollback 1024
nethack on
password *AHEM*
bindkey -k k0 select 0
bindkey -k k1 select 1
bindkey -k k2 select 2
bindkey -k k3 select 3
bindkey -k k4 select 4
bindkey -k k5 select 5
bindkey -k k6 select 6
bindkey -k k7 select 7
bindkey -k k8 select 8
bindkey -k k9 select 9
bindkey -k kP prev
bindkey -k kN next
bindkey -k kI paste .
bindkey ^? stuff ^H # it's labeled BACKSPACE, not RUBOUT
defc1 off
screen
screen
screen
select 0
hardstatus alwayslastline "%c | %<%-Lw%{= GK}%>%n%f* %t%{-} %+Lw%=%> | %l"
sorendition 13 0
vbell on
vbell_msg "Beep"
http://tmux.sourceforge.net/
# Local Variables:
# coding: utf-8-unix
# End: