the problem is much more bigger then what the topic says. I am new with Linux and was watching a tutorial for certain commands... and I learned about this command "startx". What this command does is "launch a GUI for your terminal or tty". the command was used in older versions of linux where the startup screen is usually a command line interface.

Curious to learn, I tried the command on my terminal with sudo (coz it wasnt running plainly). what happened was that it opened a GUI using terminal for my root. initially I was unable to go to my home screen but then I learned that it was on my tty7. I guess, GUESS, I later closed the process using "Ctrl+C" and turned my PC off. when I opened it in the morning it wouldn't open using my password. but I later realized that it won't open my GUI using login screen. Any idea about the issue??

  • To clarify what user did you run startx as? Was it just under your login or was it as root via sudo? – Oli Apr 24 '15 at 16:40
  • I was logged in as a user, tried this command on my terminal... "sudo startx" – random Apr 24 '15 at 16:43

This issue has been answered at: http://ubuntuforums.org/showthread.php?t=2190818
What probably happened is for some reason when you did 'sudo startx' the file owner for the '~/Xauthority' and '~/.ICEauthority' hidden files changed to root. These files are required as being writable by your login screen program - the display manager - under your user. So its probably that, when you login, your DM is unable to write changes to the files, it therefore does not proceed to the desktop screen.
Here's what you can try:

1. log in to a text console via one of the virtual terminals
   (Ctrl-Alt-F1 thru F6).

2. check the ownership on your ~/.Xauthority and ~/.ICEauthority files
   by running the following command:
    $: ls -l ~/.{ICE,X}authority

3. If the ownership of either one of them is owned by root instead of your user,
   change it back to your_user by running the command:
    $: sudo chown <your_user>:<your_user> ~/.Xauthority
    $: sudo chown <your_user>:<your_user> ~/.ICEauthority
   where <your_user> is replaced by your actual username.

4. Try, loggin in from (Ctrl+Alt+F7) now, it should work.
   But if it does not still work, 
   then go to one of your virtual terminals (Ctrl-Alt-F1 thru F6)
   and delete the files by running:

    $: rm -f ~/.Xauthority
    $: rm -f ~/.ICEauthority

   These files get regenerated as required.

I Hope this Helps.

  • worked just fine ^_^ – random Jun 22 '15 at 21:47

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.