0

I have added the following line to my .bashrc file to start gnu screen on login:

exec screen

But it seems to go in a loop (may be that is its starting screen also on screen start).

I am not able to access the shell by ssh anymore.

How can this be solved?

Thanks

3 Answers 3

0

Try using Ubuntu recovery mode.

If that does not work, I suggest using PartedMagic USB stick to boot from and repair your system. You can prepare it using Unetbootin. Using PartedMagic you can mount partitions on your hard drive and edit offending lines from your /home/username/.bashrc.

0

You can use environment variables set by screen to do a simple test.

if [ "$TERM" != screen ] ; then exec screen ; fi
0

Don't put that in your .bashrc. The first thing screen does is starts a shell, which will execute .bashrc, which execs screen, etc. How are you logging in? If via ssh, just use

ssh remotehost screen

To fix the immediate problem, you can login using a different shell so that you can edit your .bashrc. It's very unlikely you don't have one of csh or zsh installed:

ssh remotehost csh

or

ssh remotehost zsh

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .