Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
how can I invoke zsh via screen when logged in via ssh?
- X-seq: zsh-users 18347
- From: TJ Luoma <luomat@xxxxxxxxx>
- To: Zsh-Users List <zsh-users@xxxxxxx>
- Subject: how can I invoke zsh via screen when logged in via ssh?
- Date: Wed, 22 Jan 2014 14:54:02 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=a39pePWtN1qFkBZ+yy+PlncJ5oTtacV2KQmXiFEBYwE=; b=As54IUltVbTUh5XbR5gYZYF6s5k50SRpF/DlCLG0XsGwnns8Js5P5JJbKPAWNTeoC0 qc3J66YKEfCiGrzemdkhrJrzVjJpXivVNlhWPF87dxKqiC7FM9YbrWZDp3MYs9TATP3d dJ4d1es/9fvR5stoFeemu/N7NgUy7blon4Cj3t6i6NDksjU9rAlczBo0+OEFWUoJUklg 1HfnFzmSrso0kNRQBTcjtqAq7j4fvfnu9TNbPNCQ8ECPE2aJipjNpjeINgZ6nshWi1Bh qqud7h6MIZiI5yo8nwa6R+pZ6z+KPAqdm358cBEpnRmDYlKQHwGPpGX7ukz6VqaT19Ud Q5UQ==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
I use zsh as my login shell for several accounts I connect to via ssh.
My connection to these accounts is often fragile, either because they
were initiated on an iOS device or behind a satellite internet
connection.
I had a thought today that perhaps one answer would be to use
'screen(1)' as my login shell for those accounts, but then I realized
that I didn't want that to be the shell I use for local logins, just
for SSH logins.
I wondered if anyone had already done this, so I didn't have to
re-invent the wheel, or might have some experience with potential
problems that I might run into when doing this.
1) Would 'zsh' function normally when in screen(1) ?
2) I've already noticed that emacs keys don't seem to work right, i.e.
control+a does not jump to the beginning of the line, although
control+e jumps to the end of the line. Should I make some adjustment
to `bindkeys` or anything else?
3) What's the 'best' way to invoke screen(1) from .zshenv ? I already have this:
PPID_NAME=$(command ps -o 'command=' -cp ${PPID} 2>/dev/null )
case "${PPID_NAME}" in
sshd)
SSH=yes
;;
launchd)
LAUNCHD=yes
;;
esac
So I was going to change it to:
PPID_NAME=$(command ps -o 'command=' -cp ${PPID} 2>/dev/null )
case "${PPID_NAME}" in
sshd)
exec =screen -r || exec =screen
;;
launchd)
LAUNCHD=yes
;;
esac
which would, I believe, resume an existing `screen` session if one
existed, but would otherwise just launch `screen` anew.
Is there a better way?
Thanks in advance,
TjL
ps - bonus question: anyone know how to tell screen(1) to _not_ show
its welcome message every time it launches?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author