2

I am unable to log in to my account, having recently installed Linux Mint. I had this problem with Ubuntu 13.10, and no amount of re-installations seemed to fix it. However, Mint gives me a very useful window alerting me that my session lasted less than 10 seconds, and displays the contents of my ~/.xsession-errors file, before returning me to the login screen. I have been able to access the terminal to execute commands thus far, and I have verified that my $PATH variable is:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/user/bin:/sbin:/bin:/usr/local/games:/usr/games

The contents of my .xsession-errors is:

/etc/mdm/Xsession: Beginning session setup...
/etc/mdm/Xsession: 1: /etc/profile: id: not found
/etc/mdm/Xsession: 12: [: Illegal number: 
/etc/mdm/Xsession: Executing default failed, will try to run x-terminal-emulator
/etc/mdm/Xsession: 205: exec: x-terminal-emulator: not found

EDIT: After being advised to select "Cinnamon" from the login option screen, I tried it and it didn't work. The new .xsession-errors file can be found at: http://pastebin.com/36F4daQU

It looks like useful information, but, being new to Linux, I'm not sure what to do with it.

  • 1
    Please post your /etc/mdm/Xsession and /etc/profile files. Is this a fresh install or are you installing somewhere that had another Linux before (and have not formatted)? – terdon Mar 10 '14 at 18:24
  • /etc/profile: pastebin.com/qw80Qjyw /etc/mdm/xsession: pastebin.com/23MadAPF During installation, the boot and root partitions were formatted. I've left the home partition intact so as to keep my personal files. – Sorou Mar 10 '14 at 18:29
  • OK, it is looking for a Desktop Environment you don't have installed, which one were you using before (Gnome? Cinnamon? KDE? Unity? xfce?) and which one do you want to use now? – terdon Mar 10 '14 at 18:40
  • I was using Ubuntu, which I think uses Unity, but now on Mint I'm using (or trying to, rather) use Cinnamon. – Sorou Mar 10 '14 at 18:43
  • OK, have you selected Cinnamon in the login screen? It is trying to launch Unity because that is the default session saved in your $HOME. – terdon Mar 10 '14 at 18:47
2

The problem is that Mint is trying to load your default session which is apparently stored in one the files read by /etc/mdm/Xsession, most probably ~/.xsessionrc if you have it.

In any case, the simplest solution would be to choose Cinnamon from the login menu options and save that as your default.

If that doesn't work, try moving the relevant files (not sure which one is causing the issue here):

mkdir old_dotfiles
mv ~/.x* ~/.X* old_dotfiles

Then try to log in again. If that works, you can copy the files back one by one to see which one was breaking but unless you know you have modified them, just leave them.

As a last resort, you can simply move all your old dotfiles to a new directory and try logging in again. Since the issue is a setting kept from your previous installation, this should fix it:

mkdir olddotfiles; 
mv ~/.[A-Za-z0-9]* olddotfiles

All your old config files are now in $HOME/olddotfiles and you can move them back one by one if you want to restore them. Just make sure you don't move the problematic one.

  • I just tried that and I still couldn't log in. The xsession-errors file changed and can be found at: pastebin.com/36F4daQU – Sorou Mar 10 '14 at 18:54
  • @user256491 is cinnamon actually installed? See jpdated answer for a possible workaround if it is. – terdon Mar 10 '14 at 18:57
  • How do I check if cinnamon is actually installed? I mean it should be, but that's a good idea. – Sorou Mar 10 '14 at 19:02
  • @user256491 if you have some shell available dpkg -l cinnamon | grep ii – Braiam Mar 10 '14 at 19:09
  • Tried moving files all about and nothing worked. Tried the command suggested by Braiam. Not sure if the formatting is important so I tried a screenshot instead: i.imgur.com/dn82nfL.png – Sorou Mar 10 '14 at 19:14

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.