You are not logged in.

#1 2018-01-14 13:19:06

redart
Member
Registered: 2016-12-03
Posts: 19

[SOLVED] tty1 login loop

Hi All,

Been messing around with my new Arch install and managed to get myself into a login loop, but only as User on tty1. 

Can login as root on tty1, and can login on all the other ttys as either root or user, just not tty1.

No error message, just "Last login on ..." and then it goes back to login prompt.

I had the system set up to login automatically and start xfce4 (no display manager).

Was trying to revert back to a standard "login to shell prompt" setup when I got stuck.

Can anyone suggest which file I might have messed up ?. 

Thanks.

Last edited by redart (2018-01-14 14:42:23)

Offline

#2 2018-01-14 13:22:56

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,543
Website

Re: [SOLVED] tty1 login loop

Not unless you provide your shell configs (.bash_profile or .profile and .bashrc or other shell rc).

I'd bet my lunch money, however, that you were trying to enable autostarting of X and you have a typo.  This kind of backgronud on what you were changing would also be helpful.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2018-01-14 13:34:14

redart
Member
Registered: 2016-12-03
Posts: 19

Re: [SOLVED] tty1 login loop

Thanks Trilby. 

You got in before I had a chance to edited my post. here's my .bash_profile

#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
  exec startx -- vt1 &> /dev/null
fi

and .bashrc

#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '

Last edited by redart (2018-01-14 13:49:57)

Offline

#4 2018-01-14 13:38:33

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,543
Website

Re: [SOLVED] tty1 login loop

Please edit your post to use code tags not color tags.  That's completely unreadable on some forum themes.

But that* is almost certainly the problem there.  You can remove that and the immediate problem will be resolved.

If you want to autostart X, then run startx from the tty first and get that working.  And don't redirect error output to the /dev/null if you want to figure out what is wrong.

You should still have an xorg log though - but again, betting tomorrow's lunch money I suspect your xorg log says it exited successfully.  If so, that's because you have not properly edited your ~/.xinitrc.

*edit: "that" = the conditional block in your bash_profile that I rightly predicted.  I originally wrote this before I saw your edits adding other content to the post I was replying to.

Last edited by Trilby (2018-01-14 14:17:21)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2018-01-14 14:00:48

redart
Member
Registered: 2016-12-03
Posts: 19

Re: [SOLVED] tty1 login loop

Trilby wrote:

But that is almost certainly the problem there.  You can remove that and the immediate problem will be resolved.

Remove what !?

Offline

#6 2018-01-14 14:03:09

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] tty1 login loop

redart wrote:
Trilby wrote:

But that is almost certainly the problem there.  You can remove that and the immediate problem will be resolved.

Remove what !?

This:

if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
  exec startx -- vt1 &> /dev/null
fi

(edit) Once you have tty login working, try "startx" to start X. But as Trilby says, I'll bet this will just return you to the bash prompt because something is broken in your .xinitrc.

Last edited by 2ManyDogs (2018-01-14 14:08:21)

Offline

#7 2018-01-14 14:40:12

redart
Member
Registered: 2016-12-03
Posts: 19

Re: [SOLVED] tty1 login loop

Thank you both.   

That did indeed fix the problem.

And the reason startx wasn't working was, as predicted, my .initrc was wrong, but only because I'd commented out my

exec startxfce4

line to prevent autostarting the DE, which, along with autologin, had previously been working.

All part of the learning process smile .  Thanks again for your help.

Last edited by redart (2018-01-14 14:47:50)

Offline

Board footer

Powered by FluxBB