14 comments

[ 3.1 ms ] story [ 28.1 ms ] thread
I love screen. Still don't know half of what it can do.
http://www.delorie.com/gnu/docs/screen/screen_toc.html

Screen is the sort of program where it's really good to skim through its manual now and then. There's tons of stuff in there that most people don't know it can do.

The scroll/copy and paste functionality functionality (under M-[ and M-], where meta is C-a or ` or whatever) is really handy, you can change settings interactively via the : prompt, and you can also interact with the running screen session(s) via scripts.

Also, from my screenrc, a statusbar (looks like this http://shenani.gen.nz/~scott/screen-statusbar.png):

  # Set up my status line at the bottom of every frame
  caption always "%{gb}  %{ck}%m-%d %C %{gb}  %{gb}%?%-Lw%?%{ck}%n*%f %t%?(%u)%?%{gb}%?%+Lw%?"
Good way to explore the screen manual:

  screen man screen
Read enough to figure out how to list and switch between virtual terminals, and then you can play around and come back to the man page easily.
Oh - forgot M and _, which watch a buffer for output and 30 sec. (by default) of silence, respectively. They print a message and flag it with an @ in the status line (if any). M combines well with tail -f on log files.
Add top(1) to that list (with the rest of the procps, psmisc and lavaps packages.)

I have been indoctrinated in the "unix" way, and knew only the bare, portable posix minimum. The GNU extensions of those packages are utterly delightful. Think: color coded process listing, thread grouping and various other debugging goodies :-)

I've been wondering if it might be interesting to see webcasts of just smart people coding some project from start to finish, say one hour webcast per day.
really good idea.if some one do it right it can be a business as well.
I would love that! I would also like to hear their justification of why they do some things in certain ways.
It would give the wrong impression of wizardry. One hour of flow is but the climax of weeks of pondering, small tests and trials, and general weirdness where one is zoned out of the rest of life :-P Almost like showing a video of an olympic 100 meter dash to an alien specie and calling it "autonomous motion of bi-pedal earthlings".

What you might be interested in, however, is how various programmers setup their environment for optimal hacking.

(fwiw, I just came back from the coffee shop where I wrote a faster lookup database for the Mindmax GeoCity IP database with CLISP and notepad, to save on laptop battery. Hardly my typical work environment but easily my finest work in weeks :-)

Is there a way to do this without having to sudo on one or both ends?
You don't need to use sudo at all. I just tried it without, it worked fine. (On OpenBSD, but that shouldn't matter.) Logging doesn't have anything to do with sharing sessions, either, though it is quite useful for other stuff.

The multiuser section of the manual is here (http://www.delorie.com/gnu/docs/screen/screen_25.html), and there are a couple commands for changing user permissions.

You can login as the same user and use the same command (without sudo).
Two people typing into the same shell at the same time, both as root? I don't think this is a good idea.
There is support for giving certain users read-only access, so that's not a problem.