From: Eric De Mund <ead@ixian.com>
To: zsh-users@zsh.org
Cc: Thorsten Kampe <thorsten@thorstenkampe.de>
Subject: Re: Executing command on reattaching to screen session
Date: Thu, 6 Feb 2014 16:51:28 -0800 [thread overview]
Message-ID: <21236.11792.398711.734931@ixian.com> (raw)
In-Reply-To: <ld0k6c$a3a$1@ger.gmane.org>
Thorsten,
] tough question: can I automatically execute a command on reattaching
] a detached byobu (screen or tmux) session?
]
] Every time I login, /etc/motd is displayed. Since I hardly ever log
] out and in, I'd like to have the same functionality when reattaching
] to my detached session. This could be a simple cat /etc/motd kind of
] "autostart".
Perhaps screen(1)'s '-X' flag may get you close to what you're looking
for. Note that the word "command" in the description, there, refers to
valid screen(1) commands, not shell commands:
SCREEN(1) SCREEN(1)
...
COMMAND-LINE OPTIONS
...
-X Send the specified command to a running screen session. You
can use the -d or -r option to tell screen to look only for
attached or detached screen sessions. Note that this command
doesn't work if the session is password protected.
Regards,
Eric
--
Eric De Mund
ead@ixian.com
next prev parent reply other threads:[~2014-02-07 1:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-06 18:27 Thorsten Kampe
2014-02-07 0:31 ` Kurtis Rader
2014-02-07 0:37 ` Kurtis Rader
2014-02-07 0:51 ` Eric De Mund [this message]
2014-02-07 4:01 ` Bart Schaefer
2014-02-07 11:54 ` Thorsten Kampe
2014-02-07 16:26 ` Bart Schaefer
2014-02-09 3:20 ` Axel Beckert
2014-02-13 7:32 ` Sebastian Stark
2014-02-13 8:35 ` Thorsten Kampe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=21236.11792.398711.734931@ixian.com \
--to=ead@ixian.com \
--cc=thorsten@thorstenkampe.de \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).