Page 1 of 1
Can't log in after typing sudo startx in LXterminal [solved]
Posted: Fri Jan 01, 2016 1:14 pm
by cc85734
I am fairly new to linux, just letting you know.
I ran the command 'sudo startx' while in lxterminal (i was in the gui, not cli).
It came up with an error (cn't remember it) and it booted into a desktop, but like I had just purchased the pi.
I rebooted, and it didnt boot straight to the desktop, it wanted me to login, which it has never done before. It wanted me to login, but not in the cli, in a gui login screen . Now, when I type in pi and raspberry, it does nothing. When I type in the wrong password, it says incorrect password. I have not changed the password.
Please help me get back into my rpi!
Should i just re-install raspbian?
Re: Help!
Posted: Fri Jan 01, 2016 1:41 pm
by rpdom
You could just reinstall, or you could try this:
Press Ctrl+Alt+F2 to get to a text-console with a login prompt. Log in as "pi" with password "raspberry". You now have a command prompt.
Then type these commands
Code: Select all
sudo chown pi:pi ~/.Xauthority
touch .~/.Xauthority
sudo reboot
and when the Pi has rebooted you should be back to normal.
Re: Help!
Posted: Fri Jan 01, 2016 2:10 pm
by cc85734
rpdom wrote:You could just reinstall, or you could try this:
Press Ctrl+Alt+F2 to get to a text-console with a login prompt. Log in as "pi" with password "raspberry". You now have a command prompt.
Then type these commands
Code: Select all
sudo chown pi:pi ~/.Xauthority
touch .~/.Xauthority
sudo reboot
and when the Pi has rebooted you should be back to normal.
I did that but it says login incorrect. But I havent changed it and i did it twice.
Re: Help!
Posted: Fri Jan 01, 2016 2:12 pm
by rpdom
Probably best to reinstall then. Then change the password, just in case.
Re: Help!
Posted: Fri Jan 01, 2016 2:19 pm
by cc85734
rpdom wrote:You could just reinstall, or you could try this:
Press Ctrl+Alt+F2 to get to a text-console with a login prompt. Log in as "pi" with password "raspberry". You now have a command prompt.
Then type these commands
Code: Select all
sudo chown pi:pi ~/.Xauthority
touch .~/.Xauthority
sudo reboot
and when the Pi has rebooted you should be back to normal.
Tried again and it worked.
Thanks so much, I had loads of programs and stuff on there, so I really didn't want to re install! Thanks

Re: Help!
Posted: Fri Jan 01, 2016 3:44 pm
by davidcoton
Make a backup so you can recover without having to reinstall

Re: Help!
Posted: Fri Nov 18, 2016 12:04 pm
by turismoassociati
rpdom wrote:You ... could try this:
Press Ctrl+Alt+F2 to get to a text-console with a login prompt. Log in as "pi" with password "raspberry". You now have a command prompt.
Then type these commands
Code: Select all
sudo chown pi:pi ~/.Xauthority
touch .~/.Xauthority
sudo reboot
and when the Pi has rebooted you should be back to normal.
I had the same problem and your solution worked like a charm. Thank you.
NEVER launch in the Terminal
when you opened the CLI terminal from the GUI!