X server doesn't work anymore. /etc/profile not sourced properly
by PreguntoYo from LinuxQuestions.org on (#6EW03)
Hello:
The PSU of this PC seems to be dying (it doesn't start unless you keep the power on button pressed), so I'll try to get help before it's too late. I have backups, BTW.
This weekend I installed Windows 10 AND Slackware 15.0 stable in my refurbished ThinkPad T440s. This laptop has never given me a problem (so far). The installation was very tedious. Then I upgraded everything, also the kernel to 5.15.117. Finally, I could start in runlevel 4 with a regular user, open Konsole, su - and install sbopkg and others from slackbuilds.
Everything seemed to be going ok, so I let the laptop going on alone. When I came back, the screen had gone into power-save mode, so I rolled my fingers over the touchpad and Plasma came back. Then I noticed that Plasma was "falling apart": icons had started disappearing from the menu. Uh-oh. I tried to shutdown, the menu wasn't working. I tried Ctrl-Alt-Del, no way. I changed to a console and shutoff the laptop from root.
Now when I restart, X-server locks and I can only see a black screen with a mouse pointer on it. I can open a console, so I've changed inittab to runlevel 3. I've tried also to startx from my regular account, results are:
Code:Linux 5.15.117.
-bash: fortune) command not found
-bash: file: command not found
marklar@darkstar:~$ whereis firefox
-bash: whereis: command not found
marklar@darkstar:~$ startx
-bash: command not found
marklar@darkstar:~$ alias
alias ls='/bin/ls $LS_OPTIONS'
alias mc='./usr/share/mc/bin/mc-wrapper.sh'
marklar@darkstar:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/games:/binIn this laptop my regular user account is called marklar (remember South Park?). Notice failed bash commands at the login, incomplete path, aliases which I hadn't defined... I think /etc/profile and /etc/profile.d do not source well.
I don't know very well how I have caused this, frankly. I installed, configured and changed a lot of things this weekend. I've tried the easiest solutions myself: am I in users group?. Correct permissions of /etc/profile, /etc/profile.d or the files inside?, permissions of home directory?. Something incorrect in ~/.bash_profile?. Etc.
This is my list of possible suspects:
I changed LANG in /etc/profile.d/lang.sh. Three times.
I edited UMASK and HOME_MODE in /etc/login.defs. Then reverted them back to their original settings (and it didn't work, also).
I edited umask in /etc/profile. Also reverted it back to umask 022.
I mention these because I'm worried that something may have gone misconfigured because I created this user account and used it with different encodings. The same about Plasma... I could start and exit it with this account at least two times before problems arised. I'm not very knowledgeable about PAM. Maybe my changes in /etc/profile, /etc/profile.d/lang.sh or /etc/logind.defs have misconfigured something?. I Don't know.
BTW, I created this regular account using adduser. This user is included in other groups.
I verified the downloaded Slackware iso before installing. I only install software from Slackware.com (updates) or slackbuilds. There are no third party packages in this system. Not even from Alien-BOB.
When all of this happened, I was installing KeePassX, yasbsm and yt-dlp from slackbuilds. I think this is irrelevant.
If I can't find a solution, I'll delete the account and will restore the backups again. I hope it will work afterwards. Anyway I prefer knowing what I've done wrong, if possible.
Thanks in advance for any help.
P. S.: as the PSU in this PC is failing, I may not be able to reply.
The PSU of this PC seems to be dying (it doesn't start unless you keep the power on button pressed), so I'll try to get help before it's too late. I have backups, BTW.
This weekend I installed Windows 10 AND Slackware 15.0 stable in my refurbished ThinkPad T440s. This laptop has never given me a problem (so far). The installation was very tedious. Then I upgraded everything, also the kernel to 5.15.117. Finally, I could start in runlevel 4 with a regular user, open Konsole, su - and install sbopkg and others from slackbuilds.
Everything seemed to be going ok, so I let the laptop going on alone. When I came back, the screen had gone into power-save mode, so I rolled my fingers over the touchpad and Plasma came back. Then I noticed that Plasma was "falling apart": icons had started disappearing from the menu. Uh-oh. I tried to shutdown, the menu wasn't working. I tried Ctrl-Alt-Del, no way. I changed to a console and shutoff the laptop from root.
Now when I restart, X-server locks and I can only see a black screen with a mouse pointer on it. I can open a console, so I've changed inittab to runlevel 3. I've tried also to startx from my regular account, results are:
Code:Linux 5.15.117.
-bash: fortune) command not found
-bash: file: command not found
marklar@darkstar:~$ whereis firefox
-bash: whereis: command not found
marklar@darkstar:~$ startx
-bash: command not found
marklar@darkstar:~$ alias
alias ls='/bin/ls $LS_OPTIONS'
alias mc='./usr/share/mc/bin/mc-wrapper.sh'
marklar@darkstar:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/games:/binIn this laptop my regular user account is called marklar (remember South Park?). Notice failed bash commands at the login, incomplete path, aliases which I hadn't defined... I think /etc/profile and /etc/profile.d do not source well.
I don't know very well how I have caused this, frankly. I installed, configured and changed a lot of things this weekend. I've tried the easiest solutions myself: am I in users group?. Correct permissions of /etc/profile, /etc/profile.d or the files inside?, permissions of home directory?. Something incorrect in ~/.bash_profile?. Etc.
This is my list of possible suspects:
I changed LANG in /etc/profile.d/lang.sh. Three times.
I edited UMASK and HOME_MODE in /etc/login.defs. Then reverted them back to their original settings (and it didn't work, also).
I edited umask in /etc/profile. Also reverted it back to umask 022.
I mention these because I'm worried that something may have gone misconfigured because I created this user account and used it with different encodings. The same about Plasma... I could start and exit it with this account at least two times before problems arised. I'm not very knowledgeable about PAM. Maybe my changes in /etc/profile, /etc/profile.d/lang.sh or /etc/logind.defs have misconfigured something?. I Don't know.
BTW, I created this regular account using adduser. This user is included in other groups.
I verified the downloaded Slackware iso before installing. I only install software from Slackware.com (updates) or slackbuilds. There are no third party packages in this system. Not even from Alien-BOB.
When all of this happened, I was installing KeePassX, yasbsm and yt-dlp from slackbuilds. I think this is irrelevant.
If I can't find a solution, I'll delete the account and will restore the backups again. I hope it will work afterwards. Anyway I prefer knowing what I've done wrong, if possible.
Thanks in advance for any help.
P. S.: as the PSU in this PC is failing, I may not be able to reply.