can't log into any account after installing KDE5 on FreeBSD 12.1

i can't sign into any account root or anyone i created before installing KDE
i booted system into single user shell and changed pw but it doesn't make any difference at all any help to log in to the desktop
1581220886266.png


1581221570980.png
 
Is the root directory a mount as rw?

Probably the simplistic approach is the best: delete the user and re-add the user.
 
I'd double check that your user's shell is actually installed and at the location specified. I've had issues before where I set a user's shell to zsh before I had installed it, forgot to install it, and couldn't log in. Similarly, I think errors occurring in a user's .profile file may also cause login to fail.

Have you tried logging in as that user in a TTY?
 
Why are you using the -y option if you're not using NIS?

Code:
     -y      Override passwd's checking heuristics and forces it into NIS
             mode.
 
Not trying to steal this thread, but I'm having the same issue. Installed freebsd 12.1, and was able to log in with no issues. I then proceeded to install Xorg, XCFE, KDE5 and SDDM. Whenever I try to boot into KDE5 or XCFE4, the system just hangs. Any tips or advice would be greatly appreciated.
 
After i enter my password and hit enter, the system hangs for about 10 seconds and appears as if though it will boot into KDE, a blackscreen flashes and then it goes back to the sddm login screen. This happens when i select the xfce session. If i select the plasma session, after i enter my password the screen freezes. Whenever I try to open a shell by typing "ctl+alt+f1" I get a bunch of distorted images, not a shell. I havent tried chrooting into they system, as I'm not familiar with freebsd. How can I bypass sddm login page and boot directly into a shell?

Thanks in advance
 
It sounds like something like dbus has not been enabled.

Options:
1. You can SSH into the machine (assuming you have another available, of course)
2. You can rename .startx to something else.
3. You can rename .xinitrc to something else.

Either 2 or 3 or both are used. I'm not all that familiar with KDE or sddm.

Have you read: https://www.freebsd.org/doc/handbook/x11-wm.html ?
 
Thanks for the help Mark.

Option one is out of the question, as I dont have another machine. I did read that portion of the handbook, but when I tried to rename .xinitrc to echo xfce4 or KDE5 I got the following error
"./xinitrc read-only file system". I then tried to edit the "xinitrc" file located at /usr/local/etc/X11/xinit/xinitrc and I got a message that the file is not "writeable". When typing the following commands, are you supposed to do them as regular user or as root:


"% echo ". /usr/local/etc/xdg/xfce4/xinitrc" > ~/.xinitrc"

Do you also include the "%" sign?
 
Sorry for the late reply.

The .xinitrc file must belong to you, so therefore you need to either create it while logged in as yourself or if you use root:
chown yourLoginName .xinitrc after you''ve created it using root.

Basically all the steps set out in the KDE handbook section (except mounting) are able to be performed by you. Of course, you should also be part of wheel group.

Ok, step by step.

1. What is your graphics card and what, if any, setup have you done for it?
Can you post the output of:
pciconf -lv


2. KDE requires /proc, so make sure that's mounted as per the handbook. Is it mounted?


3. KDE requires dbus and hald enabled. Have you set them in /etc/rc.conf?
That is they should appear as:
Code:
dbus_enable="YES"
hald_enable="YES"


4. You're using sddm, as per the handbook this also requires startup at boot, so is
Code:
sddm_enable="YES"
in /etc/rc.conf?

If it is, add a # before it:
Code:
#sddm_enable="YES"

(The purpose here is to remove sddm from the equation and focus on getting KDE working.)

5. If all of the above are yes, and the system has been rebooted, you can now use startx to manually start it after you log in to the console.
Do this on the command line:
echo "exec ck-launch-session startplasma-x11" > ~/.xinitrc

Once you've done this, type:
startx
 
Thanks for the step by step.

Here are the answers to your questions above:

1. GP107 [GeForce GTX 1050 Ti]. From what I've read in the handbook, freebsd is now moving away from a single "xorg.conf" file, and instead is implementing multiple conf.d files for: display, input devices, video cards, etc. I've created one for my video card.

2. I edited the /etc/fstab file to include the line required by KDE for proc to be mounted automatically.

3. dbus and hald are both enabled in the /etc/rc.conf file.

4. I'm having issues with this step. When the systems boots, it directly initiates sddm, as mentioned above, this is where I cant boot into the system at all. I've rebooted and selected option 2 in the boot options "single user boot" and this gets me into a shell, however, it appears that by doing this step it boots into a minimal system where I can't modify/edit files as regular user or root.
 
That worked. After mounting /, I was able to edit /etc/rc.conf file and comment out the “sddm “line and now I’m able to boot into a regular shell. As a regular user, I issued the “chown regular user .xinitrc” and did not get any errors. I then proceeded to issue “startx” and got the following error:

xauthority: time out in locking authority file /home/user/.Xauthority...the screen went black for about 3 minutes and the following error came back:

xinit: giving up
xinit: unable to connect to X server: socket is not connected

Waiting for x server to shut down...(II) server terminated successfully (0)

xinit: server error
xauth: /home/user/.Xauthority not writeable, changes will be ignored.

sounds like xorg.conf but no idea where to look.
 
What are the permissions of .Xauthority?
I think it might be wise to reset your permissions. You know your user name, so you should also know your group name.
(If you don't know your group name, stop now and ask before proceeding if you do not know how to discover it)

Issue these commands as root (su or sudo or log in)


chown -R your_user_name:your_group_name /home/your_user_name

Log out of root.

Now, log in as your normal user. If you used su or sudo you're back to that anyway.

As your normal user, type this:

Code:
script /tmp/chown.txt
cd ~

chown -R your_user_name:your_group_name .*
exit
(you will get a message about permission denied - disregard it)

The above steps run script to log your workings to the file /tmp/chown.txt. You then change directory to your home directory and then change the ownership of all the hidden files to you. Finally, you exit from the script program.
 
I did a quick google search on how to find out which group I’m part of and couldn’t find anything. I guess I’m asking how to find out which group is my user part of.
 
Can you show the output of ls -Fl in your home directory?

Or you could grep "your_user_name" /etc/passwd and show that output.
 
As my regular user I cd /home/user
Then
ls -Fl
Output: total 0

grep username /etc/passwd
Output: username:*: 1001:1001:username: /home/username:/bin/sh
 
Ok, just replace your_user_name with 1001 and your_group_name with 1001, for example:

chown -R 1001:1001 /home/your_user_name

and, of course:

chown -R 1001:1001 .*

Refer back to here: #17
 
Just ran as regular user (not root)

chown -R 1001:1001 /home/user
Output: chown: /home/user/ .Xauthority: Operation not permitted.

what is .Xauthority and what is it used for?
 
The reason is "user" should be your username.

In fact, do all of the following:

Code:
script /tmp/log.txt
su -
cd /home/your_user_name
ls -Fla
chown 1001:1001 .Xauthority
exit

Then post the output of /tmp/log.txt
 
Back
Top