Best (and Most Correct) Way to Run FreeBSD for Desktop

And where can I find documentation on sddm, and how to set up black-theme?

Also, the built-in help for KDE in my localized version is from 2018. There are links to online documentation, but how do you tell what applies to FreeBSD from things that only apply to Linux?
Sometimes, the documentation includes a FreeBSD-specific section. If it doesn't - I play with the .conf file a bit, and make an educated guess about where to tell it to look for themes. But I do agree with Menelkir , if KDE offers a config module (I do bother to compile those from ports) for the stuff, try that first. :cool:
 
Here are preliminary instructions I typed up for installing KDE on FreeBSD. Since I am a noob, I will need these instructions looked over with a fine-toothed comb by the community. The more people who can comment on these instructions, the better! Even if you’re the third person in a row to say the instructions look correct, I will find your comment helpful. These instructions apply to computers with integrated Intel graphics.

Instructions for Installing KDE on FreeBSD (Rough Draft)
  1. Enter the superuser/root account by entering % su and the password for the root account. Note that the command prompt on the shell (%, $, #, etc.) is dependent on what user is currently logged in. Therefore, the % should not actually be typed out. Once in the root account, the command prompt will be #.
  2. Run # pkg install -y kde5 sddm xorg drm-kmod firefox
  3. Enter the easy editor to edit the file /etc/fstab by entering the following command: # ee /etc/fstab
  4. Once in the easy editor, on new lines, enter the following two lines:
    fdesc /dev/fd fdescfs rw 0 0 proc /proc procfs rw 0 0
    (See post #33)
  5. Make sure to hit Enter so the file starts on a new line after saving.
  6. Save and exit the easy editor by pushing Esc and following the prompts to save and exit.
  7. Run # mount /dev/fd
  8. Run # mount /proc
  9. Enter the easy editor to edit the file /etc/rc.conf by entering the following command: # ee /etc/rc.conf
  10. Once in the easy editor, on a new line, enter the following line:
    kld_list="/boot/modules/i915kms.ko"
  11. Make sure to hit Enter so the file starts on a new line after saving.
  12. Save and exit the easy editor by pushing Esc and following the prompts to save and exit. The KMS driver should now be set up.
  13. Go ahead and load the drm driver. Run # kldload /boot/modules/i915kms.ko
  14. Run # sysrc dbus_enable="YES" && service dbus start
  15. Run # sysrc sddm_enable="YES" && service sddm start
  16. Reboot by running # shutdown -r now
  17. If you chose not to reboot, enter # exit to leave the superuser account
  18. When logging in, avoid the Plasma (Wayland) … default that's presented by sddm – for Plasma, Wayland is not yet reliable.

Questions:
  1. What does the -y do in step 2? Should I delete it?
  2. Why did mer say there are two lines I should add for step #4? The FreeBSD Handbook says to only mount /proc (the second line), not /dev/fd as well.
  3. Should /etc/fstab start on a new line (step #5)?
  4. According to astyle in post #23, there is “no need to run # kldload /boot/modules/i915kms.ko if you have the kldlist line in /etc/rc.conf as per the wiki.” Is this true? Should step #13 be removed?
  5. Do steps #14 and #15 do the same things as adding the lines
    sddm_enabled="YES"
    dbus_enabled="YES"
    to the file /etc/rc.conf? If so, is one method better than the other?
  6. What exactly is the final step talking about regarding "Wayland" (taken from KDE’s Wiki)?
  7. What’s the sddm setup GVitaliy was talking about (in post #34, for example)? Is it something I should do as well?
  8. Assuming KDE successfully installed, how do I start it? Do I enter the command % startx?
I will be erasing Ubuntu on my laptop relatively soon and installing FreeBSD again. Shortly thereafter, I will install KDE. This might not be for a week or longer, as I want to reread The FreeBSD Handbook and the beginning chapters of Absolute FreeBSD, 3rd Edition. Thank you to everyone who has responded so far! I will post an update when I have KDE installed.
 
  • According to [FONT=monospace]astyle[/FONT] in post #23, there is “no need to run # kldload /boot/modules/i915kms.ko if you have the kldlist line in /etc/rc.conf as per the wiki.” Is this true? Should step #13 be removed?
  • Do steps #14 and #15 do the same things as adding the lines
    sddm_enabled="YES"
    dbus_enabled="YES"
    to the file /etc/rc.conf?
The answer to above is yes, correct.

As long as you know that # sysrc sddm_enable="YES" && service sddm start is in fact the same thing as ( adding the line sddm_enable="YES" to /etc/rc.conf and rebooting), you can just pick one, and do it just once, no need to repeat that step in its many variants.

I run Plasma Wayland as per developer blog at euroquis.nl, but that's without SDDM - the two don't play well with each other at time of this post. I did my homework on how to make that work, and I have the patience with shortcomings of such bleeding-edge stuff.

Assuming KDE successfully installed, how do I start it? Do I enter the command % startx?
Nah, just reboot, get to SDDM, enter your login credentials, and select Plasma (not Plasma Wayland) session from the drop-down list.
 
how to set up black-theme?

<https://www.freshports.org/x11-themes/sddm-freebsd-black-theme/#message> suggests editing a file however this instruction is probably redundant if you install:


Here, without editing the file:

1634574910526.png

Instructions for Installing KDE in FreeBSD (Rough Draft)


Again, edition of /etc/fstab is not required for KDE Plasma.


Not required.
 
The answer to above is yes, correct.

As long as you know that # sysrc sddm_enable="YES" && service sddm start is in fact the same thing as ( adding the line sddm_enable="YES" to /etc/rc.conf and rebooting), you can just pick one, and do it just once, no need to repeat that step in its many variants.

I run Plasma Wayland as per developer blog at euroquis.nl, but that's without SDDM - the two don't play well with each other at time of this post. I did my homework on how to make that work, and I have the patience with shortcomings of such bleeding-edge stuff.


Nah, just reboot, get to SDDM, enter your login credentials, and select Plasma (not Plasma Wayland) session from the drop-down list.
Yes to removing step #13 and yes to steps #14 and #15 doing the same thing as entering the lines
sddm_enabled="YES"
dbus_enabled="YES"
to the file /etc/rc.conf?

<https://www.freshports.org/x11-themes/sddm-freebsd-black-theme/#message> suggests editing a file however this instruction is probably redundant if you install:



Here, without editing the file:

View attachment 11754





Again, edition of /etc/fstab is not required for KDE Plasma.



Not required.
You're saying those two lines mer mentioned in /etc/fstab aren't necessary? What about mer saying "like enabling/disabling d-bus, you may lose some functionality by not having them"? Or Vull saying he'd "require it" because he's using LibreOffice? I am planning on using LibreOffice as well.
 
DBUS needs to run in order for KDE to run. Disabling DBUS - not impossible, but not recommended - I'd suggest first getting KDE to run, period, and get comfortable doing that, before you mess with DBUS.

You're saying those two lines [FONT=monospace]mer[/FONT] mentioned in /etc/fstab aren't necessary?
What mer mentions is overkill for a simple use case like yours. Won't hurt anything to add those 2 lines, but pointless for your use case. Get KDE running first, and then worry about OpenOffice / LibreOffice.
 
astyle, since you say it won't "hurt anything to add those 2 lines" -- and I am planning on using LibreOffice -- I think I may keep those lines in there. I think LibreOffice is used by many people who want to install KDE.

grahamperrin, I understand the sentiment, but isn't LibreOffice something many people plan to install right away? As astyle says above, it can't hurt to add those 2 lines. Perhaps adding a note as to why I'm including those instructions (such as, "To use LibreOffice...") would be helpful.

To everyone: How do the rest of my instructions look? Look at my other questions if you can. If there is a minor or major error anywhere, please let me know!
 
Questions:
  1. What does the -y do in step 2? Should I delete it?
  2. Why did mer say there are two lines I should add for step #4? The FreeBSD Handbook says to only mount /proc (the second line), not /dev/fd as well.
  3. Should /etc/fstab start on a new line (step #5)?
  4. According to astyle in post #23, there is “no need to run # kldload /boot/modules/i915kms.ko if you have the kldlist line in /etc/rc.conf as per the wiki.” Is this true? Should step #13 be removed?
  5. Do steps #14 and #15 do the same things as adding the lines
    sddm_enabled="YES"
    dbus_enabled="YES"
    to the file /etc/rc.conf? If so, is one method better than the other?
  6. What exactly is the final step talking about regarding "Wayland" (taken from KDE’s Wiki)?
  7. What’s the sddm setup GVitaliy was talking about (in post #34, for example)? Is it something I should do as well?
  8. Assuming KDE successfully installed, how do I start it? Do I enter the command % startx?
I will be erasing Ubuntu on my laptop relatively soon and installing FreeBSD again. Shortly thereafter, I will install KDE. This might not be for a week or longer, as I want to reread The FreeBSD Handbook and the beginning chapters of Absolute FreeBSD, 3rd Edition. Thank you to everyone who has responded so far! I will post an update when I have KDE installed.
1. as per pkg-install(8) manpage: "-y, --yes Assume yes when asked for confinrmation before package installation." so, pkg does not ask for confirmation and presumes you agree with anything.
2. no idea
3. does not need to start nor end with a new line
4. and 5. alredy solved by astyle
6. can you please provide a link?
7. he probably meant just installing and enabling sddm in rc.conf
8. if successfully installed, you should be able to run it via startx xor (you chose to use sddm) it will be launched by sddm.
 
1. as per pkg-install(8) manpage: "-y, --yes Assume yes when asked for confinrmation before package installation." so, pkg does not ask for confirmation and presumes you agree with anything.
2. no idea
3. does not need to start nor end with a new line
4. and 5. alredy solved by astyle
6. can you please provide a link?
7. he probably meant just installing and enabling sddm in rc.conf
8. if successfully installed, you should be able to run it via startx xor (you chose to use sddm) it will be launched by sddm.
1. That's what I thought. Thanks. I couldn't find the information on the manpage.
2. It would be nice if someone could look into this before I add both lines.
3. Thanks, but I'm guessing it couldn't hurt?
4. I was looking for confirmation on question #4. Do you think step #13 should be removed?
5. Thanks. It's my understanding the two methods are equal.
6. https://community.kde.org/FreeBSD/Setup#Quick_start (step #4 under "KDE and the rest")
7. Is this sddm setup unnecessary for me?
8. Since I am using sddm, how exactly does that work? Do I still have to login to FreeBSD, or does sddm show up instead of the FreeBSD screen? What credentials do I provide to sddm? My regular username and password?

Thank you, matt_k, for answering these questions.

To everyone: Please look over my instructions for installing KDE and let me know if you find any major or minor errors. Link to instructions: <https://forums.freebsd.org/threads/...-to-run-freebsd-for-desktop.82392/post-537438>
 
The instructions alone have the potential to confuse people because there are contractions. Better to re-title the instructions, to not suggest that they're for KDE; and to have a separate section for things that are not KDE.
 
3. Thanks, but I'm guessing it couldn't hurt?
4. I was looking for confirmation on question #4. Do you think step #13 should be removed?
6. https://community.kde.org/FreeBSD/Setup#Quick_start (step #4 under "KDE and the rest")
7. Is this sddm setup unnecessary for me?
8. Since I am using sddm, how exactly does that work? Do I still have to login to FreeBSD, or does sddm show up instead of the FreeBSD screen? What credentials do I provide to sddm? My regular username and password?

3. no, it won't hurt, it does not matter
4. well, you are adding the kld_list line to rc.conf, right? That means that the kernel module will be loaded at boot. The kernel module is not loaded right after you added the line to rc.conf, because the rc script (which reads the contents of /etc/rc.conf) runs at boot time. So you load the kernel module manually with kldload, so you can continue without rebooting. Or you reboot and then you don't need to do that manually, but why would you reboot for such a trivial thing? This is not Windows XP.
6. He means to check in the sddm "greeting menu" if you have wayland selected or not. Wayland does not work yet, so you check in sddm if you have X11 selected, you dont want Wayland. You would immediately notice that even after entering good login and pass, sddm would not log you in with Wayland selected.
7. I don't know, do you want to use sddm or not?
8. If you are using sddm and you added sddm_enable to rc.conf, then it should start automatically after system reboot(*) and it should greet you with login: and password: prompts. You enter your credentials as usual. KDE should start. This is not different than any linux distribution you've ever used. You are using exactly the same programs (kde, sddm) as you would on linux, so the behavior is the same.
again, you don't need to reboot after doing sddm_enable=YES in rc.conf. You can run it manually by invoking service sddm start. On next reboot though, it will be run by rc automatically.
 
3. no, it won't hurt, it does not matter
4. well, you are adding the kld_list line to rc.conf, right? That means that the kernel module will be loaded at boot. The kernel module is not loaded right after you added the line to rc.conf, because the rc script (which reads the contents of /etc/rc.conf) runs at boot time. So you load the kernel module manually with kldload, so you can continue without rebooting. Or you reboot and then you don't need to do that manually, but why would you reboot for such a trivial thing? This is not Windows XP.
6. He means to check in the sddm "greeting menu" if you have wayland selected or not. Wayland does not work yet, so you check in sddm if you have X11 selected, you dont want Wayland. You would immediately notice that even after entering good login and pass, sddm would not log you in with Wayland selected.
7. I don't know, do you want to use sddm or not?
8. If you are using sddm and you added sddm_enable to rc.conf, then it should start automatically after system reboot(*) and it should greet you with login: and password: prompts. You enter your credentials as usual. KDE should start. This is not different than any linux distribution you've ever used. You are using exactly the same programs (kde, sddm) as you would on linux, so the behavior is the same.
again, you don't need to reboot after doing sddm_enable=YES in rc.conf. You can run it manually by invoking service sddm start. On next reboot though, it will be run by rc automatically.
Thanks.

7. I want to use sddm, but is all the setup stuff GVitaliy was talking about earlier in this thread (see page 2, for example) really necessary? It seemed kind of advanced to me, and I wasn't really sure what they were doing.
 
Thanks.

7. I want to use sddm, but is all the setup stuff GVitaliy was talking about earlier in this thread (see page 2, for example) really necessary? It seemed kind of advanced to me, and I wasn't really sure what they were doing.
If you actually read what GVitaliy wrote - he's got some of the same questions as you. He found some different info than you, and was trying to make sense of it. I'd like to reiterate that the Handbook is the place to get started. Any outside info that you find - it has to line up with that Handbook online.

I guess a good way to visualize that is having both instruction sets side-by-side. Then you'll see where different lines of code go, and how to mix them properly. Kind of like a jacket zipper. Left side is Handbook, right side is outside info that I was talking about.
 
Not sure if answered already but it is key in FreeBSD to get xorg running first without a login manager or desktop environment. Then get the desktop environment working, then introduce a login manager, if desired. Trying to do it all at once introduces too many variables to troubleshoot.
 
Not sure if answered already but it is key in FreeBSD to get xorg running first without a login manager or desktop environment. Then get the desktop environment working, then introduce a login manager, if desired. Trying to do it all at once introduces too many variables to troubleshoot.
Come on, the Handbook tells you to first install everything needed (xorg, KDE, and SDDM), then enable it by editing a few .conf files, and then reboot. That takes you directly to the login screen. No need to specifically get Xorg running first. I did that a few times, only to discover that it only confuses things down the road.
 
Come on, the Handbook tells you to first install everything needed (xorg, KDE, and SDDM), then enable it by editing a few .conf files, and then reboot.
The way it is sectioned out it very much seems to emphasize Xorg first. Desktop Environments section comes after Xorg Configuration.

https://docs.freebsd.org/en/books/handbook/x11/

I would especially recommend doing so with the added complexity of the KMS drivers needing to be added from ports rather than part of the base OS. Small incremental changes are much easier to debug than a frozen screen and having no idea what caused it. Particularly because SSH/serial debugging is a little scary for some newcomers.

The biggest risk has always been that if you have severe issues with your GPU hardware, the display manager could freeze your machine. You reboot and the same thing happens in a loop (you would need to then boot into single user mode). It is safer to ensure that X11 is fully working first to avoid that mess.
 
The way it is sectioned out it very much seems to emphasize Xorg first. Desktop Environments section comes after Xorg Configuration.

https://docs.freebsd.org/en/books/handbook/x11/

I would especially recommend doing so with the added complexity of the KMS drivers needing to be added from ports rather than part of the base OS. Small incremental changes are much easier to debug than a frozen screen and having no idea what caused it. Particularly because SSH/serial debugging is a little scary for some newcomers.

The biggest risk has always been that if you have severe issues with your GPU hardware, the display manager could freeze your machine. You reboot and the same thing happens in a loop (you would need to then boot into single user mode). It is safer to ensure that X11 is fully working first to avoid that mess.
One unfortunate issue that has been pointed out (too lazy to dig out links) is that FreeBSD's KDE packages do not specify Xorg as a dependency. However, # pkg install x11/sddm will properly pull Xorg in as a dependency. The Handbook will tell you that most of the time, Xorg does not require any config - but you do have to have the proper driver for the GPU as per the wiki linked to earlier in this thread.
 
If you actually read what GVitaliy wrote - he's got some of the same questions as you. He found some different info than you, and was trying to make sense of it. I'd like to reiterate that the Handbook is the place to get started. Any outside info that you find - it has to line up with that Handbook online.

I guess a good way to visualize that is having both instruction sets side-by-side. Then you'll see where different lines of code go, and how to mix them properly. Kind of like a jacket zipper. Left side is Handbook, right side is outside info that I was talking about.
I wasn't sure if there was a definitive conclusion for what GVitaliy was suggesting should be done. If so, could you let me know what I should amend to my instructions? Link to my instructions: <https://forums.freebsd.org/threads/...-to-run-freebsd-for-desktop.82392/post-537438>

I'm now thinking it might be easier to just do without sddm. Is the only real advantage sddm gives the ability to have a graphical login? If so, I'm not sure I need this. I am OK with starting KDE from the command line. If I go with this method, do I just add the following line to ~/.xinitrc:
exec ck-launch-session startplasma-x11

To edit that file, would I just run # ee ~/.xinitrc, enter the line on a new line, and leave the editor on another new line? What, specifically, would I want to remove from my instructions (see above link) to get rid of the sddm stuff?

It seems there is now a debate as to whether Xorg should be installed first. If this is the case, how should I amend my instructions (see above link)?
 
One unfortunate issue that has been pointed out (too lazy to dig out links) is that FreeBSD's KDE packages do not specify Xorg as a dependency.
I suppose arguably Xorg is not a dependency of KDE (or any software really). For example you may be using Xvnc or entirely X11/SSH forwarding from a server with no physical GPU. No need to clutter it up with a useless install of Xorg.
 
I wasn't sure if there was a definitive conclusion for what GVitaliy was suggesting should be done. If so, could you let me know what I should amend to my instructions? Link to my instructions: <https://forums.freebsd.org/threads/...-to-run-freebsd-for-desktop.82392/post-537438>

I'm now thinking it might be easier to just do without sddm. Is the only real advantage sddm gives the ability to have a graphical login? If so, I'm not sure I need this. I am OK with starting KDE from the command line. If I go with this method, do I just add the following line to ~/.xinitrc:
exec ck-launch-session startplasma-x11

To edit that file, would I just run # ee ~/.xinitrc, enter the line on a new line, and leave the editor on another new line? What, specifically, would I want to remove from my instructions (see above link) to get rid of the sddm stuff?

It seems there is now a debate as to whether Xorg should be installed first. If this is the case, how should I amend my instructions (see above link)?
KDE cannot run without Xorg. So even if Xorg is not explicitly specified as a dependency, Xorg still needs to be installed first. What seems to be debatable is whether to first make sure it's actually running, or to edit a few .conf files as instructed by the Handbook.

I just install editors/nano as the very first package, that saves me from having to learn ee or re-learn vi. :p
 
KDE cannot run without Xorg.
I have just tried this now. KDE runs fine without Xorg installed.

inside: ~/.vnc/xstartup
Code:
ck-launch-session startplasma-x11

Is there a specific bug you are referencing? Admittedly I very rarely run KDE for anything other than testing my software with its compositor.
 
inside: ~/.vnc/xstartup
Looks like VNC is the drop-in replacement for Xorg in your case. I'd rather not make things very complicated for people who are just trying to get KDE going on localhost, period. Let's teach them to follow the Handbook, and experience some success that way first, before moving on to playing with things like that.

Edit: Even without Xorg installed on localhost, KDE cannot run without X11 forwarding on SSH, either. :p
 
Back
Top