I rebooted my laptop and my user can’t login under any session type (password/username are valid and accepted). Root can log in fine - spinner shows and then KDE appears. User has password accepted, but the little spinning comet never appears and am dumped back to login screen. Tried checking all partitions with 2017 gparted (booted from a USB drive). Trying to get to a console to to a user login to see if errors are listed.
Does this sound at all familiar?
Thank You!
[edit]
OK - I think I got it - something “unfindable” in my .bashrc - trying to source a missing file in an if … fi bash statement.
That seems a tad buggy. Plasma should just throw an error and log me in anyway.
(I need to stop using 4 letter words when I’m completely flummoxed… haha!)
All I know is this fixed it. I logged in as root, ctrl-alt-F3’d into a tty (thank you linux classes on youtube), and vi’d the user’s .bashrc, commented out the offending “if … fi” statement (which just called a profile file I had removed), and now user can login just fine.
User couldn’t log in even at a tty because system would say it couldn’t find that profile file, and then it would dump user back at the “logon:” statement.
Thank You!!! It’s wonderful having this community!!!
Oops, I didn’t understand at first… I don’t think I’ve ever edited ~/.profile. I’ll look…
No, there’s only a “test … PROFILEREAD …” statement in there (default).
So I guess when you login to KDE, it runs .bashrc. Hmmm…
I guess it makes sense to read ~/.bashrc when KDE spins-up because source, PATH, etc. statements are in there for software you may have installed that is callable by KDE mouseclicks - but it seems like preventing a login is not very linux-newbie friendly (hence the comment about “semi-buggy behavior”).
Also, for at least one of the login splash screens, there’s no explicit option to do a console login - although if you know about ctrl+alt+F* tty access, that’s not really necessary? Still, what about newbies? Maybe that and basic vi editing should be on the driver’s license exam? rotfl!
Hi Malcom - I guess I’m missing something here… if I uncomment the if … fi lines in ~/.bashrc which refer to EMS.profile, then user can’t login either in a desktop or console. I have removed that EMS.profile and the system complains it doesn’t exist as the cause of non-login.
~./profile
# Sample .profile for SuSE Linux
# rewritten by Christian Steinruecken <cstein@suse.de>
#
# This file is read each time a login shell is started.
# All other interactive shells will only read .bashrc; this is particularly
# important for language settings, see below.
test -z "$PROFILEREAD" && . /etc/profile || true
# Most applications support several languages for their output.
# To make use of this feature, simply uncomment one of the lines below or
# add your own one (see /usr/share/locale/locale.alias for more codes)
# This overwrites the system default set in /etc/sysconfig/language
# in the variable RC_LANG.
#
#export LANG=de_DE.UTF-8 # uncomment this line for German output
#export LANG=fr_FR.UTF-8 # uncomment this line for French output
#export LANG=es_ES.UTF-8 # uncomment this line for Spanish output
# Some people don't like fortune. If you uncomment the following lines,
# you will have a fortune each time you log in ;-)
#if -x /usr/bin/fortune ] ; then
# echo
# /usr/bin/fortune
# echo
#fi
~/.bashrc (most default comments deleted; also, the offending if … fi lines are commented out - but you can see what they were doing)
# Sample .bashrc for SuSE Linux
# Copyright (c) SuSE GmbH Nuernberg
# There are 3 different types of shells in bash: the login shell, normal shell
# and interactive shell. Login shells read ~/.profile and interactive shells
# read ~/.bashrc; in our setup, /etc/profile sources ~/.bashrc - thus all
test -s ~/.alias && . ~/.alias || true
#if -f /OSS/Data/users/00_GCMs/00_UEMS/uems/etc/EMS.profile ] ; then
# . /OSS/Data/users/00_GCMs/00_UEMS/uems/etc/EMS.profile
#fi
#echo "Setting up INTEL FORTRAN..."
#source /opt/intel/bin/compilervars.sh intel64
#echo "Done setting up INTEL FORTRAN!"
unset LD_LIBRARY_PATH
source /home/patti/vapor-2.6.0/bin/vapor-setup.sh
cal
> bash -vx PlasmaLogin_bashrc
# Sample .bashrc for SuSE Linux
# Copyright (c) SuSE GmbH Nuernberg
if -f /OSS/Data/users/00_GCMs/00_UEMS/uems/etc/EMS.profile ] ; then
. /OSS/Data/users/00_GCMs/00_UEMS/uems/etc/EMS.profile
fi
+ '' -f /OSS/Data/users/00_GCMs/00_UEMS/uems/etc/EMS.profile ']'
test -s ~/.alias && . ~/.alias || true
+ test -s /home/XXX/.alias
+ true
>
But, forcing the execution of the non-existent file only raises a “file-not-found” error:
> bash -vx PlasmaLogin_bashrc-002
# Sample .bashrc for SuSE Linux
# Copyright (c) SuSE GmbH Nuernberg
if -f /OSS/Data/users/00_GCMs/00_UEMS/uems/etc/EMS.profile ] ; then
. /OSS/Data/users/00_GCMs/00_UEMS/uems/etc/EMS.profile ; else
echo "Do it anyway" ; . /OSS/Data/users/00_GCMs/00_UEMS/uems/etc/EMS.profile
fi
+ '' -f /OSS/Data/users/00_GCMs/00_UEMS/uems/etc/EMS.profile ']'
+ echo 'Do it anyway'
Do it anyway
+ . /OSS/Data/users/00_GCMs/00_UEMS/uems/etc/EMS.profile
PlasmaLogin_bashrc-002: line 6: /OSS/Data/users/00_GCMs/00_UEMS/uems/etc/EMS.profile: No such file or directory
test -s ~/.alias && . ~/.alias || true
+ test -s /home/XXX/.alias
+ true
>
The original question: “Why is a KDE login session calling $HOME/.bashrc ?” is still not answered.
Inspecting ‘/etc/profile’ only reveals that, if the login is via SSH then, ‘/etc/profile’ will call ‘$HOME/.bashrc’ .
[HR][/HR]Or, could it be that, the EMS profile exists but, isn’t readable for the user logging in?
If this is true then, the correct Bash test should be ‘-r’ in place of ‘-f’.