# FreeBSD 10.2 KDE4 login error



## FreeBSDer009 (Dec 29, 2015)

I recently installed FreeBSD 10.2 and then installed KDE4 by following the documentation on the official BSD site, but I get the following error when I attempt to login to KDE4 when the system boots in run level 5:




 


What you don't see is that it rejects my password everytime even though it's right and leaves the username in the box while deleting the password in the password box. Then it doesn't login to the KDE desktop. What should I do now?


----------



## SirDice (Dec 29, 2015)

FreeBSD doesn't have "runlevels". 

Are you able to login on the console? Are you using a user account or root?


----------



## FreeBSDer009 (Dec 29, 2015)

SirDice said:


> FreeBSD doesn't have "runlevels".
> 
> Are you able to login on the console? Are you using a user account or root?



Yes I can login as the my standard user in the terminal and no I am not logging in as root into KDE4 because you should never login to the GUI as root especially when connected to the internet, since it would leave the system open to code hidden in websites that could corrupt the system as well as other malicious attacks.


----------



## FreeBSDer009 (Dec 30, 2015)

I found an error in my edit for the /etc/fstab file because I put proc instead of /proc originally, but I still can't login.


----------



## gofer_touch (Dec 30, 2015)

Can you paste the contents of your /etc/rc.conf file?


----------



## SirDice (Dec 30, 2015)

Also have a look in /var/log/messages and/or /var/log/Xorg.0.log and look for any errors.


----------



## FreeBSDer009 (Dec 30, 2015)

gofer_touch said:


> Can you paste the contents of your /etc/rc.conf file?



Yes there should be a screenshot attached to this that shows it. If not bear with me and I'll upload it to a photo hosting site, so that you can see it.


----------



## FreeBSDer009 (Dec 30, 2015)

SirDice said:


> Also have a look in /var/log/messages and/or /var/log/Xorg.0.log and look for any errors.



Yes here is the output of the last 30 lines of the file below. I see at least one line that hints at what the problem might be, but it should have duplicated because I attempted to login twice before rebooting to allow me to access this file in single user mode after remounting the root partition with read and write permissions as well as making the file system clean with fsck to allow me to remount it.


----------



## FreeBSDer009 (Dec 30, 2015)

SirDice said:


> FreeBSD doesn't have "runlevels".
> 
> Are you able to login on the console? Are you using a user account or root?



Just so you know I can login as root in the terminal too, but not in KDE4.


----------



## SirDice (Dec 30, 2015)

Please, simply login with ssh(1) and copy/paste the info we need. Images make it really difficult to quote.


----------



## FreeBSDer009 (Dec 30, 2015)

FreeBSDer009 said:


> Yes here is the output of the last 30 lines of the file below. I see at least one line that hints at what the problem might be, but it should have duplicated because I attempted to login twice before rebooting to allow me to access this file in single user mode after remounting the root partition with read and write permissions as well as making the file system clean with fsck to allow me to remount it.
> 
> View attachment 2874



It appears as though the hald_enable needed to be set in the rc.conf file because it was completely missing from the file, but now I get the errors shown below in the screenshot:





One being the kvm_getennvv failed, so I looked it up and found that I might need to run zpool scrub. However, I'm seeing that zpool scrub is for the zfs filesystem and I'm using ufs, so should I run it or not. As for the other errors I see innappropriate ioctl for device, which when I looked it up I found this answer and no solution if it is a problem and if it is I don't know perl except how to use it to run a perl script:

"When Perl opens a file, it checks whether or not the file is a TTY (so that it can answer the -T $fhfiletest operator) by issuing the TCGETS ioctl against it. If the file is a regular file and not a tty, the ioctl fails and sets errno to ENOTTY (string value: "Inappropriate ioctl for device"). As ysth says, the most common reason for seeing an unexpected value in $! is checking it when it's not valid -- that is, anywhere _other_ than immediately after a syscall failed, so testing the result codes of your operations is critically important.

If open actually did return false for you, and you found ENOTTY in $! then I would consider this a small bug (giving a useless value of $!) but I would also be very curious as to how it happened. Code and/or truss output would be nifty."

I have a book on perl, but I haven't got around to reading it to help me learn perl and I'm focusing on network administration not programming or computer science.

As for the last error "devd: notify_clients: send() failed; dropping unresponsive client". I suspect that is probably a result of the previous error and I don't know what to do about it either way.


----------



## gofer_touch (Dec 30, 2015)

Yep, you beat me to it. I suspected that

```
hald_enable="YES"
dbus_enabl="YES"
```

may not have been loaded. I remember somewhere reading that the recent versions of xorg won't need it but as far as I know a number of the desktop environments do.


----------



## gofer_touch (Dec 30, 2015)

You may also want to try `pkg upgrade -f` to ensure that KDE has all the recent/requested versions of the applications it needs to run. 

I know I've gotten bitten by KDE hiccups when installing many applications at the same time. Some applications get removed for whatever reason during install and then something fails to work as expected. This has happened for me with regard to VLC for instance. Its worth a shot.


----------



## FreeBSDer009 (Dec 30, 2015)

gofer_touch said:


> You may also want to try `pkg upgrade -f` to ensure that KDE has all the recent/requested versions of the applications it needs to run.
> 
> I know I've gotten bitten by KDE hiccups when installing many applications at the same time. Some applications get removed for whatever reason during install and then something fails to work as expected. This has happened for me with regard to VLC for instance. Its worth a shot.



I'll will do this and get back to you.


----------



## FreeBSDer009 (Dec 30, 2015)

SirDice said:


> Please, simply login with ssh(1) and copy/paste the info we need. Images make it really difficult to quote.



I don't think I can because I've tried in the past to ssh into VM's and it just won't connect, but I think it's because I'm not on my own network and I'm using the network provided as a courteousy at my apartment. However, I can switch to my own though, so maybe I will and do this from now on.


----------



## FreeBSDer009 (Dec 30, 2015)

gofer_touch said:


> You may also want to try `pkg upgrade -f` to ensure that KDE has all the recent/requested versions of the applications it needs to run.
> 
> I know I've gotten bitten by KDE hiccups when installing many applications at the same time. Some applications get removed for whatever reason during install and then something fails to work as expected. This has happened for me with regard to VLC for instance. Its worth a shot.



I tried this and I get the following error in the screenshot, so I don't know what to do now. However, I will look up the error and get back to you:


----------



## FreeBSDer009 (Dec 30, 2015)

FreeBSDer009 said:


> I tried this and I get the following error in the screenshot, so I don't know what to do now. However, I will look up the error and get back to you:
> 
> View attachment 2879



I looked up the error and found something about needing to make a package, but nothing that tells me how as far as I can tell. Does anyone have any suggestions.


----------



## youngunix (Dec 31, 2015)

*Problem #1:* your KDE login issue is probably due to an authorization problem or a missing .xinitrc. If you don't have that file, try the following (logged in as non-root): `echo "exec /usr/local/bin/startkde" > ~/.xinitrc"`
*Problem #2:* this link http://pkg.freebsd.org/freebsd:10:amd64/quarterly/All/pkg-1.6.1.txz does not exist, it should be http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/pkg-1.6.1.txz.


----------



## FreeBSDer009 (Dec 31, 2015)

youngunix said:


> *Problem #1:* your KDE login issue is probably due to an authorization problem or a missing .xinitrc. If you don't have that file, try the following (logged in as non-root): `echo "exec /usr/local/bin/startkde" > ~/.xinitrc"`
> *Problem #2:* this link http://pkg.freebsd.org/freebsd:10:amd64/quarterly/All/pkg-1.6.1.txz does not exist, it should be http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/pkg-1.6.1.txz.



1. I already added that line to the ~/.xinitrc file as shown here:



 

2. Not even fetch can find the record for that URL as shown below and using pkg doesn't seem to help when used with the combinations I've tried:



 

I know it goes the command the option and the argument, but even that seems to not work.


----------



## FreeBSDer009 (Dec 31, 2015)

FreeBSDer009 said:


> 1. I already added that line to the ~/.xinitrc file as shown here:
> 
> View attachment 2881
> 
> ...



It would seem as thought the last command from the output below is the right command because upgrade was a command used with pkg in the same manner, but it doesn't work either:


----------



## youngunix (Dec 31, 2015)

I am able to download the package from that site using ftp/wget, so fetch should work. I'm suspecting you have DNS issues _OR _from looking at that computer icon at the bottom of the VM, you don't have internet connection.

Please post the output of the following:
`ping -c 5 8.8.8.8
cat /etc/resolv.conf
cat /usr/local/etc/pkg.conf`

Also, does your VM have a hostname?


----------



## FreeBSDer009 (Dec 31, 2015)

youngunix said:


> I am able to download the package from that site using ftp/wget, so fetch should work. I'm suspecting you have DNS issues _OR _from looking at that computer icon at the bottom of the VM, you don't have internet connection.
> 
> Please post the output of the following:
> `ping -c 5 8.8.8.8
> ...



Here is the output of the ping command:





I'm not posting the output of the cat on /etc/resolv.conf, but rest assured it is a private ipv4 address in the 192.168.0.0-192.168.255.255 range.

The output of the cat on /usr/local/etc/pkg.conf is here:





Finally good call on the hostname because I didn't have one and wanted to see if BSD gave my machine a default hostname, like Linux. Now my computer has a hostname, but still won't let me login to the KDE desktop.


----------



## gofer_touch (Dec 31, 2015)

Strange. Why not let pkg automatically choose the repository instead of choosing one of the quarterlys? 

Also you can make SSHing into your VM easier by selecting "bridged adapter" in the Network tab. Your VM will then have its own ip assuming you are connected to a router that gives out addresses via DHCP. 

On a default install of 10.2, with default settings it seems weird that you would be getting these issues.


----------



## SirDice (Dec 31, 2015)

The error "No address record" means your DNS resolving isn't working. Double check your /etc/resolv.conf.


----------



## SirDice (Dec 31, 2015)

gofer_touch said:


> Why not let pkg automatically choose the repository instead of choosing one of the quarterlys?


The default of 10.2 is to use the quarterly packages.


> The default pkg(8) repository set in /etc/pkg/FreeBSD.conf now defaults to the quarterly package set. To use the latest branch (as was the previous default), the comment at the top of /etc/pkg/FreeBSD.conf explains how to disable the default repository and specify an alternative repository. [r285830] (Sponsored by The FreeBSD Foundation)


https://www.freebsd.org/releases/10.2R/relnotes.html#releng-changes


----------



## FreeBSDer009 (Dec 31, 2015)

gofer_touch said:


> Strange. Why not let pkg automatically choose the repository instead of choosing one of the quarterlys?
> 
> Also you can make SSHing into your VM easier by selecting "bridged adapter" in the Network tab. Your VM will then have its own ip assuming you are connected to a router that gives out addresses via DHCP.
> 
> On a default install of 10.2, with default settings it seems weird that you would be getting these issues.



I think I know why now and it might be how I added my user to the wheel group because I'm not sure if I used a similiar command to the following, like pw user add jdoe -G wheel instead of adding them during installation or using something similiar to the following:

This _adds_ the group to a user (without removing any existing group memberships):
pw groupmod wheel -m jdoe

To remove the group membership:
pw groupmod wheel -d jdoe

However, I think I redid the install for KDE and put my user in the wheel group during the installation.


----------



## youngunix (Dec 31, 2015)

Would you please start over, because you are creating quite a confusion all over the forums.
First, install FreeBSD without a desktop environment, set it up correctly and make sure you are using the proper documentation to have a working system.
Second, use one DE and if you are looking for one that is light try (ONE not ALL of them) x11-wm/xfce4 or x11/lxde-meta.
Finally, tackle one task at a time and don't rush everything at once, it's hard for members to help if they don't know what your goals are or if you are not providing enough information. Also, stay away from KDE, it's bloated and problematic.


----------



## FreeBSDer009 (Jan 3, 2016)

youngunix said:


> Would you please start over, because you are creating quite a confusion all over the forums.
> First, install FreeBSD without a desktop environment, set it up correctly and make sure you are using the proper documentation to have a working system.
> Second, use one DE and if you are looking for one that is light try (ONE not ALL of them) x11-wm/xfce4 or x11/lxde-meta.
> Finally, tackle one task at a time and don't rush everything at once, it's hard for members to help if they don't know what your goals are or if you are not providing enough information. Also, stay away from KDE, it's bloated and problematic.



I'm just trying to get one to work for me and maybe I did something wrong, but maybe the documentation is missing a few pieces of information to or I need to stay away from sources outside of this site and forum because apparently their getting me into trouble. I had kinda forgotton about being careful to check documentation and man pages to verify a command does what they claim it will do, so my appologies and bear with me as I learn what I actually need to do to get these working and find one that best suites my needs or application. So far I'm excited to finally be learning UNIX and seeing the difference compared to Linux. FreeBSD is closer to giving me the kind of Desktop Experience that Ubuntu provides me for Linux considering I have not had the privilege to use BSD yet or a true to original UNIX OS. I must say that Windows spoiled me a little, but also didn't teach me anything about what to do what things don't work out the box too. Even though, I started with MS DOS on the PC and only slightly used early versions of Windows. I'm sure my recent Associates Degree in Network Administration for UNIX/Linux Database Administration is helping too. My Minor in Programming is not helping yet, but thank goodness most UNIX config files are text based with directive and easy to understand lines that can be added or customized.


----------



## FreeBSDer009 (Jan 3, 2016)

youngunix said:


> Would you please start over, because you are creating quite a confusion all over the forums.
> First, install FreeBSD without a desktop environment, set it up correctly and make sure you are using the proper documentation to have a working system.
> Second, use one DE and if you are looking for one that is light try (ONE not ALL of them) x11-wm/xfce4 or x11/lxde-meta.
> Finally, tackle one task at a time and don't rush everything at once, it's hard for members to help if they don't know what your goals are or if you are not providing enough information. Also, stay away from KDE, it's bloated and problematic.



I just finally started over from the beginning by installing FreeBSD 10.2 today and then backing up at that point. Then I attempted to install each desktop from after the point of installing the OS and None of them would install or work for me except KDE and MATE, which still won't let me login. I can't find an answer as to why none them will allow me to install them or login either. I'm getting errors while using pkg about the package not being available though, but I don't know how to fix this. Please help if you can and if it helps I will post the code by ssh from terminal into the VM's for each thread corresponding to the respective Desktop Environment it is related to. I tried to ssh into the VM's with a bridge connection, but it's not helping and I can't think of why it's not. That's all. Please help if you can. I checked the /var/log/messages and didn't see any noticeable errors either.


----------



## chrbr (Jan 3, 2016)

Dear FreeBSDer009,


FreeBSDer009 said:


> I started with MS DOS on the PC and only slightly used early versions of Windows.


In this case do not worry and remember the old times. Just start make things working which do not need any fancy GUI because this is the backbone of the system. An obsolete PC which someone throws away because Wxxx is too slow is usually more than enough. May be this is better than a VM.


FreeBSDer009 said:


> FreeBSD is closer to giving me the kind of Desktop Experience that Ubuntu provides me for Linux considering I have not had the privilege to use BSD yet or a true to original UNIX OS.


I am not sure. In my opinion the desktop stuff is application. It should not differ too much between systems - if the systems work under the hood. Please do not want to achieve too much in a short time. Good luck, success and patiance .


----------



## gofer_touch (Jan 3, 2016)

Would PC-BSD be an option for you? You get a desktop environment out of the box on install. From there you can check out some of the config files to see whats in them. Its a good way to learn.

Although there are easier steps, this tutorial will give you a working FreeBSD desktop with a GUI.
http://www.bsdnow.tv/tutorials/the-desktop


----------



## tankist02 (Jan 4, 2016)

My personal favorite to configure FreeBSD as desktop is this guide: https://cooltrainer.org/a-freebsd-desktop-howto/
Another option is to try this port: http://www.freshports.org/sysutils/desktop-installer/


----------



## gofer_touch (Jan 4, 2016)

I second the cooltrainer guide! It is a very nicely written. Although some of it might be overkill if one is looking for a very simple desktop set up without all the bells and whistles. The desktop-installer works sometimes and sometimes it doesn't. I actually tried to use it today with KDE and its not always as straightforward. Last time I tried it with Xfce, it worked however.


----------



## FreeBSDer009 (Jan 6, 2016)

gofer_touch said:


> Would PC-BSD be an option for you? You get a desktop environment out of the box on install. From there you can check out some of the config files to see whats in them. Its a good way to learn.
> 
> Although there are easier steps, this tutorial will give you a working FreeBSD desktop with a GUI.
> http://www.bsdnow.tv/tutorials/the-desktop



Maybe, although I don't mind having to configure if stuff isn't setup out of the box. The main problem I'm facing is that the package source links have changed, so pkg doesn't know where to find the files and I don't know how to fix this yet.


----------



## FreeBSDer009 (Apr 5, 2016)

The following is what I need to do to install pkg, so I can install any of the desktop enviroments from now on for some reason and hopefully it doesn't get anymore complicated than what follows:


*


		Code:
	

4.4.1. Getting Started with pkg

FreeBSD includes a bootstrap utility which can be used to download and install pkg, along with its manual pages.

To bootstrap the system, run:
# /usr/sbin/pkg

For earlier FreeBSD versions, pkg must instead be installed from the Ports Collection or as a binary package.

To install the port, run:
# cd /usr/ports/ports-mgmt/pkg
# make
# make install clean

When upgrading an existing system that originally used the older package system, the database must be converted to the new format, so that the new tools are aware of the already installed packages. Once pkg has been installed, the package database must be converted from the traditional format to the new format by running this command:
# pkg2ng

Note:
This step is not required for new installations that do not yet have any third-party software installed.

Important:
This step is not reversible. Once the package database has been converted to the pkg format, the traditional pkg_* tools should no longer be used.

Note:
The package database conversion may emit errors as the contents are converted to the new version. Generally, these errors can be safely ignored. However, a list of third-party software that was not successfully converted will be listed after pkg2ng has finished and these applications must be manually reinstalled.

To ensure that the FreeBSD Ports Collection registers new software with pkg, and not the traditional packages format, FreeBSD versions earlier than 10.X require this line in /etc/make.conf:
WITH_PKGNG=    yes

By default pkg uses the FreeBSD package mirrors. For information about building a custom package repository, see Section 4.6, “Building Packages with Poudriere”

Additional pkg configuration options are described in pkg.conf(5).

Usage information for pkg is available in the pkg(8) manual page or by running pkg without additional arguments.

Each pkg command argument is documented in a command-specific manual page. To read the manual page for pkg install, for example, run either of these commands:
# pkg help install
# man pkg-install

The rest of this section demonstrates common binary package management tasks which can be performed using pkg. Each demonstrated command provides many switches to customize its use. Refer to a command's help or man page for details and more examples.

*


----------

