Cannot login by GUI, startx starts for root only
The comment from link in question helped.
- At the login screen, press
control+alt+F3
. - Login
sudo rm .Xauthority
sudo rm .ICEauthority
sudo reboot
Looks like running X as root makes the .Xauthority
and .ICEauthority
files owned by root as described in linked post.
Alexei Martianov
Updated on September 18, 2022Comments
-
Alexei Martianov over 1 year
I recently installed latest Ubuntu 17.10 (studio flavor) on Thinkpad laptop. Have not installed anything on it yet, still, after several hours of working, now after I enter password on logon screen, I see line
/dev/sdb5/clean, ...
flashing for a moment and get back logon screen.Recovery mode says APT is ok, filesystems are ok. In CLI consoles I can login,
startx
writestimeout in locking authority file /home/...
and does not start GUI. I can however start X as root (sudo startx
). I tried to add new user - also cannot login in GUI.I found maybe related: cannot-login-after-running-startx-and-rebooting, maybe I did run X as root, do not remember, however, doing
sudo rm .Xauthority
did not help (I did the command as my user, not root).What can be cause of that problem? I want to have stable working laptop and ready to investigate.
-
sudodus about 6 yearsIt is rather late for 17.10.1. In a few days, the developing version, Bionic Beaver, will be released as Ubuntu Studio 18.04 LTS with long time support until April 2021, while 17.10.1 will reach end of life in July this year. So I suggest that you try Ubuntu Studio Bionic. See this link, if you need more help, Ubuntu Development version / How to participate
-
Alexei Martianov about 6 years@sudodus, I will be looking for upgrade, thanx!
-
sudodus about 6 yearsI suggest that you make a fresh installation of 18.04 LTS (not an upgrade from 17.10.1).
-
-
sudodus about 6 yearsThanks for sharing your solution :-) There is a general rule to avoid running GUI application programs with
sudo
because it can 'hijack' configuration files for the regular user. A workaround issudo -H
, but there are other and safer ways to elevate the permissions. See for example Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?