3

Is it possible to load multiple configuration files in Gnu screen?

I tried multiple -c options, in vain.

The basic idea is to keep my default ~/.screenrc loaded, and add a custom session configuration above it.

5

What I do is that I have a common screenrc file and I include it from custom session files. For example I have ~/.config/screen/gnus.screenrc containing

sessionname gnus
source common.screenrc
chdir /

screen -t gnus emacs -nw -f gnus

And I run scr gnus to open this session, where scr is a script that arranges to either attach to a running session or open a new session with the specified name, and uses the session name to construct the path to the configuration file.

#!/bin/sh
session_name=$1
rc_file=~/.config/screen/$session_name.screenrc
exec screen -c "$rc_file" -S "$session_name" -r -R -d "$@"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.