I have freshly installed arch linux according to the steps listed in arch linux wiki page, installed xorg and gnome. In my ~/.xinitrc file I have added the line exec gnome-session.

Now, when I boot my system and login to tty1, as a normal user( not root) and type startx at the prompt the gnome session doesn't start and instead complains that the connection to the xserver is lost.

But when I log in as root or use su to issue command startx it starts without a problem. Can anyody help me with removing this problem ?

  • Hmmmm...firewall issues? iptables issues? File permission issues?
    – mdpc
    Nov 4, 2014 at 7:31
  • Do you have a file called .xsession-errors in your home directory? Or some other file that gets modified when you run startx (run ls -Altr ~ to check)? If so, post the content of that file. Nov 4, 2014 at 17:59

1 Answer 1


Ensure you have the .xinitrc file in the user home directory. It seems you have the .xinitrc in the root directory and not the users home directory. to verify this run ls -la in the user home directory. If you see a .xinitrc file inspect it using a text editor to see if it has the required content.

  • Thanks a lot! What a silly mistake on my part! My home directory had the .xinitrc file but didn't have the required exec gnome-shell line in it. Atleast your solution made me look into the .xinitrc file. Nov 17, 2014 at 3:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .