Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: SSH works fine, desktop fails to login

  1. #1
    Join Date
    Jul 2019
    Beans
    48

    SSH works fine, desktop fails to login

    Hello friends!

    I'm having an odd issue on my personal server. It runs Ubuntu 20.04.

    Usually I only use it from SSH, it has a monitor connected but it's always turned off. Yesterday I used it to restore the partition backup from a few months ago so I'd upgrade softwares and install a few new then create a new backup, and I was unable to login.

    It has the usual purple login screen showing my username. I click on it and the password input appears. But when I type my password it waits a second and the login screen comes back. I'm not sent to desktop.

    I was still able to do what I wanted because top right icons are working and I was able to reboot from there, but I'm now unable to login locally. Even after the restore, the same issue remained.

    SSH continues to work as always. I'm able to open remote windows from scite, gnome-system-monitor, pcmanfm using PuttY + Xming. Apache and its Pihole WebUI also works. Tor, Nyx, etc, all working. Only the local GUI desktop doesn't login.

    There's also a popup that keeps repeat showing very quickly from a fraction of second. I managed to read it: "activation of network connection failed". I guess it's not related.

    How can I fix it? I stay months without using it locally, but some time I may need to.

  2. #2
    Join Date
    Jan 2006
    Location
    Sunny Southend-on-Sea
    Beans
    8,430
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: SSH works fine, desktop fails to login

    Quote Originally Posted by hikariws View Post
    But when I type my password it waits a second and the login screen comes back.
    The specific symptom is that your desktop session is crashing immediately, which is why you get the login screen again: the first thing that you get when the desktop manager restarts.

    Graphics driver would be a likely culprit. It might be some other setting, though. Trying to log in as another user would be a useful troubleshooting step, as would consulting the logs.

  3. #3
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: SSH works fine, desktop fails to login

    change to a different tty, then
    1. login
    2. sudo apt update
    3. sudo apt full-upgrade
    4. sudo ubuntu-drivers autoinstall

  4. #4
    Join Date
    Jul 2019
    Beans
    48

    Re: SSH works fine, desktop fails to login

    tnx for the help!

    Quote Originally Posted by TheFu View Post
    change to a different tty, then
    1. login
    2. sudo apt update
    3. sudo apt full-upgrade
    4. sudo ubuntu-drivers autoinstall
    That didn't work :/ "No drivers found for installation."

    I created a new user and it was immediately detected and got a new entry to the login screen. I logged and same issue happened.
    Last edited by hikariws; March 31st, 2021 at 04:46 AM.

  5. #5
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    7,703

    Re: SSH works fine, desktop fails to login

    I think I remember this can happen if you have run some graphical apps as root at some point. Try a tty console or ssh login, remove any Xauthority file, and chown any root-owned files back to yourself.

  6. #6
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: SSH works fine, desktop fails to login

    I haven't a clue, but perhaps reinstalling the login manager will help? Which should be used depends on the WM/DE installed. I use lightdm on my WM-only setups.

    The networking issue could be caused by the change from ifupdown to netplan. On the tty, do DNS and WAN pings work?

    The Cog's idea is good too. I've seen GUI logins fail because someone used sudo gedit very early in their GUI setup process. This created .config and some subdirectories and files with root ownership. If the gnome-DB is owned by root, but in your HOME, GUI logins can be blocked. The fact that non-GUI tty logins still work says this is a GUI issue. I'm a little concerned that creating a new user then logging in with that user account isn't working. That makes no sense.

  7. #7
    Join Date
    Jul 2019
    Beans
    48

    Re: SSH works fine, desktop fails to login

    On the tty, do DNS and WAN pings work?
    It's the DNS server. By WAN do u mean local network adapter, or router's WAN? Internet is working.

    I think I remember this can happen if you have run some graphical apps as root at some point. Try a tty console or ssh login, remove any Xauthority file, and chown any root-owned files back to yourself.

    Indeed, I have a Xauthority setting so I'm able to run sudo GUI apps over PuttY, specially scite. I could remove it to see if it's the cause, but I need it active.

    What's the best way to do it? I'm also concerned that it seems harder to solve than I expected.

  8. #8
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: SSH works fine, desktop fails to login

    Quote Originally Posted by hikariws View Post
    It's the DNS server. By WAN do u mean local network adapter, or router's WAN? Internet is working.

    Indeed, I have a Xauthority setting so I'm able to run sudo GUI apps over PuttY, specially scite. I could remove it to see if it's the cause, but I need it active.

    What's the best way to do it? I'm also concerned that it seems harder to solve than I expected.
    Code:
    sudo -H {name-of-program}
    Can your system ping 1.1.1.1 AND google.com? There's some sort of networking issue at some point. For some setups, DNS needs to work to resolve the hostname. If that fails, then authentication for different needs fails. A local login shouldn't fail, but if there are LDAP/AD accounts, those could fail if the credentials aren't cached.

    I always found running putty + some X/server problematic. The solution I ended up with was to run a small Linux VM and use the normal X/Server for all remote access needs. Of course, the other solution is to purchase a commercial X/Server which supports a broader range of needs than the Windows ports. I think the best X/Servers consolidated into just a few companies. They were ~ $200 when I last used them in the early 2000s. So ... I really don't know anything. From around 2010 - 2015, I used NX clients from Windows to connect into full desktops on Linux. Started with FreeNX, but it wasn't all that stable. Didn't like NoMachine's limitations, then found x2go and switched. Ran with that for a few years. It was very stable from Windows and from Linux workstations. I still use it when traveling, but inside the LAN, I'm on Linux workstations pretty much by default.

  9. #9
    Join Date
    Jan 2006
    Location
    Sunny Southend-on-Sea
    Beans
    8,430
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: SSH works fine, desktop fails to login

    Quote Originally Posted by hikariws View Post
    I created a new user and it was immediately detected and got a new entry to the login screen. I logged and same issue happened.
    Sounds like graphics driver/configuration issue, then. You've not said what hardware you're using.

  10. #10
    Join Date
    May 2010
    Beans
    3,247

    Re: SSH works fine, desktop fails to login

    Make sure there is free space and that the user is the owner of it's own $HOME

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •