1 |
rdmurray@××××××××.com wrote: |
2 |
> On Thu, 7 Sep 2006 at 11:48, Francisco Olarte Sanz wrote: |
3 |
>> On Wednesday 06 September 2006 23:12, Ben Munat wrote: |
4 |
>>> Well, I think the response is overwhelmingly clear: screen! |
5 |
>>> I just wanted to add my 2 cents that I absolutely love screen... it has |
6 |
>>> saved my ass countless times. The only problem is remembering to run it |
7 |
>>> on login before starting the emerge. I suppose I really should look into |
8 |
>>> getting bash to run it for me automatically. Anyone got a script for |
9 |
>>> that? |
10 |
>> |
11 |
>> I don't normally use screen for login, but as none of my servers |
12 |
>> allow |
13 |
>> root-sshing directly what I'm used to to is ssh normaluser@server, |
14 |
>> su -c 'screen -DAR', emerge, instead of plain su. |
15 |
> |
16 |
> This is probably more info than most people want to hear, but some other |
17 |
> sysadmin may find it useful, so what the heck. |
18 |
> |
19 |
> I work on around two dozen servers that are mixture of unix OSes, and |
20 |
> I'm only primary sysadmin on some of them. What I do is set myself |
21 |
> up a minimum consistent environment on each machine using a little |
22 |
> rsync script. That environment includes my laptop's ssh key and some |
23 |
> "helper" scripts. On my laptop, from which I do all my work, I run the |
24 |
> 'ratpoison' window manager, which is to X what screen is to the console. |
25 |
> Then I use ratpoison's 'run a command in a window' function to run a |
26 |
> script to connect to whatever machine it is I need to work on. (eg: |
27 |
> 'workon mail' to get to the mail server I manage.) That script looks up |
28 |
> the hostname and screen name associated with the nickname 'mail', sshes to |
29 |
> the host, and runs the helper script ('workonscreen') on the target host. |
30 |
> That script saves the ssh environment vars (so I can source them inside |
31 |
> screen to get access to my ssh-agent connection), does a screen -wipe |
32 |
> in case the server crashed since my last connect, and then connects to |
33 |
> a named screen session. I use named sessions so I can have more than |
34 |
> one screen "workspace" on a given host and get back to them by name. |
35 |
> |
36 |
> This makes for a very efficient work environment. The ratpoison windows |
37 |
> essentially become workspaces, where the screen in a given window manages |
38 |
> the windows of my workspace. The ratpoison and screen keystroke commands |
39 |
> are (by design) very parallel, so the muscle memory is quite strong and |
40 |
> getting to exactly the window I need happens almost as fast as I can |
41 |
> think it (I'm a fast typist, and I use named windows and use the names |
42 |
> for window switching). I can also use the screenrc file to set up a |
43 |
> default workspace with various windows and running programs, though I |
44 |
> haven't done that much on the hosts yet (I use that feature extensively |
45 |
> on the laptop, though). |
46 |
> |
47 |
> Oh, yeah, and I never log in as root. I always use sudo to run root |
48 |
> commands :) But there's no reason you couldn't do the same thing but run |
49 |
> the screen as root. Personally I always have only one window visible at |
50 |
> a time, but I imagine this technique would work quite well even if you |
51 |
> do like having your window split into multiple pieces. (I do do that |
52 |
> sometimes to, say, have an IRC window up and visible while I'm working |
53 |
> in the other pane.) |
54 |
> |
55 |
> I can never figure out what all this fuss is about desktops. I've never |
56 |
> found the desktop metaphor to be particularly efficient... |
57 |
> |
58 |
> --David |
59 |
|
60 |
|
61 |
Very nice... will put this aside to try out when I have some time... |
62 |
really like the idea of named windows which just know what machine to go |
63 |
to... |
64 |
|
65 |
And as far as root login goes... yeah, I know... I know... I tried to |
66 |
push my brother into letting me turn off root login, but he just |
67 |
insisted and he pays for the server so... I suppose I could still always |
68 |
login as my user and then su -- and be happy that I'm being "correct" -- |
69 |
but knowing it's there and being lazy.... etc. |
70 |
|
71 |
b |
72 |
|
73 |
-- |
74 |
gentoo-server@g.o mailing list |