Question

I'm tying to accomplish a very simple task. start my shell with screen. In my .profile file. I have this

if [ -f /bin/bash ];
then
        echo "Switch to bash."
        exec bash

switches to bash.

but if I just include "screen" inside my .bashrc, I get in an infinite loop of screen prompt, because bash runs screen recursively.

If I include. "exec bash -c screen" terminal never gets going?

Was it helpful?

Solution

Consider not using the profile script when you run screen:

exec screen bash --noprofile
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top