Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
add comment

3 Answers

up vote 0 down vote accepted

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.

share|improve this answer
add comment

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

if [ "$TERM" != screen ] ; then exec screen ; fi
share|improve this answer
add comment

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
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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