Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

This question already has an answer here:

Like the titel says: my Ubuntu gets stuck in a login loop.

Earlier this day I tried to add the environment variable for Java. I added to the file /etc/environment the path to my java distribution and everything worked out fine. An hour later when I tried to start the system, it got stuck in a login loop. I tried every proposition from this thread but non of them worked out.

When I read out /.xsession-errors it says that it can't find the file 90environment, so maybe that's part of the problem, but I have no idea how to solve it.

I'm new with Ubuntu, so if there are any propositions, please explain them in an easy language.

share|improve this question

marked as duplicate by Eric Carvalho, bodhi.zazen, karel, Fabby, the_Seppi Apr 15 at 19:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

I already tried all of the solutions given to this question, but none worked out for me. – Annika Nov 5 '13 at 7:59

1 Answer 1

If you can read the file .xsession-errors you might as well edit /etc/environment again to remove the path to your java distribution you added earlier. Big chance that everything is solved then. :-)

share|improve this answer
I tried this out, but it seems that the path to Java is already missing. It tried to read out PATH with echo $PATH and get back: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games I'm not sure but I think there were more entries when I added the path to java, so maybe I accidentally deleted something. – Annika Nov 5 '13 at 7:50
Yes, you are missing some parts. This is what you should have in /etc/environment: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/u‌​sr/local/games" – thom Nov 5 '13 at 10:58
I set my PATH via export PATH=.... to the one you posted, but I still can't login -.- Was this the right way to change it or do I have to use another command? – Annika Nov 5 '13 at 12:31
you have to (sudo) edit de file /etc/environment because you are missing important parts there. exporting will not help. – thom Nov 5 '13 at 13:31
Could you please tell me the command to do this? If I try to edit the file by "sudo gedit /etc/environment", I'm told that the command gedit was not found – Annika Nov 5 '13 at 14:47

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