What is the right syntax to enable logging in screen using a separate screenrc file?

gnu-screen, logging, screenrc

Solution

You simply need to change

log on

to

deflog on

The `log` command sets logging for the current window. At the time the .rc file is read, there is no current window. `deflog` sets the default for logging of newly created windows.

Alternatively you could add commands to your rc file to create an initial window and turn logging on for it.

(Damn, screen does everything.)

Problem

I have set up a screen rc file like this: ``` log on shelltitle apt logfile $HOME/configs/screen/screenlogs/apt.log logtstamp after 120 ``` and I am starting like this: ``` screen -c ~/configs/screen/apt.rc ``` But after using for a while the apt.log file is never created. The syntax looks perfect to me, unless there is something about the logfile syntax I am not getting

Original source