Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I followed this guide in omg ubuntu.
I've just replaced the "GalaxyNexus" with "AsusInfinity".
Now terminal won't open printing this:

enter image description here

And closing after that...
What did the last 3 commands do (before android-connect)? What can I do to fix this?

share|improve this question
add comment

1 Answer

up vote 7 down vote accepted

The problem is that you copied and pasted lines from a blog that contained "pretty" (typographic) quotes into your .bashrc file, so instead of running the command alias, your .bashrc is trying (and failing) to run "alias.

I'm not entirely sure I recreated your problem 100%; when I did the same thing in a virtual machine, I did get the same alias command error that you did, but my Terminal window doesn't auto-close.

enter image description here

Still, I think I know what you'll need to do in order to fix it, even though I can't 100% recreate the problem on my end. Please press CtrlAltF1 in order to get to a text-only console. Now log in as your normal username and password.

From here, nano ~/.bashrc, and you will load up your .bashrc file in a simple text mode editor.

console login

Delete those last few lines that you added; you should recognize them pretty easily. Ctrlk is the keyboard shortcut to delete a whole line (as you can see in the bottom lines of text in nano). Once you've deleted them, press Ctrlx to exit, and be sure to say yes when it asks you if you want to save your changes.

nano

Once you're back at the prompt, type in exit, then press CtrlAltF7 to get back to your graphical session. You should now be able to open the Terminal without it auto-closing on you.

If you still can't log in, even at the console:

Please follow the instructions on booting to recovery mode, getting a root shell, and remounting / read-write in my answer password does not work for everything "anymore"!.

Once you've gotten the root prompt and remounted the filesystem read-write, do nano /home/yourusername/.bashrc, and otherwise follow the same instructions from there. You may also consider cp /etc/skel/.bashrc /home/yourname/.bashrc ; chown yourname /home/yourname/.bashrc to simply replace your bash profile with the system default, if you aren't sure how to fix what you've done to your current one.

share|improve this answer
    
thank you very much for your reply but I cannot login at text-only console. I am typing my correct credentials but a quick text is showing up (so fast that I cannot read it) and the login promt is shown again. –  Chris Nov 25 '12 at 20:52
    
ok, please follow the instructions on booting to recovery mode and getting a root shell and remounting / read-write in my answer askubuntu.com/questions/221464/…. Once you've gotten the root prompt and remounted the filesystem read-write, do nano /home/yourusername/.bashrc, and otherwise follow the same instructions from there. –  Jim Salter Nov 25 '12 at 20:56
    
You might also consider simply doing cp /etc/skel/.bashrc /home/yourusername/ and then chown yourusername /home/yourusername/.bashrc in order to correct anything else you've done that's screwing the profile up. –  Jim Salter Nov 25 '12 at 21:00
1  
Jim thank you very much for your answer! It worked just fine! You've hadn't been able to recreate the auto close because I had typed "exit" after the 2nd command.. I'll try now without the ".. –  Chris Nov 25 '12 at 21:22
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.