I am a beginner Linux user and have been using, as mentioned, Ubuntu 18.04.1 for about three months. So far, since I know I lack sufficient experience, I have avoided messing with anything tricky or dangerous-looking in the command-line.
Then, a couple days ago, I ran into a problem. After rebooting my computer, and typing in my password as usual, the screen went black for a few seconds, and then showed up at the login manager again. And again. And again. The Login Loop. I've heard of it before.
So obviously, what caused it, and how do I fix it?
That's what I need help with.
I was aware that this question has been asked before, so I looked around to see if I could find some things out. First, I found out that my login manager was GDM3, and there could be problems with that. So I tried installing LightDM and using that instead. No luck.
Next, I tried using the Cinnamon desktop environment that I had installed several weeks ago. That didn't work either. Something came up about Cinnamon needing to be restarted, which it never successfully did.
Note: I did not have Cinnamon running when I ran into this problem, I only tested it briefly a while ago. My current desktop environment is the default that was there when I first installed Ubuntu. I assume that is called 'Ubuntu' or 'Gnome', but I don't really know.
Then I read something about the Xauthority file possibly causing an issue. I used cat .xsession-errors to check that and it showed my username as still owning it. So apparently no problem there.
***Update. This is the content I get from running cat .xsession-errors:
`dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting XAUTHORITY=/home/kaleb/.Xauthority
dbus-update-activation-environment: setting GTK_MODULES=gail:atk-bridge
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
dbus-update-activation-environment: setting LANG=en_US.UTF-8
dbus-update-activation-environment: setting GDM_LANG=en_US
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting MANDATORY_PATH=/usr/share/gconf/LXDE.mandatory.path
dbus-update-activation-environment: setting XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/kaleb
dbus-update-activation-environment: setting USER=kaleb
dbus-update-activation-environment: setting DESKTOP_SESSION=LXDE
dbus-update-activation-environment: setting DEFAULTS_PATH=/usr/share/gconf/LXDE.default.path
dbus-update-activation-environment: setting PWD=/home/kaleb
dbus-update-activation-environment: setting HOME=/home/kaleb
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
dbus-update-activation-environment: setting XDG_SESSION_TYPE=x11
dbus-update-activation-environment: setting XDG_DATA_DIRS=/usr/share/LXDE:/home/kaleb/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share:/var/lib/snapd/desktop
dbus-update-activation-environment: setting XDG_SESSION_DESKTOP=LXDE
dbus-update-activation-environment: setting GTK_MODULES=gail:atk-bridge
dbus-update-activation-environment: setting SHELL=/bin/bash
dbus-update-activation-environment: setting XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
dbus-update-activation-environment: setting IM_CONFIG_PHASE=1
dbus-update-activation-environment: setting GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
dbus-update-activation-environment: setting SHLVL=1
dbus-update-activation-environment: setting LANGUAGE=en_US
dbus-update-activation-environment: setting GDMSESSION=LXDE
dbus-update-activation-environment: setting LOGNAME=kaleb
dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting XDG_RUNTIME_DIR=/run/user/1000
dbus-update-activation-environment: setting XAUTHORITY=/home/kaleb/.Xauthority
dbus-update-activation-environment: setting XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session2
dbus-update-activation-environment: setting XDG_CONFIG_DIRS=/etc/xdg/xdg-LXDE:/etc/xdg
dbus-update-activation-environment: setting PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
dbus-update-activation-environment: setting _=/usr/bin/dbus-update-activation-environment
** Message: 10:18:58.669: main.vala:102: Session is LXDE
** Message: 10:18:58.669: main.vala:103: DE is LXDE
(lxsession:4531): dbind-WARNING **: 10:18:58.718: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-UrEFunK9WL: Connection refused
** Message: 10:18:58.729: main.vala:134: log directory: /home/kaleb/.cache/lxsession/LXDE
** Message: 10:18:58.729: main.vala:135: log path: /home/kaleb/.cache/lxsession/LXDE/run.log`
Does this help at all?
Let me know if I can post any more useful information.
Later, I was able to install the Lubuntu desktop environment and successfully log in to my account. That's a far cry from my original position though, and the problem still isn't fixed.
I really have no idea how the problem started though. The only unusual things I can think I did before the problem started were:
Installed Alacarte from software manager to edit application icon.
Used
sudo nautilusin the terminal to get into some files that were locked. This was in regards to the application icon I was trying to change; nothing system-related.
I did nothing else out of the ordinary before the reboot.
Any help on how to diagnose and fix this Login Loop would be greatly appreciated.
rmfiles if necessary, then switch to GUI and re-login normally. – guiverc Feb 28 '19 at 04:41df -hl(disk free, human & local-only options... -- i use 'human' so I don't get huge numbers, 'local' so I don't get a list of NFS storage drives too which you may not have) – guiverc Feb 28 '19 at 04:52sudo chown -R $USER ~/*(chown = change ownership, -R so it's recursive, $USER will be/become your username, ~ is shorthand for your user directory). By usingsudo nautilusyou may have edited/changed a file and made the owner 'root' & denied your user access to whatever you changed (its no longer owned by you, but became a 'root' owned file) whilst the elevated privileges withinnautilus– guiverc Mar 05 '19 at 04:42Xauthorityfile somehow, to make sure it was still owned by me, which it was, but I'm not sure if you're talking about that file or not. Should I enter the code 'sudo chown -R $USER ~/*' exactly as it is shown in your comment? – Kaleb Mar 05 '19 at 20:49sudothat may have changed ownership away from you). – guiverc Mar 05 '19 at 23:31sudo chown -R $kaleb ~/(my username is just 'kaleb') gives me the errorchown: missing operand after '/'. Am I doing something wrong? – Kaleb Mar 06 '19 at 02:29echo $USERyou'll see your username (which I assume now is kaleb) be printed. If you want to use your username, it'ssudo chown -R kaleb ~(the $USER is a variable which will be substituted with the username I didn't know, ie.echo $USERprints "guiverc" for me as that's my username. The $ tells bash/shell to use the variable of the name after the $ (ie. $USER will contain your username, $PWD will be your present.working.directory etc). Because I didn't know your username, $USER would become it (or you can substitute it yourself too as you did if you remove the $) – guiverc Mar 06 '19 at 02:38sudo chown -R kaleb ~exactly into the terminal made a ton of black-and-white stuff go scrolling by for a few minutes, saying it was changing ownership on everything. Then everything became dis-functional, and after reboot I have a black screen with a blinking white cursor. I think I should reinstall now. Like I asked earlier, should I choose the 'reinstall' or 'something else' option? – Kaleb Mar 06 '19 at 03:10