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.

There are various posts on the Xubuntu login loop, but none of them address NVM (Node Version Manager).

I have installed NodeJS via NVM on my Xubuntu VM and it works fine, however after rebooting, I can't log into Xfce anymore. Xubuntu is in a login loop.

The line responsible is in ~/.profile, added by NVM:

[ -s $HOME/.nvm/nvm.sh ] && . $HOME/.nvm/nvm.sh # This loads NVM

If I comment the line out, I can log in again.

I don't know exactly what the problem is. I suppose this line is failing somehow. How could I troubleshoot this? Are there any logs that I could look at?

If I log in through the terminal and run source ~./profile there are no errors and NVM is loaded correctly.

share|improve this question

1 Answer 1

I posted your solution in NVM github, they have already a issue of this:

https://github.com/creationix/nvm/issues/334

EDITED:

It seems that sh can't do dynamic substitution with variable, when loading profile.When execute with bash (terminal) it works.

So u could move this to your ~\.bashrc, also u can put this: source ~/.nvm/nvm.sh to your ~\.bashrc

I make the second and works fine!

share|improve this answer
    
When writing an answer it is best to write the solution here then link to the source in case the linked site moves the page. –  Julian Stirling Dec 29 '13 at 17:19
    
@JulianStirling but they don't have an answer right now... It still an open issue –  thur Dec 30 '13 at 11:42
    
In which case this is not an answer. I know it is pedantic, but it is best give links to ongoing issues in comments, and answers in the answers section. Otherwise this is marked as having an answer when it doesn't. –  Julian Stirling Dec 30 '13 at 12:02
    
@JulianStirling ok! But I can't add a comment =/ I try this before put this answer.. but I don't have reputation ¬¬ –  thur Dec 30 '13 at 12:18
    
Urg, that problem! Good point, there was nothing else you could do. Thanks for posting the link. –  Julian Stirling Dec 30 '13 at 12:21

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.