I am a new elementary OS user and I just installed it on a PC.

The installation took place as normal. However, when I put the password in and it begins to login after 3 seconds the screen goes black and back to screen users.

  • Hello, welcome to community, did this behaviour occur just after the installation? – Paulius Šukys Nov 18 '15 at 20:58
  • Did you install anything before this happend? – user3 Nov 19 '15 at 15:09
  • I have the same Problem but everytime i writen one of These Commands i became this answer: „command sed is in /bin/sed aviable The command could not be found because usr is not part of the environment variable PATH .“ How i can fix this Problem? – Nicolas Jun 26 '19 at 10:16

Press Ctrl+Alt+F3 and login into the terminal with your username and password. Your password will not show * or anything, but it is being typed.

Now run ls ~ -lah to list files in your home folder. If in the output the line

-rw-------  1 root root   53 Nov 29 10:19 .Xauthority

appears then your .Xauthority file has the wrong permissions. You need to do sudo chown $USER:$USER .Xauthority and try logging in.

If you don't see that line, do ls -ld /tmp. Check for the first 10 letters in the left: they should read exactly like so: drwxrwxrwt.

drwxrwxrwt 15 root root 4096 Nov 30 04:17 /tmp

If they don't, you need to run the command sudo chmod a+wt /tmp and check again.

If neither of these work, I'd recommend you either

  1. Run this command:

    dpkg-reconfigure lightdm

    to reconfigure lightdm - the login manager.

  2. Or uninstall lightdm, and reinstall it with this command:

    sudo apt-get install --reinstall lightdm

Now restart the computer with this command:

sudo shutdown -r now

and login again.

To prevent this issue in the future, don't run GUI (Graphical User Interface) programs with sudo. If you have to (for example to open the file manager) add the -H flag - so you run sudo -H command-goes-here.

  • 2
    Tim, can you edit this post to explain what each of these commands is intended to do? It would also be helpful to explain what the problem is, possible causes, and how to avoid those in the future. – Daniel Foré Nov 29 '15 at 0:25
  • 2
    @DanielForé done – user3 Nov 29 '15 at 0:28

i had same issue... was going around in circles.. couldn't even load a usb installer to back end the HDD version..

it was a memory issue.. i logged through tty3 and cleared out my downloads and documents and hey presto.. i only wasted 3 hours of my life!


I'm stuck on the login form too. I just installed Elementary and this is my very first login attempt. I already checked my .Xauthority file: it is property of my personal user (not root). I also reinstalled lightdm but nothing changed. Someone has an hint for a linux noob like me? :D Thanks a lot


Like PierPaolo Zus, I have the same problem right now. It happened a few days ago after installing updates. I guess something in the update broke lightdm.

I have tried all the things proposed here.

What I did as a workaround is that I installed kde-full and sddm and then I use sddm as login manager and KDE as desktop environment. This is NOT a real solution. But it is a workaround that allows me to use my computer again.

I hope someone knows how to actually fix this.

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.