You are not logged in.
I solved this one by myself, but would appreciate some clarification regarding the matter.
So I added similar to the following function to /etc/profile:
function 1tst() {
echo 'This is the function that prevents LightDM to login... :('
}
On the next reboot I was not able to login. After some trial/error and log digging... I found ~/.xsession-errors:
/etc/profile: line 47: `1tst': not a valid identifier
So it seems that when LightDM attempts to log in, it's using /bin/sh even though my user's default shell is:
$ getent passwd nrz
nrz:x:1000:1000::/home/nrz:/bin/bash
Presumably culprit is LightDM's session-wrapper script??
$ head -1 /etc/lightdm/Xsession
#!/bin/sh
I know it's not wise to start fn name with a digit, but let's just assume that I had a good reason, especially because bash does not complain about it.
Last edited by nrz (2018-11-30 01:00:12)
Offline
It's not "not wise" but "illegal" - even on bash.
https://www.gnu.org/software/bash/manua … efinitions
That bash let's one get away w/ it if it's *explicitly* invoked (ie. the shebang *has* to be /bin/bash, not /bin/sh even if sh is a symlink to bash) is no indicator that one is good to go.
It's an indicator that bash scripters generally don't read docs ;-)
One *could* alter the shebang, but really the only sane thing to do is to prepend an underscore "_"
Offline