I'd tried to install .Net Core on my linux mint and when I restarted my PC, I couldn't log in, my session don't initialize.

It shows this message (original language):

Sua sessão durou menos de 10 segundos. Se você não terminou uma sessão, isso pode significar que há algum problema na instalação ou você pode estar sem espaço em disco. Tente iniciar uma sessão de segurança para verificar se você consegue consertar o problema.
Visualizar detalhes (arquivo ~/.session-error)

syndaemon: nenhum processo localizado
/etc/mdm/Xsession: Beginning session setup...
/etc/mdm/Xsession: 35: /home/jefh/.dnx/dnvm/dnvm.sh [[: not found
/etc/mdm/Xsession: 650: /home/jefh/dnx/dnvm/dnvm.sh: Syntax error "(" unexpected (expecting ";;")

In english, is something like:

Your session only lasted less than 10 seconds. If you have not logged out yourself, this could mean that there is some installation problem or that you may be out of disk space. Try logging in with one of the failsafe sessions to see if you can fix this problem.
View details (file ~/.session-error)

syndaemon: non process localized
/etc/mdm/Xsession: Beginning session setup...
/etc/mdm/Xsession: 35: /home/jefh/.dnx/dnvm/dnvm.sh [[: not found
/etc/mdm/Xsession: 650: /home/jefh/dnx/dnvm/dnvm.sh: Syntax error "(" unexpected (expecting ";;")

Any ideas to solve this problem?

  • I'm not an expert of X server, but this could be a good point to start. – MickyInTheSky Jul 22 '15 at 6:12
  • Don't worked for me. Anyway, thanks for the support. – LINQ Jul 23 '15 at 0:28
/etc/mdm/Xsession: 35: /home/jefh/.dnx/dnvm/dnvm.sh [[: not found

This is a sign that /home/jefh/.dnx/dnvm/dnvm.sh contains some bash/ksh syntax, but it's being included in a script that is executed under sh. Plain sh doesn't have the [[ … ]] construct. The complaint about an unexpected ( is probably due to an array assignment; sh doesn't have arrays.

How to solve this depends on what this dnvm.sh script does. If I understand correctly, this was installed as part of some package; if so, report a bug against this package requesting that the script be ported from bash to plain sh (which is the shell used for login scripts on most Unix systems, including a majority of Linux installations). You can of course run the script in a separate instance of bash, but if it's executed as part of the session startup, the goal is presumably to define some environment variables, which must be done in the original shell.

  • dnvm is part of .Net core installation. Anyway, I moved this folder (.dnx) to ~/newdir and my session is normally. Line 35 and line 650 now is empty (I don't know how, maybe because a tried to execute it in bash). And line 34 have the following content [[ "$_DNVM_BUILDNUMBER" = {{* ]] && _DNVM_BUILDNUMBER="HEAD". My OS is totally functional, but I want to know what happened. – LINQ Jul 24 '15 at 2:25

Apparently the issue is still here - I just installed fresh Mint on VM and after the first restart I hit the same issue. Dvnm.sh appears to have invalid syntax. I did not able to run the dnvm at all after the first restart. Did anyone reported the issue?

Currently I can login only after removing the file (using CTRL+ALT+F2 on login screen, find the file and remove it) which is required for asp.net vNext installation.

  • I think this issue might be related : github.com/aspnet/dnvm/issues/376 At least enough to warrant me commenting on the issue asking if it is. If not I will submit another issue. – Gilles Feb 14 '16 at 15:20

You need to move the

[ -s "/home/bleakcabal/.dnx/dnvm/dnvm.sh" ] && . "/home/bleakcabal/.dnx/dnvm/dnvm.sh" # Load dnvm

line from your .profile to .bashrc (or .zshrc).


Well. I solved my problem removing the .dnx path (at ~/.dnx). Unfortunately I don't know the cause of this issue, but I can use my OS normally.

  • Removing the file is not solution as dnvm is essential part of running asp.net vNext on linux. – Vladimir Iliev Nov 8 '15 at 17:27
  • I agree with you, but its the only way I've found. Have you reported the issue? @VladimirIliev – LINQ Nov 9 '15 at 10:04
  • Nope, I switched to Xubuntu (as I'm in hurry) and the issue is not reproducible there - dnvm is working as expected. If you have time you can report it. – Vladimir Iliev Nov 9 '15 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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