Solve "session lasted 10 seconds" error in Ubuntu

 session lasted 10 seconds

/etc/gdm/Xsession: Beginning session setup...
/etc/gdm/Xsession: line 73: ls: command not found 
/etc/gdm/Xsession: Executing default failed, will try to run x-terminal-emulator  /etc/gdm/Xsession: line 224: exec: x-terminal-emulator: not found

Have you installed any packages like JAVA etc then you probably done mistake in
setting the path variables so ...............

Check the PATH settings in
/etc/environment
and /etc/bash.bashrc

remove extra settings if any
this worked for me

Please post comments if this worked for you ....

No comments: