Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running linux mint 14 and when I try to log in I get an error saying "Session lasted less than 10 seconds...". When I click on details it says:

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

I edited the /etc/environment file so maybe that has something to do with it.

I restarted in recovery mode and selected "Drop to root shell prompt". I attempted to edit the /etc/environment file, but it says it's read only (even while using sudo).

What can i do?

share|improve this question
What changes did you make to that file? That error seems to be complaining about something in /etc/profile and /etc/mdm/Xsession. And seems to be complaining about a bunch of missing commands that really should exist. In recovery mode your disk is probably in read-only mode. You probably just need to remount it read-write. – Etan Reisner Nov 26 '13 at 19:03
i was installing Ant and changed contents of environment file to: ANT_HOME=/apache-install-dir/apache-ant-version ANT_OPTS="-Xms256M -Xmx512M" PATH=$PATH:$HOME/bin:$ANT_HOME/bin export ANT_HOME ANT_OPTS PATH – user1716672 Nov 26 '13 at 19:12
how do i remount in read-write? – user1716672 Nov 26 '13 at 19:12
mount -o remount,rw / or so. – Etan Reisner Nov 26 '13 at 19:16
@user1716672 no spaces in remount,rw – DerfK Nov 26 '13 at 19:41

I mounted with read-write privileges with:

mount -o remount,rw /

And changed contents of environment file back to:


This solved the problem.

share|improve this answer
If you learn nothing else from this exercise, hopefully it will teach you to make a copy of any system file before changing it. It makes backing out your changes much easier afterwards! – MadHatter Nov 27 '13 at 9:49

Your Answer


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.