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



## Scribner (Oct 10, 2021)

I want to give FreeBSD another chance. I've used FreeBSD as a desktop a little bit for about a year. But I am a complete noob and need the help of The FreeBSD Forums once again if I am to use it as my primary desktop.

See these two blog posts I made about how I installed FreeBSD (with the combined help of this forum, the book _Absolute FreeBSD_, and official documentation from FreeBSD.org):

https://www.linuxphoto.com/2019/06/13/i-installed-freebsd-for-the-first-time/
https://www.linuxphoto.com/2019/06/25/how-i-installed-xfce-on-freebsd/
For the second link, I got a comment from someone saying I'm "missing a number of steps," but other commenters weren't sure what steps were missing. This time around, I am OK installing a different desktop environment. I guess factors in deciding what desktop environment to use would be ease of use (for a noob) and what is popular and most likely to receive help from the FreeBSD community should something go wrong (and, chances are, it will).

As the title of this thread illustrates, I am looking for the best and most correct way to run FreeBSD for desktop. Unfortunately, because I am a noob, I will need all the directions clearly written out. But I am also open to brainstorming, and I will be grateful for all advice received.

Two related questions (I'm sure I will think of more later):

When does one remove the install media (e.g., USB stick) after installing FreeBSD: before, during, or after the computer does its first restart?
Why was I unable to use the command to restart the computer on my last install? I could only power off the computer (via the command line), and then I would have to push the button on the computer to turn it back on.
Thank you so much to the kind people on The FreeBSD Forums for helping me over two years ago! The FreeBSD community is one of the operating system's advantages.


----------



## mark_j (Oct 10, 2021)

Look in the how-to section, there's very detailed how-tos, such as this from Trihexagonal .
There's also the handbook.

But, if you want a similar setup to gnu/linux "distributions" (which are called derivations here), then try GhostBSD, it is FreeBSD with a desktop pre installed for you. On the other hand, if you want to work it all out yourself, then follow the instruction in the handbook and/or how-to and come back here when you have questions.

I'll address some things:
Remove usb: set your bios or uefi to primary boot off the install disk and second to your usb and you'll be fine. Most the time this is the  case. If in doubt, leave it in until you see the "sync" message just before the reboot.
Restart: I'm no desktop guru but I believe this depends on the desktop being used. Setting polkit accordingly will fix this. Something like this.


----------



## mer (Oct 10, 2021)

question 1:
I typically remove the install media after the shutdown completes but before the reboot starts.
Watch what happens when you "restart" (pick windows, linux, anything really).  The system typically goes to a console, does some stuff, says something like "shutdown complete, restarting" and then you wind up at the BIOS/UEFI stage.  This is when I pull out the install media.

question 2:
Very hard to say, depends on a number of different things like what user were you, what desktop, were you root, exactly what command did you use.
To restart, I use the following as root, from a command line:
shutdown -r now
If the hardware supports it (most Intel/AMD systems do):
shutdown -p now 
will shutdown and power off the system.

I agree with mark_j on the howtos by Trihexagonal and vermaden.
XFCE is a reasonable desktop (my opinion as one that really doesn't like desktop environments);  the default install (meta-package) may not install all the little widgets you may want. pkg search xfce | wc -l shows a total of 54 packages, I'm not sure how many get pulled in by doing pkg install xfce.


----------



## a6h (Oct 11, 2021)

mark_j said:


> Look in the how-to section, there's very detailed how-tos, such as this from _*[FONT=monospace]Trihexagonal[/FONT]*_ .


Agreed. For building a working desktop, I'm more in favour of reading step-by-step tutorials than DIY.
For example, I can't remember when, but I used Trihexagonal tutorial to setup my desktop.
Then I follow Minbari instruction (How-to somewhere in the Forums) to switch the desktop to the i3.
When I reached to the DWM, I knew how to it myself, but in the early days, no. I needed a step-by-step tutorial.


----------



## Argentum (Oct 11, 2021)

Scribner said:


> As the title of this thread illustrates, I am looking for the best and most correct way to run FreeBSD for desktop. Unfortunately, because I am a noob, I will need all the directions clearly written out. But I am also open to brainstorming, and I will be grateful for all advice received.


I think this is *mission impossible*, in a good sense - there is no single correct way. This forum is full of people, having different desktop setups. My personal advice is:

Select your preffered Window Manager (WM). Several are available and you can install multiple at the same time.
Select your Display (login) Manager (DM). Also several are available. In the end they all do the same work - let you log in and start the WM.
Install DRM or video drivers depending on your GPU;
Install Xorg
Install DM and WM.
Personally I keep Mate, KDE Plasma and Xfce installed at the same time, but this is strictly personal choice.
I have also deskutils/cairo-dock installed.


----------



## fernandel (Oct 11, 2021)

As many times I wrote: I started from DOS - OS2 - Linux and start using FreeBSD from version 6?. I never read any how to make a desktop because it is my personal choice what and how I wanted than my desktop looks like. Yes, I red FreeBSD handbook. All the the time after base installation of FreeBSD I tunep my system - rc.conf, sysctl.conf...firewall... and than I install Xorg and WM or whatever you prefer. I am using Openbox which I like it and I start it with "startx". And the questions is what do you expect from desktop? What I am using and it works all the time is: Claws-Mail, Firefox/Qutebrowser, LibreOffice, MPV, FreeCAD, GIMP, Inkscape, Xpdf, Geeqie,Blender, Texstudio and Stellarium. All other apps came default in the base system as vi for example.
Everything works and I do not have any problem.


----------



## mrbeastie0x19 (Oct 11, 2021)

One thing I found a little confusing as a newbie was the /etc/X11/Xorg.conf and the local configs. If you look online these can be a big source of confusion as the X system is used so widely, and different people store things in different places. If you are lucky an Xorg install will just work, giving you a functional but limited window manager known as twm. In my case I had to change one of the configs to use something called scfb, which was the only one video driver that seems to work on my laptop. In some respects FreeBSD is still lagging behind in hardware support, for example that scfb driver does not support suspend/resume or hardware acceleration, but there are drivers for hardware that do.

There is no FreeBSD desktop. FreeBSD does not ship with one and they are all optional components. You can use GNOME, KDE, Xfce, or any number of window managers. Some of these play nicer than others with the underlying OS, a big issue is that most of this software is now designed with Linux in mind.  Nonetheless most of it works nicely and these are all currently built on the X system at the minute and have been for decades.

If you are lucky and things just work you can set a desktop up in three commands:


```
pkg install xorg
```


```
pkg install *whichever optional window manager here*
```


```
pkg install *whichever optional software here*
```

If it comes with a display manager (for example the gnome display manager) the package might handle it for you, or you might have to edit the init scripts to launch it, otherwise you can use a local .xinitrc that is loaded when you type startx.


----------



## jardows (Oct 11, 2021)

"Correct" way to get to desktop is simply what works.  As far as basic setup, I can only give what I use, which has worked successfully for all my FreeBSD installs. 
In a normal install, just follow the handbook instructions.  Only thing to keep in mind is have your main user part of the operator, wheel, and video groups.
For the GUI installation, my simple plan is this:
1.  Login, then su to root
2.  run `pkg install xorg drm-kmod xfce sddm firefox`.  I include some additional programs for my own purposes, but these are the basics.
3.  add the necessary lines to /etc/rc.conf
     kld_list="/boot/modules/_gpu_driver_here"
_sddm_enabled="YES"
    dbus_enabled="YES"
4.  I go ahead and load the drm driver.  On my laptop which is Intel graphics - `kldload /boot/modules/i915kms.ko`
5.  Run as root `startx`.  Once I see that X has started, I immediately exit.  I have found this step to be important before running sddm or adding a line to start xfce in the ~/.xinitrc  line.  If I don't do this, I have found the power buttons in xfce don't work, at least without additional configuration.  Doing this seems to let xfce be automatically configured.
6.  Reboot with `shutdown -r now`  The system should come up with the sddm graphical login, and go straight to the xfce session, where you can then add more utilities and programs as needed for your workflow.


----------



## Geezer (Oct 11, 2021)

Argentum said:


> Select your preffered Window Manager (WM). Several are available and you can install multiple at the same time.
> Select your Display (login) Manager (DM). Also several are available. In the end they all do the same work - let you log in and start the WM.
> Install DRM or video drivers depending on your GPU;
> Install Xorg
> Install DM and WM.



6. Make it look good, because you will be staring at it a lot.


----------



## mer (Oct 11, 2021)

Geezer said:


> 6. Make it look good, because you will be staring at it a lot.


with the caveat that "good" is subjective because some people love flashy spinning animated transparent desktops and others prefer simple and not flashy etc.


----------



## Geezer (Oct 11, 2021)

mer said:


> with the caveat that "good" is subjective because some people love flashy spinning animated transparent desktops and others prefer simple and not flashy etc.



Didn't say flashy.
.
Always, 'good' is subjective. 

6.1) _No need_ for the cavaeat.
6.2) Absolute need to _look good_.


----------



## monwarez (Oct 11, 2021)

mark_j said:


> Look in the how-to section, there's very detailed how-tos, such as this ...


This is an example of what not to follow, for exemple this part


> As root, run nvidia-xconfig. Run ee /ect/rc.conf, edit in linux_enable="YES", save and exit. Run ee /boot/loader.conf. To cover all chips, Edit in:
> 
> 
> linux_load="YES"
> ...



Adding non essential kernel module in /boot/loader.conf will simply prevent the boot process with an error like: could not allocate enough memory.

And if you look at the devfs ruleset, it basically allow to everyone with read and write access to raw device like hard drive, what a mess.


----------



## astyle (Oct 11, 2021)

monwarez said:


> This is an example of what not to follow, for exemple this part
> 
> 
> Adding non essential kernel module in /boot/loader.conf will simply prevent the boot process with an error like: could not allocate enough memory.
> ...


I went straight with the Handbook for setting up my desktop of choice (KDE). I would think that to start, the important thing is not to skip steps when following a how-to. But after a few successful attempts, the logic pattern becomes clear. Most how-tos generally follow the same logic - but Handbook offers the simplest way to go about setting up a DE. There's a reason why the section on setting up Xorg comes earlier in the Handbook than setting up a DE.


----------



## grahamperrin@ (Oct 11, 2021)

Scribner said:


> … because I am a noob, I will need all the directions clearly written out. …


If you'd like the KDE Plasma desktop environment: 

install FreeBSD (other people's advice)
there's a KDE-provided quick start – graphics (hopefully just one package to install) then four simple steps to get Plasma installed and running.


----------



## mark_j (Oct 11, 2021)

mrbeastie0x19 said:


> One thing I found a little confusing as a newbie was the /etc/X11/Xorg.conf and the local configs. If you look online these can be a big source of confusion as the X system is used so widely, and different people store things in different places. If you are lucky an Xorg install will just work, giving you a functional but limited window manager known as twm. In my case I had to change one of the configs to use something called scfb, which was the only one video driver that seems to work on my laptop. In some respects FreeBSD is still lagging behind in hardware support, for example that scfb driver does not support suspend/resume or hardware acceleration, but there are drivers for hardware that do.



I think a lot of that confusion is because over time the way Xorg is configured has changed. Originally one had to run Xconfigure and then madly edit the config file. Test and re-edit. Rinse and repeat. Now, you just place the customisation options in /usr/local/etc/X11/... for your particular hardware.

I also think the handbook could do with some reviewing on this topic or better still have a handbook JUST for windowing environments; it's a large enough sub-system.

I started writing stuff up a few years ago but I don't use X much these days and certainly not on any exotic bleeding-edge hardware. I love my voodoo card. (only joking).


----------



## Deleted member 30996 (Oct 12, 2021)

vigole said:


> Agreed. For building a working desktop, I'm more in favour of reading step-by-step tutorials than DIY.
> For example, I can't remember when, but I used Trihexagonal tutorial to setup my desktop.
> Then I follow Minbari instruction (How-to somewhere in the Forums) to switch the desktop to the i3.
> When I reached to the DWM, I knew how to it myself, but in the early days, no. I needed a step-by-step tutorial.


When I came here after using PC-BSD for 7 years I still had not built a desktop from scratch and used a tutorial someone else here in the forums wrote to do it. This one and documented it then.

I still remember the sense elation and feeling of accomplishment I got from doing it myself the first time and wrote mine with people who are in the same position I was in 2005 so they could benefit from what I struggled to learn. 

That the same blood, sweat and tears need only be shed once has always been my goal.


----------



## grahamperrin@ (Oct 12, 2021)

mark_j said:


> … confusion … /usr/local/etc/X11/… for your particular hardware. …



Or /etc/X11/xorg.conf – *without* _local_ in the path – if you use a hardware vendor-provided utility to perform the configuration … _locally_.

Might a newcomer be confused by such things? Certainly. mark_j that's not a dig at you  it's just the way things are can be with X.Org.

<https://www.freebsd.org/cgi/man.cgi?query=xorg.conf&sektion=5&manpath=Ports>

<https://www.freebsd.org/cgi/man.cgi?query=nvidia-xconfig&sektion=1&manpath=Ports>



> … think the handbook could do with some reviewing on this topic



+1

Also, I should expand <https://community.kde.org/FreeBSD/Setup#Graphics_first> a little, to include NVIDIA use cases. A little, not too much; it *must* remain a _quick_ start.



> or better still have a handbook JUST for windowing environments; …



– *excluding* desktop environments.

KDE Plasma is *not* part of the X Window System; and so on.


----------



## mark_j (Oct 12, 2021)

Hey, I freely admit I'm not up to date with the workings of X11. Perhaps I need a signature which disclaims my lack of knowledge in that area.


----------



## Scribner (Oct 14, 2021)

Thanks for all the responses! I was reading through them all as they were posted and will continue to look over them. *To save everyone's time, please read the last paragraph in this message first.* Here are some questions (in order) to individual members, though anyone can reply:

1. mark_j: So I can just remove the USB stick when I see the “sync” message just before the reboot? What exactly is this message?

2. mark_j: I’m not talking about being unable to restart via the desktop (which I also couldn’t do) but via the command line. Do you know why `shutdown -p now` worked, but `shutdown -r now` did not?

3. mer: So I can remove the USB stick when I see the screen with the Lenovo logo after the computer shuts down and turns back on?

4. mrbeastie0x19: When you say “window manager,” do you mean “desktop environment”? Can you really install a desktop with just two or three commands? This time, if I want to install KDE, for example, should I just follow 5.7.2. KDE in the Handbook <https://docs.freebsd.org/en/books/handbook/x11/#x11-wm>? It looks like there are probably at least 4-6 other things I would want to do to set up KDE, right?

5. jardows: What all would change from your post with step-by-step instructions for installing Xfce if I were to instead install KDE?

6. jardows: By the way, my computer has integrated Intel graphics, so I take it I would add `kld_list="/boot/modules/i915kms.ko"` to /etc/rc.conf?

7. jardows: In comparing the instructions I posted on my blog <https://www.linuxphoto.com/2019/06/25/how-i-installed-xfce-on-freebsd/> to your instructions, I have some questions.
7.1) Why do you not follow 4.4.1. Getting Started with pkg in the FreeBSD Handbook to bootstrap the system by running the following command: `# /usr/sbin/pkg`?
7.2) Why do you install sddm?
7.3) Is `sddm_enabled="YES"` necessary in /etc/rc.conf because you installed sddm?
7.4) Should you have started the /etc/rc.conf lines by entering `# service dbus start`?
7.5) Should I follow the order of steps you provided, or will the order on my blog work as well?
7.6) Do you think your step 5 would be necessary for KDE? The line in ~/.xinitrc you’re talking about to start Xfce was not in my tutorial, but I see you mention it and it is in the Handbook as well. What is it for, and why was I able to use `startx` to start Xfce without it? I see the Handbook also says to add a line to that file for KDE.

8. astyle: You were able to set up KDE following only the instructions in the Handbook? I will consider doing the same. Some questions:
8.1) Should I still follow 4.4.1. Getting Started with pkg in the FreeBSD Handbook to bootstrap the system by running the following command: `# /usr/sbin/pkg`?
8.2) Why doesn’t the Handbook have you run `# pkg install drm-kmod` (note: it may have been covered in an earlier part of the Handbook)?
8.3) Why doesn’t the Handbook have you enter `kld_list="/boot/modules/i915kms.ko"` in the file /etc/rc.conf (note: it may have been covered in an earlier part of the Handbook)?
8.4) Why doesn’t the Handbook have you start the /etc/rc.conf lines by entering `# service dbus start`?
8.5) Why doesn’t the Handbook have you enter `# kldload /boot/modules/i915kms.ko`?

9) grahamperrin: Do you think I should follow the Handbook or KDE’s official setup <https://community.kde.org/FreeBSD/Setup#Quick_start>?
9.1) If I choose to follow KDE’s official setup do I just do the following:
9.1.1) Follow 4.4.1. Getting Started with pkg in the FreeBSD Handbook to bootstrap the system by running the following command: `# /usr/sbin/pkg`
9.1.2) Then enter `# pkg install drm-kmod`
9.1.3) Enter the easy editor to edit the file /etc/rc.conf by entering the following command: `# ee /etc/rc.conf`
9.1.4) Once in the easy editor, on a new line, enter the following: `kld_list="/boot/modules/i915kms.ko"`
9.1.5) Then just follow what’s under the heading “KDE and the rest”?
9.1.5.1) `pkg install -y kde5 sddm xorg`
9.1.5.2) `sysrc dbus_enable="YES" && service dbus start`
9.1.5.3) `sysrc sddm_enable="YES" && service sddm start`
9.1.5.4) When logging in, avoid the _Plasma (Wayland) …_ default that's presented by sddm – for Plasma, Wayland is not yet reliable.

I think what I am looking for is complete instructions for setting up KDE after installing FreeBSD. Basically, I am looking for the same instructions I have on my blog <https://www.linuxphoto.com/2019/06/25/how-i-installed-xfce-on-freebsd/> (assuming they are correct) but this time for KDE. Again, any help is much appreciated. I must apologize for needing every step spelled out, but I am a veritable noob!


----------



## grahamperrin@ (Oct 15, 2021)

Scribner said:


> `/usr/sbin/pkg`



You can skip that step. Bootstrapping will occur when, for example, you `pkg install drm-kmod`

The formatting of the page is beyond my control (there's insufficient distinction between heading levels) but essentially, the quick start ends with step 4 of _KDE and the rest_.


----------



## Geezer (Oct 15, 2021)

Scribner said:


> I think what I am looking for is *complete* *instructions* for setting up KDE after installing FreeBSD.



There will never be one. The idea is that you do the work, get things wrong in order to get it right, and learn a lot along the way.


----------



## mark_j (Oct 15, 2021)

Scribner said:


> 1. mark_j: So I can just remove the USB stick when I see the “sync” message just before the reboot? What exactly is this message?


I'm sorry but I don't know the exact message.
The same time it took me to reboot a VM with FreeBSD could have been taken by you to see what the message is.
I'm all for helping, but...

Anyway, it's something like "Syncing disks".


BUT, as I said, just set your USB as the secondary boot device and this is a non-issue. Also, regardless, just pulling the USB out when you type reboot/shutdown-r is fine, it's read-only anyway.




Scribner said:


> 2. mark_j: I’m not talking about being unable to restart via the desktop (which I also couldn’t do) but via the command line. Do you know why `shutdown -p now` worked, but `shutdown -r now` did not?



You obviously typed something wrong. They both work as expected.


----------



## astyle (Oct 15, 2021)

Scribner said:


> 8. _*[FONT=monospace]astyle[/FONT]*_: You were able to set up KDE following only the instructions in the Handbook? I will consider doing the same. Some questions:
> 8.1) Should I still follow 4.4.1. Getting Started with pkg in the FreeBSD Handbook to bootstrap the system by running the following command: `# /usr/sbin/pkg`?
> 8.2) Why doesn’t the Handbook have you run `# pkg install drm-kmod` (note: it may have been covered in an earlier part of the Handbook)?
> 8.3) Why doesn’t the Handbook have you enter `kld_list="/boot/modules/i915kms.ko"` in the file /etc/rc.conf (note: it may have been covered in an earlier part of the Handbook)?
> ...


To answer your questions:
8.1) That depends on whether you plan to go with packages or ports. In your case, I would recommend going with packages for best results. To 'bootstrap the `# /usr/sbin/pkg`', all you need to do is run `pkg install first-package`, where first-package can be anything (I recommend editors/nano). The bootstrapping of `pkg` happens automatically.
8.2) and 8.3) Handbook's section 5.4.5 do provide some hints about recent GPU's, but I have to admit, Handbook is the place to *start* reading. Don't expect very complete information when it comes to hardware support. I stumbled on the wiki by accident, just googling around back in 2017. Doing your homework on FreeBSD hardware support does take some skill in connecting the dots, and please feel free to ask here on the forums for additional help!
8.4) It does, in Section 5.7 Desktop Environments. But, you enter not # service dbus start into /etc/rc.conf, but `dbus_enable="YES"`. Paying attention to details like that is a difference-maker.
8.5) There's no need to run `# kldload /boot/modules/i915kms.ko` if you have the `kldlist` line in /etc/rc.conf as per the wiki.

Hope this helps.


----------



## grahamperrin@ (Oct 15, 2021)

astyle said:


> … the wiki …



A mixture of useful and outdated (misleading) information; not unusual for wikis.



			Graphics - FreeBSD Wiki
		


– updated this morning, primarily to encourage use of sysrc(8). To reduce the risk of misconfiguration.


----------



## mer (Oct 15, 2021)

Scribner  Yes that should work fine.


----------



## jardows (Oct 15, 2021)

Scribner said:


> 5. jardows: What all would change from your post with step-by-step instructions for installing Xfce if I were to instead install KDE?
> 
> 6. jardows: By the way, my computer has integrated Intel graphics, so I take it I would add `kld_list="/boot/modules/i915kms.ko"` to /etc/rc.conf?
> 
> ...


5. It has been a while since I have installed KDE.  If I recall correctly, adding the entries to fstab were the only changes needed, aside from installing the kde5 package.

6. Yes.

7.1  pkg is bootstrapped the first time you try to run it, so I don't put it as a separate step
7.2  I like sddm better than the alternatives.  It is actively developed, and there is a module for KDE for customizing it.  I have had less glitches with it than slim.  More personal preference than anything.  Installing the graphical login manager eliminates the need to use the ~/.xinitrc file.
7.3 That line is necessary for sddm to start with the system.  
7.4 Yes, if you don't want to reboot.  I always reboot as my last step, so I don't worry about starting services
7.5 I don't see anywhere in your blog post where you setup the ~/.xinitrc file to load xfce when running `startx`.  That is a necessary step if you don't install the graphical login manager. The order of your post otherwise seems fine, but I have ran into problems with the reboot and shutdown options not working if I don't `startx` before running the xfce environment.
7.6  Would my step 5 be necessary for KDE?  I don't know.  I might try it out, but again, it has been a long time since I've installed KDE.  ~/.xinitrc is the file that tells `startx` which window manager/desktop environment to run.  If you install a graphical login manager such as sddm or slim, this is unnecessary.


----------



## grahamperrin@ (Oct 16, 2021)

jardows said:


> … If I recall correctly, adding the entries to fstab …



Your recollection is correct, however it is no longer required.


----------



## GVitaliy (Oct 16, 2021)

grahamperrin said:


> Your recollection is correct, however it is no longer required.


So you're saying you don't need to use `proc` anymore? If so, is this true for all situations or only when using KDE5?


----------



## mer (Oct 16, 2021)

adding fdescfs and procfs to /etc/fstab comes in the "messages" section of some packages.  Do you absolutely need it?  Probably not.  But like enabling/disabling d-bus, you may lose some functionality by not having them.  If that loss doesn't matter to you, don't put them in.


----------



## grahamperrin@ (Oct 16, 2021)

GVitaliy said:


> … only when using KDE5?



It's the _FreeBSD/Setup_ page in the _KDE Community Wiki_:




𠄲– so yes, KDE Plasma 5.


----------



## Scribner (Oct 16, 2021)

mer said:


> adding fdescfs and procfs to /etc/fstab comes in the "messages" section of some packages.  Do you absolutely need it?  Probably not.  But like enabling/disabling d-bus, you may lose some functionality by not having them.  If that loss doesn't matter to you, don't put them in.


What exactly are these lines I should add for complete functionality and where in the process of installation should I add them? I take it I can use the easy editor to add them?  I think grahamperrin may have linked to a Wiki edit that had the lines (see post #27), but I want to be sure.


----------



## Vull (Oct 16, 2021)

Scribner said:


> What exactly are these lines I should add for complete functionality and where in the process of installation should I add them? I take it I can use the easy editor to add them?  I think grahamperrin may have linked to a Wiki edit that had the lines (see post #27), but I want to be sure.


I encountered this pkg message when installing libreoffice but not when installing _more recent versions_ of kde5. There was formerly a requirement for procfs (but not fdescfs) in a kde5 related package too, but I'm no longer seeing either of those requirements in any package other than this single jdk (java development kit) package. That's as far as I've been able to trace these requirement but in general I agree with mer's advice in the post you quoted. I'm using libreoffice too, so in my case, I'd require it anyway.

Edited to add: Yes to using easy editor. I would mount them both right after installing the software or as described in the openjdk11 package message I linked in my previous paragraph.


----------



## mer (Oct 16, 2021)

Scribner as root (su, or sudo), editor of your choice add the following 2 lines to /etc/fstab.  
`fdesc                   /dev/fd fdescfs rw                      0       0
proc                    /proc   procfs  rw                      0       0`
Rebooting may or may not be needed, or as root you can then do 
`mount /dev/fd
mount /proc`


----------



## GVitaliy (Oct 16, 2021)

grahamperrin said:


> It's the _FreeBSD/Setup_ page in the _KDE Community Wiki_:
> 
> View attachment 11744
> 
> 𠄲– so yes, KDE Plasma 5.


I tried the `sddm` setup. There are two items in FreeBSD/Setup - should they both be done?

I don't have /usr/local/etc/polkit-1/rules-d/ but /usr/local/etc/polkit-1/rules.d/

There is no /usr/local/etc/sddm.conf file either. And after you've done 

`# sddm --example-config /usr/local/etc/sddm.conf`

I don't get it, just a long list of parameters on the terminal screen -


```
[Autologin]
# Whether sddm should automatically log back into sessions when they exit
Relogin=false
# Name of session file for autologin session (if empty try last logged in)
Session=
# Username for autologin session
User=
[General]
# Halt command
HaltCommand=/sbin/shutdown -p now
---------------------------------
---------------------------------
```


----------



## grahamperrin@ (Oct 17, 2021)

GVitaliy said:


> … There are two items in FreeBSD/Setup …



Which two items do you mean?


----------



## Vull (Oct 17, 2021)

GVitaliy said:


> I tried the `sddm` setup. There are two items in FreeBSD/Setup - should they both be done?
> 
> I don't have /usr/local/etc/polkit-1/rules-d/ but /usr/local/etc/polkit-1/rules.d/
> 
> ...


Instead of 
`# sddm --example-config /usr/local/etc/sddm.conf`

you want
`sddm --example-config > /usr/local/etc/sddm.conf`

Note the ">" character. This redirects the output from the terminal to create the file /usr/local/etc/sddm.conf . Then you can use a text editor to customize the file however you want.

You don't really need this file to login normally using sddm, but you might want to use it to customize certain things. For example, to enable autologin, change `Session=` to `Session=plasma.desktop` and `User=` to `User=yourusername`. Before doing this, however, I suggest logging in the normal way first.

The preferred way of changing most system settings is by using the "System Settings" program, but autologin is one thing I can't find in "System Settings." Instead, I had to use /usr/local/etc/sddm.conf.

Another thing worth noting is this: I'm unable to change my current theme using sddm.conf. Instead I must use "System Settings". I suspect this is true for most settings. If you can change it with "System Settings" that's very likely the best way to do it, and maybe, the only way to do it. KDE is undergoing rapid development, and I suspect that /usr/local/etc/sddm.conf is considerably out of date, and no longer used, for a lot of settings, but I don't actually know which ones.


----------



## grahamperrin@ (Oct 17, 2021)

Vull said:


> … autologin is one thing I can't find in "System Settings." …





grahamperrin said:


> … Authentication is required when using System Settings in KDE Plasma to set automatic log in behaviour for SDDM: …



Keyword: _behaviour_ – please see the first screenshot.


----------



## Vull (Oct 17, 2021)

grahamperrin said:


> Keyword: _behaviour_ – please see the first screenshot.


Thanks but I don't seem to have the same settings in my "System Settings" either with kde5-5.22.5.21.08.1 (quarterly) or kde5-5.22.5.21.08.2 (latest) on FreeBSD-13.0-RELEASE-p4.





In future I suspect sddm.conf will be completely unnecessary for kde5. This however will probably not be true for all desktop environments.


----------



## matt_k (Oct 17, 2021)

I wonder why nobody proposed the use of sysutils/desktop-installer? I used it very recently to setup my FreeBSD desktop at work and it worked perfectly. I figured that I don't have the time nor the willpower to do everything manually, so I gave it a try.
Installed KDE, everything just works, including printers, scanner, sound (2 different sound cards present), graphics acceleration (a bit of fine-tuning was necessary [nvidia], but yea), multimedia keys.
I was very impressed and from that experience I will try and propose that to anyone who wants to have a FreeBSD desktop hassle-free.


Spoiler: rant



I wonder how hassle-free is it for different HW specs



I understand that there is a lot of learning happening when a person sets up the desktop from a barebones install, but I wonder how useful/valuable that learning process is. You set it up once and if everything works, you don't touch it for _years._


----------



## GVitaliy (Oct 17, 2021)

grahamperrin said:


> Which two items do you mean?



I meant this from the KDE Community Wiki.





 At the same time, I would like to know what the file is for /usr/local/etc/polkit-1/rules-d/40-wheel-group.rules.



Vull said:


> Instead of
> `# sddm --example-config /usr/local/etc/sddm.conf`
> 
> you want
> `sddm --example-config > /usr/local/etc/sddm.conf`



Yes, you're right, the line

`# sddm --example-config /usr/local/etc/sddm.conf`

I took from the description in the above screenshot and didn't pay attention to the missing ">" character. Maybe a correction needs to be made there?

The `sddm.conf` itself I wanted to use to change the theme after installation


```
pkg ins -y plasma5-sddm-kcm
pkg ins -y sddm-freebsd-black-theme
```



matt_k said:


> I wonder why nobody proposed the use of sysutils/desktop-installer?



The script works fine, but I had to give it up because some of the settings it makes, for me as a beginner, are not very clear.

Even a simple copying of instructions, as in the above case with a missing ">", causes errors, and I want to understand every step - what and why I do it.

So I saved the contents of the master configuration files after it was done for further analysis and went back to manually installing it step by step.


----------



## grahamperrin@ (Oct 17, 2021)

matt_k said:


> I wonder why nobody proposed the use of sysutils/desktop-installer?



I thought it was above, in fact it's in a parallel topic:



Styrsven said:


> There is always sysutils/desktop-installer.


----------



## kpedersen (Oct 17, 2021)

GVitaliy said:


> I want to understand every step - what and why I do it.
> 
> So I saved the contents of the master configuration files after it was done for further analysis and went back to manually installing it step by step.


What you are doing is by far the "most correct" way. Trying to understand what magic scripts / installers are doing underneath is the only way to get proficient with an OS or any technology.

These scripts are great, but the most benefit they provide is when they are decomposed and understood.


----------



## GVitaliy (Oct 17, 2021)

grahamperrin said:


> Is deskutils/plasma5-sddm-kcm installed?


Yes, I did –


```
pkg install plasma5-sddm-kcm
pkg install sddm-freebsd-black-theme
```


----------



## grahamperrin@ (Oct 17, 2021)

GVitaliy said:


> Yes, I did –



Oops, I deleted my question, then realised that it was intended for Vull in response to his <https://forums.FreeBSD.org/posts/537223>.

Vull please, have you installed plasma5-sddm-kcm? Plus, I guess, log out from KDE Plasma (or restart the OS) for integration to take effect.


----------



## grahamperrin@ (Oct 17, 2021)

GVitaliy said:


> I meant this from the KDE Community Wiki.



I'm familiar only with the quick start part. 

<https://community.kde.org/FreeBSD/Setup#Configuring_SDDM> must be outdated, but I'll not attempt to correct it. IMHO documentation for SDDM belongs elsewhere. 


```
% file /usr/local/etc/polkit-1/rules-d/40-wheel-group.rules
/usr/local/etc/polkit-1/rules-d/40-wheel-group.rules: cannot open `/usr/local/etc/polkit-1/rules-d/40-wheel-group.rules' (No such file or directory)
%
```

The file does not exist, I'm not aware of a requirement. 

<https://www.freshports.org/x11/sddm/#message> does not express a requirement for that file.

In addition: 

FreeBSD bug 259229 – x11/sddm might not _require_ ~/.xinitrc


----------



## Scribner (Oct 17, 2021)

mer said:


> Scribner as root (su, or sudo), editor of your choice add the following 2 lines to /etc/fstab.
> `fdesc                   /dev/fd fdescfs rw                      0       0
> proc                    /proc   procfs  rw                      0       0`
> Rebooting may or may not be needed, or as root you can then do
> ...


How do you type the above two lines? Do the correct number of spaces need to be in there? I am talking about:
`fdesc                   /dev/fd fdescfs rw                      0       0
proc                    /proc   procfs  rw                      0       0`

Additionally, GVitaliy brings up a good point: Is there more work I need to do from the KDE Wiki other than just what's listed under the heading "KDE and the rest" at <https://community.kde.org/FreeBSD/Setup#Quick_start> (in addition to graphics/drm-kmod)? If so, could someone tell me what all I need to do from that KDE setup page, keeping in mind I will be using packages and have integrated Intel graphics?

I will be typing up a full set of instructions at some point -- unless someone more qualified would be willing to write them out -- and will seek the gracious support of members in this thread to proofread them. Thanks in advance!


----------



## Vull (Oct 17, 2021)

grahamperrin said:


> Oops, I deleted my question, then realised that it was intended for Vull in response to his <https://forums.FreeBSD.org/posts/537223>.
> 
> Vull please, have you installed plasma5-sddm-kcm? Plus, I guess, log out from KDE Plasma (or restart the OS) for integration to take effect.


No I just ran `pkg install sddm`.


----------



## grahamperrin@ (Oct 17, 2021)

Scribner said:


> … Is there more work I need to do from the KDE Wiki other than just what's listed under the heading "KDE and the rest" …



If graphics work: no, nothing more should be required. 

It's a quick start because those few steps suffice.


----------



## mer (Oct 17, 2021)

Scribner as long as there is a single space in between each field, it's fine.  Typically tab characters are used but things don't have to actually line up.


----------



## GVitaliy (Oct 18, 2021)

grahamperrin said:


> IMHO documentation for SDDM belongs elsewhere


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?


----------



## Menelkir (Oct 18, 2021)

GVitaliy said:


> 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?


sddm have a configurator in settings, it can be installed via deskutils/plasma5-sddm-kcm.


----------



## astyle (Oct 18, 2021)

GVitaliy said:


> 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.


----------



## Scribner (Oct 18, 2021)

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)*

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 *#*.
Run `# pkg install -y kde5 sddm xorg drm-kmod firefox`
Enter the easy editor to edit the file /etc/fstab by entering the following command: `# ee /etc/fstab`
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)
Make sure to hit *Enter* so the file starts on a new line after saving.
Save and exit the easy editor by pushing *Esc* and following the prompts to save and exit.
Run `# mount /dev/fd`
Run `# mount /proc`
Enter the easy editor to edit the file /etc/rc.conf by entering the following command: `# ee /etc/rc.conf`
Once in the easy editor, on a new line, enter the following line:
`kld_list="/boot/modules/i915kms.ko"`
Make sure to hit *Enter* so the file starts on a new line after saving.
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.
Go ahead and load the drm driver. Run `# kldload /boot/modules/i915kms.ko`
Run `# sysrc dbus_enable="YES" && service dbus start`
Run `# sysrc sddm_enable="YES" && service sddm start`
Reboot by running `# shutdown -r now`
If you chose not to reboot, enter `# exit` to leave the superuser account
When logging in, avoid the _Plasma (Wayland) …_ default that's presented by sddm – for Plasma, Wayland is not yet reliable.

Questions:

What does the `-y` do in step 2? Should I delete it?
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.
Should /etc/fstab start on a new line (step #5)?
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?
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?
What exactly is the final step talking about regarding "Wayland" (taken from KDE’s Wiki)?
What’s the sddm setup GVitaliy was talking about (in post #34, for example)? Is it something I should do as well?
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.


----------



## astyle (Oct 18, 2021)

Scribner said:


> 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.



Scribner said:


> 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.


----------



## grahamperrin@ (Oct 18, 2021)

GVitaliy said:


> 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:



Menelkir said:


> deskutils/plasma5-sddm-kcm



Here, *without* editing the file: 






Scribner said:


> Instructions for Installing KDE in FreeBSD (Rough Draft)





Scribner said:


> (See post #33)



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



Scribner said:


> Reboot



Not required.


----------



## Scribner (Oct 18, 2021)

astyle said:


> 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.
> 
> ...


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?



grahamperrin said:


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


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.


----------



## astyle (Oct 18, 2021)

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.



Scribner said:


> 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.


----------



## grahamperrin@ (Oct 18, 2021)

Scribner said:


> LibreOffice



… doesn't belong in a guide to installing KDE Plasma ;-)


----------



## Scribner (Oct 19, 2021)

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!


----------



## matt_k (Oct 19, 2021)

Scribner said:


> Questions:
> 
> What does the `-y` do in step 2? Should I delete it?
> 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.
> ...


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.


----------



## Scribner (Oct 19, 2021)

matt_k said:


> 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
> ...


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>


----------



## grahamperrin@ (Oct 19, 2021)

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.


----------



## matt_k (Oct 20, 2021)

Scribner said:


> 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. 


Spoiler: (*)



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.


----------



## Scribner (Oct 20, 2021)

matt_k said:


> 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?
> ...


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.


----------



## astyle (Oct 20, 2021)

Scribner said:


> 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.


----------



## Sevendogsbsd (Oct 20, 2021)

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.


----------



## astyle (Oct 20, 2021)

Sevendogsbsd said:


> 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.


----------



## Sevendogsbsd (Oct 20, 2021)

Ok whatever. Simplifying is part of a troubleshooting process. Just trying to be helpful.


----------



## kpedersen (Oct 20, 2021)

astyle said:


> 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.


----------



## astyle (Oct 20, 2021)

kpedersen said:


> 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/
> 
> ...


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.


----------



## Scribner (Oct 20, 2021)

astyle said:


> 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)?


----------



## kpedersen (Oct 20, 2021)

astyle said:


> 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.


----------



## astyle (Oct 20, 2021)

Scribner said:


> 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`
> ...


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.


----------



## kpedersen (Oct 20, 2021)

astyle said:


> KDE cannot run without Xorg.


I have just tried this now. KDE runs fine without Xorg installed.

inside: ~/._vnc_/_xstartup_

```
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.


----------



## astyle (Oct 20, 2021)

kpedersen said:


> 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.


----------



## GVitaliy (Oct 20, 2021)

grahamperrin said:


> Here, *without* editing the file:


I have installed


```
pkg install plasma5-sddm-kcm
pkg install sddm-freebsd-black-theme
```

I tried to change the `sddm` theme through the graphical menu




After restarting the session, the theme of the `sddm` invitation has not changed.

(That's why I asked how to determine what is applicable on freebsd when viewing information on resources like https://userbase.kde.org/Welcome_to_KDE_UserBase or https://docs.kde.org/. For now, as an option, create a separate snapshot of the virtual machine called "Settings Game” and periodically check any controversial options on it)

Then I did the following in the Kate editor –

`sudo sddm --example-config > /usr/local/etc/sddm.conf`

Got a message - `Permission denied` Why?

I did the same thing only through `su` -

`# sddm --example-config > /usr/local/etc/sddm.conf`

Now I got the file /usr/local/etc/sddm.conf. In it I changed the 


```
[Theme]
# Current theme name
Current=breeze
```

On


```
[Theme]
# Current theme name
Current=sddm-freebsd-black-theme
```

After restarting the session, I got a black eran. If you click on it in the upper part of the mouse, the login window appears, but after clicking in the `password` field, the black screen appears again. However, if you enter the user's password (blindly), then KDE loads. Strange behavior.

 What was the default works fine.



grahamperrin said:


> … doesn't belong in a guide to installing KDE Plasma ;-)


Maybe so. But given the context and the name of this topic, which concerns not only KDE but the desktop in general, a reminder is necessary for the purpose of its further use. 
I'm a little confused by `fdesc`. Judging by the name, this is related to floppy disk drives. Does anyone use floppy disks now? My motherboard doesn't even have an interface to connect them.


----------



## kpedersen (Oct 20, 2021)

astyle said:


> Looks like VNC is the drop-in replacement for Xorg in your case.


Absolutely. But that is why the KDE package doesn't have a hard dependency on Xorg. Because there are a number of different Xservers a user might want to use instead.


astyle said:


> Edit: Even without Xorg installed on localhost, KDE cannot run *without X11* forwarding on SSH, either.


KDE pulls in Qt which pulls in libX11 which is generally all that is needed for X11/SSH forwarding. Possibly it needs the xauth package too but I already have that from the VNC server dependency (I find VNC works a little faster than SSH/X11 for heavy UI toolkits).


----------



## astyle (Oct 20, 2021)

GVitaliy : it takes root access to change the SDDM theme via the KCM module. On FreeBSD, I found `kdesu` it to be an unreliable proposition. I decided not to bother with SDDM themes as a result.

It also takes root access to edit the system-wide config files for SDDM. The ones in user home directory have no effect on the theme that you see once booted up.


----------



## Sevendogsbsd (Oct 20, 2021)

And don’t  sddm (and other login managers) run as root? I thought that was one of the arguments against them, from a security perspective anyway.


----------



## astyle (Oct 20, 2021)

Sevendogsbsd said:


> And don’t  sddm (and other login managers) run as root? I thought that was one of the arguments against them, from a security perspective anyway.


For Wayland, SDDM devs are looking at running it rootless.


----------



## grahamperrin@ (Oct 24, 2021)

Vull said:


> … requirement for procfs …



Maybe thirty-six ports: 

deskutils/anydesk
deskutils/parcellite
devel/RStudio
devel/libsigsegv
devel/pmdk
emulators/i386-wine
emulators/i386-wine-devel
java/bootstrap-openjdk6
java/bootstrap-openjdk8
java/linux-oracle-jdk18
java/linux-oracle-jre18
java/linux-oracle-serverjre10
java/openjdk11
java/openjdk11-jre
java/openjdk12
java/openjdk13
java/openjdk14
java/openjdk15
java/openjdk16
java/openjdk17
java/openjdk7
java/openjdk7-jre
java/openjdk8
java/openjdk8-jre
lang/mono
lang/mono5.10
lang/mono5.20
lang/mono6.8
math/lean
net/glusterfs
net/nethogs
security/beid
sysutils/gkrelltop
sysutils/memfetch
sysutils/monitord
x11/keyboardcast


----------



## Deleted member 30996 (Oct 24, 2021)

Sevendogsbsd said:


> And don’t  sddm (and other login managers) run as root? I thought that was one of the arguments against them, from a security perspective anyway.


I make sure to tell tell people to create their ~/.xinitrc file from their usr account so they're not running x11-wm/fluxbox as root.


----------



## Sevendogsbsd (Oct 24, 2021)

Trihexagonal said:


> I make sure to tell tell people to create their ~/.xinitrc file from their usr account so they're not running x11-wm/fluxbox as root.


Right, which is why I don’t run login managers. Even using a login manager, you aren’t running fluxbox as root if you use an unprivileged user, but I think the login manager process runs with elevated privs.


----------



## Scribner (Nov 16, 2021)

After a short break, I've reread the first three chapters of _Absolute FreeBSD_ and the first two chapters of the Handbook. Now, I'll just dive right into some questions I have before I attempt to install KDE. After looking at my questions, please look at my instructions that follow, looking for any errors.

--------------------
Questions:

Q1. According to this reply from jardows, I need to have my “main user part of the operator, wheel, and video groups.” Do you know why this is? I think in my first install my main user was just part of the wheel group, as suggested in the book _Absolute FreeBSD_. If I need to have the main user part of the other two groups, what is the syntax for entering multiple groups? When setting up a user during the install, do I just type `operator wheel video` (note that there aren’t commas)?

Q2. In the same reply (see above link), I’m told to run as root `startx` before running sddm or adding a line to start Xfce in the file ~/.xinitrc. Once one sees X has started, one is supposed to immediately exit. This step supposedly automatically configures Xfce; if it’s not followed, the power buttons supposedly won’t work without additional configuration. In a follow-up post, the same user clarifies that he runs into problems with reboot and shutdown options not working if he doesn’t `startx` before running the Xfce environment. While I’m not planning on using sddm anymore (I’ll just start Xorg with `startx`)--and I am planning on using KDE not Xfce--should I still follow this step?

Q3. In two replies (here and here), mer says to mount /dev/fd and /proc by adding the following two lines to /etc/fstab:
`fdesc                   /dev/fd fdescfs rw                      0       0
proc                    /proc   procfs  rw                      0       0`
In the Handbook, I see /proc should be mounted, but I don’t see anything about /dev/fd. Does anyone know what this second file is and if I should mount it as well? According to GVitaliy, judging by the name, `fdesc` concerns floppy disks. If this is the case, I take it most people don’t need the first line. Please confirm.

Q4. Related to the last question, I’m just not sure how I should type out the above two lines. According to mer in another post, typically *Tab* characters are used, but a single space between each field will also work. So can I just press *Tab* after entering each field?

Q5. Sevendogsbsd mentioned I should get Xorg running first without a login manager or desktop environment. This sentiment was echoed by kpedersen. While I am no longer using a login manager, I am using a desktop environment. How would following this advice change my instructions below, if at all?

Q6. Because of questions raised by GVitaliy in addition to security concerns raised by Sevendogsbsd here, I think I am going to go without sddm and instead use `startx`. Will this really simplify the installation process and add security?

Q7. Trihexagonal says to create the file ~/.xinitrc from your usr account so you’re not running x11-wm/fluxbox as root. Does this apply to my instructions below? If so, what should I change?

--------------------

*Instructions for Installing KDE on FreeBSD (Rough Draft #2)*

_In this second rough draft of instructions, I will show you how to install KDE that will be started with the command  startx. My first rough draft of instructions shows you how to install KDE that is started by sddm._

I1. 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 *#*.

I2. Run `# pkg install xorg`

I3. Run `# pkg install kde5 drm-kmod firefox`

I4. Enter the easy editor to edit the file /etc/fstab by entering the following command: `# ee /etc/fstab`

I5. Once in the easy editor, on new lines, enter the following two lines (you can push the *Tab* key or spacebar after entering each field):
`fdesc                   /dev/fd fdescfs rw                      0       0
proc                    /proc   procfs  rw                      0       0`
(See post #33. There is debate on whether this instruction should be included; I am including it because it may be beneficial for those who want to run applications such as LibreOffice.)

I6. Make sure to hit *Enter* so the file starts on a new line after saving.

I7. Save and exit the easy editor by pushing *Esc* and following the prompts to save and exit.

I8. Run `# mount /dev/fd`

I9. Run `# mount /proc`

I10. Enter the easy editor to edit the file /etc/rc.conf by entering the following command: `# ee /etc/rc.conf`

I11. Once in the easy editor, on a new line, enter the following line: 
	
	



```
kld_list="/boot/modules/i915kms.ko"
```

I12. Make sure to hit *Enter* so the file starts on a new line after saving.

I13. 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.

I14. Go ahead and load the drm driver. Run `# kldload /boot/modules/i915kms.ko`

I15. Enter the easy editor to edit the file /etc/rc.conf by entering the following command: `# ee /etc/rc.conf`

I16. Once in the easy editor, on a new line, enter the following line: 
	
	



```
dbus_enable="YES"
```

I17. Make sure to hit *Enter* so the file starts on a new line after saving.

I18. Save and exit the easy editor by pushing *Esc* and following the prompts to save and exit.

I19. Run `# service dbus start`

I20. Enter the easy editor to edit the file ~/.xinitrc by entering the following command: `# ee ~/.xinitrc`

I21. Once in the easy editor, on a new line, enter the following line: 
	
	



```
exec ck-launch-session startplasma-x11
```

I22. Make sure to hit *Enter* so the file starts on a new line after saving.

I23. Save and exit the easy editor by pushing *Esc* and following the prompts to save and exit.

I24. Reboot by running `# shutdown -r now`

I25. If you chose not to reboot, enter `# exit` to leave the superuser account.

I26. If everything worked, you should see the KDE desktop after running `% startx` as a regular account.

--------------------

Thanks again to everyone who contributed to this thread. Your help has allowed me to write this rough draft of instructions and (I hope) get a proper FreeBSD desktop. One thing I can say honestly is that reading through all these messages (multiple times) has helped me understand what each of these instructions do. It no longer seems like a bunch of gobbledygook. I will attempt to install FreeBSD and KDE soon once I get all of these kinks (the questions) figured out.


----------



## mer (Nov 16, 2021)

man -k fdescfs
fdescfs(5) - file-descriptor file system

man fdescfs
The file-descriptor file system, or fdescfs, provides access to the per-
     process file descriptor namespace in the global file system namespace.
     The conventional mount point is /dev/fd.


Not Floppy Disk, fd is File Descriptor.

It exposes file descriptors (the value returned from an open/fopen call) via the standard /dev interface.


----------



## grahamperrin@ (Nov 16, 2021)

Scribner if you include instructions that are not necessary for KDE, please make clear that they're not necessary. This will help to avoid future confusion when people read contradictory information.


----------



## astyle (Nov 16, 2021)

Scribner said:


> Q1. just type operator wheel video (note that there aren’t commas)





Scribner said:


> Q2.


Just follow the Handbook for this one. See my post earlier in this thread (#23)  for more information.


Scribner said:


> Q3.


Just follow the Handbook on this one. Same KDE Setup section.


Scribner said:


> Q4


Yes


Scribner said:


> Q5


Those two (Sevendogsbsd  and kpedersen )  are grizzled UNIX gurus with their own ideas about how things SHOULD be run. Those ideas are based on sound security fundamentals. Unfortunately, those ideas are not suitable for a beginner audience (users who need to get a system up and running first, and THEN worry about security).


Scribner said:


> Q6


No, that won't simplify the install process. You either simplify OR add security, but not both at the same time.


Scribner said:


> Q7


That doesn't apply. SDDM doesn't need .xinitrc. Just follow the Handbook's instructions, the same KDE setup section I keep pointing you to.


----------



## kpedersen (Nov 16, 2021)

Scribner said:


> Q5. Sevendogsbsd mentioned I should get Xorg running first without a login manager or desktop environment. This sentiment was echoed by kpedersen. While I am no longer using a login manager, I am using a desktop environment. How would following this advice change my instructions below, if at all?


This advice was mainly to get things working first. If there are issues, a login manager will just keep flickering, failing to start and not give you nearly as useful feedback to the console (it then makes it hard to get help on forums if you can't give the useful information hidden by the failing login manager).

Once you have Xorg working, there is nothing wrong with a login manager if you like that from now on.


----------



## Scribner (Nov 17, 2021)

mer said:


> man -k fdescfs
> fdescfs(5) - file-descriptor file system
> 
> man fdescfs
> ...


Thank you for clarifying. It sounds like /dev/fd is something I want to mount then. Would you be able to share where you were told to mount /dev/fd?



grahamperrin said:


> Scribner if you include instructions that are not necessary for KDE, please make clear that they're not necessary. This will help to avoid future confusion when people read contradictory information.


Thanks. I take it you're talking about mounting /dev/fd and /proc again. That is why I made sure to include this note under the instructions for this part: "There is debate on whether this instruction should be included; I am including it because it may be beneficial for those who want to run applications such as LibreOffice." I think saying there's a "debate" about these instructions implies they are not necessary.



astyle said:


> Just follow the Handbook for this one. See my post earlier in this thread (#23)  for more information.


This is your response regarding my questions Q1 and Q2. Regarding Q1, before I install FreeBSD I need to know if my main user should also be a part of just the wheel group, of if it should be a part of the operator, wheel, and video groups, as @jardows suggests. The Handbook, like the book _Absolute FreeBSD_, just has the main user also be a part of the wheel group. But I'm not sure if the other groups are needed for running a desktop environment or some other reason. I hope someone can answer this question.

Regarding Q2, I don't see anything in the Handbook about running `# startx` as root before entering Xfce to get the power and restart buttons to work. Also, I will be using KDE, not Xfce. I hope jardows or someone else can answer this question.

I believe what you're talking about in your earlier post (#23) is just to use the Handbook in addition to outside information. That is good advice. And that is what I am doing--using the Handbook and seeking outside information in the book _Absolute FreeBSD_ and these forums.


astyle said:


> Just follow the Handbook on this one. Same KDE Setup section.


Regarding Q3, the Handbook says to mount /proc, but it doesn't say anything about mounting /dev/fd. Because mer says to mount /dev/fd (see above in this reply), I think I will do it. If anyone can say why I should _not_ do this, I am certainly open to changing my mind.



astyle said:


> Yes


Regarding Q4, I suspected the *Tab* key will work in addition to the spacebar. Thanks for confirming.



astyle said:


> Those two (Sevendogsbsd  and kpedersen )  are grizzled UNIX gurus with their own ideas about how things SHOULD be run. Those ideas are based on sound security fundamentals. Unfortunately, those ideas are not suitable for a beginner audience (users who need to get a system up and running first, and THEN worry about security).


Regarding Q5, thanks for the info. It sounds like I don't need to worry about this step. In these instructions, I did make sure to run `# pkg install xorg` first before installing KDE and the other packages because I thought that was something that would be beneficial. I'm not sure if it makes any difference, but that is how my instructions currently look.



astyle said:


> No, that won't simplify the install process. You either simplify OR add security, but not both at the same time.


Regarding Q6, so are you saying doing without SDDM and instead starting KDE with `startx` will add security?



astyle said:


> That doesn't apply. SDDM doesn't need .xinitrc. Just follow the Handbook's instructions, the same KDE setup section I keep pointing you to.


Regarding Q7, please read my post/instructions again. I am no longer using SDDM, but starting KDE with `startx`. Therefore, I still need to know if I should create the ~/.xinitrc file from my usr account rather than root. If someone could confirm, that would be great.

Thanks for all your help.



kpedersen said:


> This advice was mainly to get things working first. If there are issues, a login manager will just keep flickering, failing to start and not give you nearly as useful feedback to the console (it then makes it hard to get help on forums if you can't give the useful information hidden by the failing login manager).
> 
> Once you have Xorg working, there is nothing wrong with a login manager if you like that from now on.


Thanks for your reply. So did your advice mostly pertain to the use of login managers like SDDM? I am no longer using SDDM--instead, I'm planning on starting KDE with `startx`--so can I disregard your advice?


----------



## mer (Nov 17, 2021)

Scribner said:


> Thank you for clarifying. It sounds like /dev/fd is something I want to mount then. Would you be able to share where you were told to mount /dev/fd?


I can't point to it specifically, but it was in a package message after I pkg installed something.  "what" I don't recall but the procfs was mentioned in the same message.


----------



## astyle (Nov 17, 2021)

I do recommend SDDM, it will make your life easier if you get it to work.


Scribner said:


> This is your response regarding my questions Q1 and Q2. Regarding Q1, before I install FreeBSD I need to know if my main user should also be a part of just the wheel group, of if it should be a part of the operator, wheel, and video groups, as @jardows suggests. The Handbook, like the book _Absolute FreeBSD_, just has the main user also be a part of the wheel group. But I'm not sure if the other groups are needed for running a desktop environment or some other reason. I hope someone can answer this question.


Yes, you do need to have the regular user be a member of operator, wheel, and video. Simplest way to do it is to add the user to those groups at install, as suggested earlier in the thread. But if you missed that, it's not a complete deal-breaker, but you will have to study pw(8) manual page to put together the proper command to add the regular user to those groups. I can give (a rather incomplete) rundown of why each and every one of those groups is important:

*wheel*. Only members of the wheel group are allowed to run `% su root`. On  your own system, this is kind of essential to have, but not on by default. This is the very minimum you have to have, which is why Handbook actually mentions it.  The other two can be added later, but it's easier to add them at the same step, this will save you the headaches later on.
*operator*. This allows you access to the /dev part of the filesystem. This is for mounting USB sticks, CD/DVDs, and to use the sound. I think parts of the graphics stack also require such access.
*video*. This is really important for starting and running Xorg. Without it, you can install the GPU driver, and enable it in rc.conf, but you still won't be able to load it. This directly will lead to Xorg not starting.


----------



## eternal_noob (Nov 17, 2021)

astyle said:


> *video*. This is really important for starting and running Xorg. Without it, you can install the GPU driver, and enable it in rc.conf, but you still won't be able to load it. This directly will lead to Xorg not starting.


I believe you only need to be in the video group if you want to use hardware accelerated graphics. If you use a video driver with software rendering (e.g. scfb), you don't need to be in that  group.

I could be wrong, though.


----------



## Vull (Nov 17, 2021)

mer said:


> I can't point to it specifically, but it was in a package message after I pkg installed something.  "what" I don't recall but the procfs was mentioned in the same message.


I recall seeing both /proc and /dev/fd in a libreoffice message, but not in any kde5 messages. /proc was previously indicated in kde5 messages for older versions, but not in the more recent versions.


----------



## astyle (Nov 17, 2021)

FWIW, the Handbook actually mentions the importance of *operator* and *video* groups:









						Chapter 5. The X Window System
					

This chapter describes how to install and configure Xorg on FreeBSD, which provides the open source X Window System used to provide a graphical environment




					docs.freebsd.org
				



Section 5.4.1, Quick Start, step 2 actually mentions how you can add regular user to those two groups in one go.
---
Xorg setup comes *before* KDE setup in the Handbook. This is what I mean by "Follow the Handbook".


----------



## jardows (Nov 17, 2021)

Scribner said:


> Q1. According to this reply from jardows, I need to have my “main user part of the operator, wheel, and video groups.” Do you know why this is? I think in my first install my main user was just part of the wheel group, as suggested in the book _Absolute FreeBSD_. If I need to have the main user part of the other two groups, what is the syntax for entering multiple groups? When setting up a user during the install, do I just type `operator wheel video` (note that there aren’t commas)?
> 
> Q2. In the same reply (see above link), I’m told to run as root `startx` before running sddm or adding a line to start Xfce in the file ~/.xinitrc. Once one sees X has started, one is supposed to immediately exit. This step supposedly automatically configures Xfce; if it’s not followed, the power buttons supposedly won’t work without additional configuration. In a follow-up post, the same user clarifies that he runs into problems with reboot and shutdown options not working if he doesn’t `startx` before running the Xfce environment. While I’m not planning on using sddm anymore (I’ll just start Xorg with `startx`)--and I am planning on using KDE not Xfce--should I still follow this step?


For Q1:  The syntax you used is correct.  The other part of the question was well answered by astyle 

For Q2:  I haven't installed KDE for so long, I don't really know if it applies there.  If I get a chance, I'll spin up a VM and try it to confirm.


----------



## astyle (Nov 17, 2021)

Scribner said:


> Regarding Q6, so are you saying doing without SDDM and instead starting KDE with `startx` will add security?


I'd suggest not worrying about 'security' for now. There is an idea of 'security by obscurity', which is what swapping SDDM for `startx` will accomplish. There are a few helpful ways to think about computer security - such as protecting users from their own mistakes, or not allowing devices from outside your home network to connect to your web server. It takes connecting the dots between such ideas and tools available in FreeBSD to accomplish those ideas. For now, I'd suggest getting stuff to line up so that you get Xorg to work.


----------



## kpedersen (Nov 17, 2021)

Scribner said:


> I am no longer using SDDM--instead, I'm planning on starting KDE with `startx`--so can I disregard your advice?


Cool, I do it the same way (via `startx`). So yes, just make sure you have a .xinitrc file in your $HOME directory. This is the one that `startx` (actually `xinit` behind it) runs. The .xsession is not needed if you do `startx`.


----------



## mer (Nov 17, 2021)

Count me as another using startx.  Not a big deal logging in on the console then typing startx.  It's also good if there are issues starting X.


----------



## astyle (Nov 17, 2021)

Scribner said:


> Regarding Q5, thanks for the info. It sounds like I don't need to worry about this step. In these instructions, I did make sure to run `# pkg install xorg` first before installing KDE and the other packages because I thought that was something that would be beneficial. I'm not sure if it makes any difference, but that is how my instructions currently look.


It does make a difference to install Xorg *before* installing KDE.  That is not explicitly specified in KDE's packages for a reason (Trying to move from Xorg to Wayland), but it doesn't change the fact that without Xorg, KDE (Or most other desktops) won't run.


----------



## kpedersen (Nov 17, 2021)

astyle said:


> It does make a difference to install Xorg *before* installing KDE.


It can be *after* too. The whole point of a package system is that it will drag in the dependencies it needs. However to see KDE, you will ultimately need some sort of display system (Xorg, Xvnc, SSH/X11 or Wayland, etc).


astyle said:


> That is not explicitly specified in KDE's packages for a reason (Trying to move from Xorg to Wayland)


That is not entirely the reason. The reason is because there are many different type of display systems that can render KDE. It would be incorrect to dictate a specific one and hard-code it into the package dependencies.


----------



## astyle (Nov 17, 2021)

kpedersen said:


> It can be *after* too. The whole point of a package system is that it will drag in the dependencies it needs. However to see KDE, you will ultimately need some sort of display system (Xorg, Xvnc, SSH/X11 or Wayland, etc).


I meant install, configure, and get running.  You can do stuff out of documented order if you know what you're doing, and will be arriving at intended result anyway. For beginners, I think it helps to have stuff tightly nailed down.


----------



## kpedersen (Nov 17, 2021)

astyle said:


> For beginners, I think it helps to have stuff tightly nailed down.


Quite true for the handbook so it logically makes sense for a reader. Though:


```
# pkg install xorg
# pkg install kde5
```

Should result in an identical hard drive contents as:


```
# pkg install kde5
# pkg install xorg
```


----------



## Scribner (Nov 17, 2021)

It looks like all my questions but two (Q2 and Q7) have been answered to my satisfaction. Here they are again:

(Here is the "above link" I mention at the beginning of Q2. It's post #8 by jardows.)



Scribner said:


> Q2. In the same reply (see above link), I’m told to run as root `startx` before running sddm or adding a line to start Xfce in the file ~/.xinitrc. Once one sees X has started, one is supposed to immediately exit. This step supposedly automatically configures Xfce; if it’s not followed, the power buttons supposedly won’t work without additional configuration. In a follow-up post, the same user clarifies that he runs into problems with reboot and shutdown options not working if he doesn’t `startx` before running the Xfce environment. While I’m not planning on using sddm anymore (I’ll just start Xorg with `startx`)--and I am planning on using KDE not Xfce--should I still follow this step?





Scribner said:


> Q7. Trihexagonal says to create the  ~/.xinitrc from your usr account so you’re not running x11-wm/fluxbox as root. Does this apply to my instructions below? If so, what should I change?



Once I have answers to these questions, I will install FreeBSD and KDE. Ideally, I will do this within a few days of receiving the answers, but I don't like making these kinds of promises.

If anyone has time, looking over my second rough draft of instructions would be helpful (see post #84 or this link).


----------



## astyle (Nov 17, 2021)

Scribner said:


> Once I have answers to these questions, I will install FreeBSD and KDE. Ideally, I will do this within a few days of receiving the answers, but I don't like making these kinds of promises.


It pays to be stingy with stuff like 'promises' on the Internet. 

For Q2: If you get Xorg going as specified in the Handbook, you should be able to:

boot up to a command-line login prompt.
Log in as regular user (this is important)
run startx as regular user (Even the Handbook tells you to do that, that same Quick Start section 5.4.1, Step 3)
TWM window manager will start.
You can return to text mode by typing 'exit' in every single Xterm you can find.
If you can successfully complete these steps without errors along the way, then you'll know you're ready to install KDE and/or play with $HOME/.xinitrc.
--
And no, this won't 'automatically' configure XFCE. You'll be able to install it. Then, if you configure it according to the Handbook's documentation (Just below the KDE section), you'll be able to log in. But on first login, it's still a mess that  needs some cleaning up, but that chore is easily done within the DE itself.


----------



## Scribner (Nov 18, 2021)

astyle said:


> It pays to be stingy with stuff like 'promises' on the Internet.


It also allows me to under-promise and over-deliver. With that said, I'd like to announce that *I've just installed FreeBSD for the second time*! This time around I am even able to use `# shutdown -r now` rather than having `# shutdown -p now` as my only option!

I am holding off on installing KDE, however, until there are solid answers to Q2 and Q7.


astyle said:


> For Q2: If you get Xorg going as specified in the Handbook, you should be able to:
> 
> boot up to a command-line login prompt.
> Log in as regular user (this is important)
> ...


I guess I'm not familiar with using Xorg without a desktop environment. Now, do you think Q2 is even something I should be concerned with?

Q7 seems more important to me. Any takers for answering Q7? I can install KDE as soon as tomorrow!

Thanks again.


----------



## astyle (Nov 18, 2021)

Scribner said:


> I guess I'm not familiar with using Xorg without a desktop environment. Now, do you think Q2 is even something I should be concerned with?
> 
> Q7 seems more important to me. Any takers for answering Q7?


I'd suggest you re-read my post #104 a bit more carefully... If you get through the 5 troubleshooting steps as outlined, you will have success with Q7. In the world of UNIX, order matters. If a step early on has been messed up and skipped around - that creates difficulties down the road, and they can be difficult to untangle. 

BTW, back in the day, it took me 5 tries just to get Xorg and KDE on FreeBSD going for the first time (I think that was 2007 or 2008), and then I kept messing up my system to the point that a complete system reinstall was warranted. That happened plenty of times, I kept going even after getting the Xorg/KDE install process down and making sense of what the Handbook is telling me to do.


----------



## Scribner (Nov 18, 2021)

astyle said:


> I'd suggest you re-read my post #104 a bit more carefully... If you get through the 5 troubleshooting steps as outlined, you will have success with Q7. In the world of UNIX, order matters. If a step early on has been messed up and skipped around - that creates difficulties down the road, and they can be difficult to untangle.
> 
> BTW, back in the day, it took me 5 tries just to get Xorg and KDE on FreeBSD going for the first time (I think that was 2007 or 2008), and then I kept messing up my system to the point that a complete system reinstall was warranted. That happened plenty of times, I kept going even after getting the Xorg/KDE install process down and making sense of what the Handbook is telling me to do.


That's good advice, and I'd like to avoid a system reinstall. Let's take another look at post #104...



astyle said:


> It pays to be stingy with stuff like 'promises' on the Internet.
> 
> For Q2: If you get Xorg going as specified in the Handbook, you should be able to:
> 
> ...


OK, let me unpack this.

First, I take it you want me to do just my second instruction (I2) from post #84.

 I2. Run `# pkg install xorg`

Question: Should I then reboot the computer?

Next (#2), I will log in as a regular user (important). Then (#3) I will run `% startx` as a regular user. The TWM window manger should then start (#4). I should be able to return to text mode by typing `exit` in every single Xterm I can find (#5).

Question: What should I do if I can't return to text mode (which I take it is the same thing as the command line/[in my case] tcsh shell)?

Question: If I make it back to text mode, should I reboot?

If I can successfully complete these steps without errors, I know I'm ready to install KDE. Should I then move on to my third instruction (I3)?

 I3. Run `# pkg install kde5 drm-kmod firefox`

Question: So a question I still have is, _Should I follow Trihexagonal's advice to create the ~/.xinitrc file from my usr account so I'm not running x11-wm/fluxbox as root_? If so, should I amend my instructions to enter `# exit` to leave the superuser account before I20?

I20. Enter the easy editor to edit the file ~/.xinitrc by entering the following command:  `# ee ~/.xinitrc`

I am in Central time, but I can stay up tonight to get this done!


----------



## eternal_noob (Nov 18, 2021)

Scribner said:


> I will need all the directions clearly written out.


A friendly advice: You are overthinking it.
e.g.


Scribner said:


> What should I do if I can't return to text mode


Why wouldn't you be able to exit X11?

Just begin and see what does not work.


----------



## astyle (Nov 18, 2021)

Scribner said:


> First, I take it you want me to do just my second instruction (I2) from post #84.
> 
> I2. Run `# pkg install xorg`


Nope. My instructions assume you have it installed already.


Scribner said:


> Question: Should I then reboot the computer?


Rebooting the computer will get you to the starting line of my troubleshooting list.


Scribner said:


> Next (#2), I will log in as a regular user (important). Then (#3) I will run `% startx` as a regular user. The TWM window manger should then start (#4). I should be able to return to text mode by typing `exit` in every single Xterm I can find (#5).
> 
> Question: What should I do if I can't return to text mode (which I take it is the same thing as the command line/[in my case] tcsh shell)?


There's at least a couple Xterm windows visible when you start the TWM window manager. I think you can google the term 'Using TWM window manager' to get an idea of what I'm talking about.


Scribner said:


> Question: If I make it back to text mode, should I reboot?


Not necessary, but won't hurt anything, either.


Scribner said:


> If I can successfully complete these steps without errors, I know I'm ready to install KDE. Should I then move on to my third instruction (I3)?
> 
> I3. Run `# pkg install kde5 drm-kmod firefox`


If you have Xorg installed and running (You just ended the Xorg session when you got out of TWM), then you can skip the drm-kmod part when installing stuff.


Scribner said:


> Question: So a question I still have is, _Should I follow *[FONT=monospace]Trihexagonal[/FONT]*'s advice to create the ~/.xinitrc file from my usr account so I'm not running x11-wm/fluxbox as root_?


If you completed the 5-step troubleshooting list that I outlined, you're ready to play with ~/.xinitrc.


Scribner said:


> If so, should I amend my instructions to enter `# exit` to leave the superuser account before I20?
> 
> I20. Enter the easy editor to edit the file ~/.xinitrc by entering the following command: `# ee ~/.xinitrc`


All files in your $HOME directory should be edited as regular user, not as root. Also - if you don't know how to use ee, google for instructions. I personally use editors/nano for such tasks, it's one of the first things I install.


----------



## Scribner (Nov 18, 2021)

eternal_noob said:


> A friendly advice: You are overthinking it.


I know it must seem that way. It's a fault in my writing style when discussing technical matters. I really just want to know the best (and most correct) way to run FreeBSD for desktop. I also want to avoid the headache of coming back to the forums if there are problems.



astyle said:


> Nope. My instructions assume you have it installed already.


Thanks for adding that second sentence; I was just about to ask for clarification. So, in my case, with a fresh install of FreeBSD, I take it I will just install xorg first?


astyle said:


> Rebooting the computer will get you to the starting line of my troubleshooting list.


And then reboot to get to the beginning of your troubleshooting list?


astyle said:


> There's at least a couple Xterm windows visible when you start the TWM window manager. I think you can google the term 'Using TWM window manager' to get an idea of what I'm talking about.


I Googled "xterm." I think I have an idea of what to expect. It looks kind of like a primitive desktop environment if I'm not mistaken. I take it the mouse will work?


astyle said:


> Not necessary, but won't hurt anything, either.


If rebooting won't hurt anything, I think I'll elect to do it.


astyle said:


> If you have Xorg installed and running (You just ended the Xorg session when you got out of TWM), then you can skip the drm-kmod part when installing stuff.


That's good to know. While I believe you, would there be any harm in doing the drm-kmod part* again for good measure?

* By "part," I take it you mean I should not install drm-kmod in I3...

 I3. Run `# pkg install kde5 drm-kmod firefox`

... _and_ I should not do instructions 10-14? Correct for both?

I10. Enter the easy editor to edit the file /etc/rc.conf by entering the following command:  `# ee /etc/rc.conf`
I11. Once in the easy editor, on a new line, enter the following line: 
	
	



```
kld_list="/boot/modules/i915kms.ko"
```
I12. Make sure to hit *Enter* so the file starts on a new line after saving.
I13. 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.
I14. Go ahead and load the drm driver. Run  `# kldload /boot/modules/i915kms.ko`

Are there any other instructions I should not do? (Link to instructions: post #84.)



astyle said:


> If you completed the 5-step troubleshooting list that I outlined, you're ready to play with ~/.xinitrc.


Sounds good.



astyle said:


> All files in your $HOME directory should be edited as regular user, not as root. Also - if you don't know how to use ee, google for instructions. I personally use editors/nano for such tasks, it's one of the first things I install.


This is really good advice; I did not know this. I take it one can tell ~/.xinitrc is in the $HOME directory because it begins with "~/."? The only other files I edit in my instructions are /etc/fstab and /etc/rc.conf. I take it these aren't in the $HOME directory and I am supposed to edit these files with the root account?

I think I understand the easy editor enough to do basic edits.

Thanks so much!

Edit (06:01 UTC): I am going to get some sleep and will work on this later today.


----------



## grahamperrin@ (Nov 18, 2021)

Scribner said:


> I am holding off on installing KDE, however, until there are solid answers to Q2 and Q7.



You want to use Fluxbox instead of KWin with KDE Plasma?


----------



## Scribner (Nov 18, 2021)

grahamperrin said:


> You want to use Fluxbox instead of KWin with KDE Plasma?


You must be talking about Q7. I must admit, I'm not even sure what x11-wm/fluxbox is -- or KWin, for that matter. I am not sure which one I will be using (if I even use one at all). Regardless, it sounds like I'm supposed to edit ~/.xinitrc from my usr account.


----------



## jardows (Nov 18, 2021)

So, in my VM, I installed FreeBSD, xorg, and KDE according to the handbook.  I did not run startx until after adding the appropriate line in the~/.xinitrc file.  Shutdown and restart controls worked without issue.  So the issue I've encountered where needing to run `startx` before using sddm or `startx` seems to be limited to XFCE.


----------



## astyle (Nov 18, 2021)

Scribner said:


> Thanks for adding that second sentence; I was just about to ask for clarification. So, in my case, with a fresh install of FreeBSD, I take it I will just install xorg first?


Correct. If you run `pkg info xorg` (better do it as root), that will tell you if you even have the package installed. I assume you already have drm-kmod installed? And i915.ko i915kms.ko kldload-ed? If you don't, Xorg won't run, even if you install the package. (Edited for correct module name after grahamperrin pointed out my typo later )


Scribner said:


> And then reboot to get to the beginning of your troubleshooting list?


Why reboot twice? No harm done, but pointless.


Scribner said:


> I Googled "xterm." I think I have an idea of what to expect. It looks kind of like a primitive desktop environment if I'm not mistaken. I take it the mouse will work?


Google the exact term I gave you. You will get mostly Linux-based results, that's OK. the point is to take a look at screenshots of what a running, but bare-bones Xorg even looks like, and get some ideas of how to navigate that kind of graphical interface. Then getting in and out of Xorg will be easy on your FreeBSD install. And yes, the mouse should work fine.


Scribner said:


> I14. Go ahead and load the drm driver. Run `# kldload /boot/modules/i915kms.ko`


Your i14 really needs to happen BEFORE my troubleshooting list. Basically, move that instruction WAY up your list. It should be i2 or i3, not i14. Done correctly, the text on the screen (command line that you booted to) will appear smaller after a screen flicker.


Scribner said:


> This is really good advice; I did not know this. I take it one can tell ~/.xinitrc is in the $HOME directory because it begins with "~/."? The only other files I edit in my instructions are /etc/fstab and /etc/rc.conf. I take it these aren't in the $HOME directory and I am supposed to edit these files with the root account?


Your understanding is correct on that.

I'd say it is a good idea to take notes on what you did, what works, what doesn't - but order of steps matters. in the world of FreeBSD, the basic logic of software management is:

install - Just run `pkg install` for what you need. Some packages have dependencies (pre-requisites).
configure - this comes AFTER installing everything you need. Some softwares have their own .conf files.
turn on - edit rc.conf so that .ko files get loaded at boot, and daemons get started.
Decision tree stems from there.  If something isn't working, just be willing to backtrack. First, comes drm-kmod.  Go through the steps (install, configure, turn on). Then comes xorg (install, configure, turn on). Then KDE (install, configure, turn on).


----------



## grahamperrin@ (Nov 18, 2021)

astyle said:


> i915.ko



Typo. There's no such module. 



Scribner said:


> KWin



KWin <https://en.wikipedia.org/wiki/KWin> is the window manager <https://en.wikipedia.org/wiki/Window_manager> that is normally used with KDE. 

The port to FreeBSD: x11-wm/plasma5-kwin


----------



## grahamperrin@ (Nov 18, 2021)

astyle said:


> *video*. This is really important for starting and running Xorg. Without it, you can install the GPU driver, and enable it in rc.conf, but you still won't be able to load it. This directly will lead to Xorg not starting.



Starting X does *not* require membership of the _video_ group.




Please recall <https://forums.freebsd.org/posts/534211> and the bug report that arose later in the topic.



astyle said:


> *operator*. … I think parts of the graphics stack also require such access.



I'm not aware of a requirement.


----------



## grahamperrin@ (Nov 18, 2021)

Scribner said:


> … Would you be able to share where you were told to mount /dev/fd?





mer said:


> … it was in a package message …



FreshPorts finds /dev/fd in package messages for these ports:

java/bootstrap-openjdk11
java/bootstrap-openjdk6
java/bootstrap-openjdk8
java/openjdk11
java/openjdk11-jre
java/openjdk12
java/openjdk13
java/openjdk14
java/openjdk15
java/openjdk16
java/openjdk17
java/openjdk7
java/openjdk7-jre
java/openjdk8
java/openjdk8-jre
mail/spamd


----------



## Scribner (Nov 18, 2021)

jardows said:


> So, in my VM, I installed FreeBSD, xorg, and KDE according to the handbook.  I did not run startx until after adding the appropriate line in the~/.xinitrc file.  Shutdown and restart controls worked without issue.  So the issue I've encountered where needing to run `startx` before using sddm or `startx` seems to be limited to XFCE.


Thanks for letting me know. I wonder if this changes what astyle and I have been discussing and if Rough Draft #2 (see post #84) would work without issues (though I would still need to change the last part to have the ~/.xinitrc file edited from a usr account).



astyle said:


> Correct. If you run `pkg info xorg` (better do it as root), that will tell you if you even have the package installed. I assume you already have drm-kmod installed? And i915.ko kldload-ed? If you don't, Xorg won't run, even if you install the package.


I'm pretty sure I don't have Xorg, drm-kmod, and i915.ko kldload-ed installed yet. The _only_ thing I've done so far is install FreeBSD 13.0-RELEASE and make sure I am able to log in and restart. I haven't installed anything or done anything else.



astyle said:


> Why reboot twice? No harm done, but pointless.


I was just going to err on the side of caution, but I believe you. I might not include this step.



astyle said:


> Google the exact term I gave you. You will get mostly Linux-based results, that's OK. the point is to take a look at screenshots of what a running, but bare-bones Xorg even looks like, and get some ideas of how to navigate that kind of graphical interface. Then getting in and out of Xorg will be easy on your FreeBSD install. And yes, the mouse should work fine.


I Googled the exact term you gave me, "Using TWM window manager," and looked at this article, Get back to basics with the TWM Linux desktop. This passage seems relevant: "You can get a pop-up menu with a left-click on the desktop. By default, it has one application listed: xterm. When you launch xterm, the outline of a window appears until you click to place it on the desktop." What's the last sentence talking about? You wanted me to return to text mode by typing `exit` in every single xterm I can find. How does that last sentence figure in? I guess I'm just worried about the possibility of being stuck in TWM if I am not able to close all the xterm's for some reason.



astyle said:


> Your i14 really needs to happen BEFORE my troubleshooting list. Basically, move that instruction WAY up your list. It should be i2 or i3, not i14. Done correctly, the text on the screen (command line that you booted to) will appear smaller after a screen flicker.


Thanks. This brings me back to my first quote for you in this reply. I will make sure Rough Draft #2's I10-I14 happen right away in Rough Draft #3 (see below). I think I know what you're talking about regarding the text on the screen in the command line I boot to appearing smaller after a screen flicker (from my first install over two years ago).



astyle said:


> Your understanding is correct on that.
> 
> I'd say it is a good idea to take notes on what you did, what works, what doesn't - but order of steps matters. in the world of FreeBSD, the basic logic of software management is:
> 
> ...


Thanks for the confirmation. And I am definitely taking notes. One of the reasons I started this thread and keep asking so many questions is I want to have good instructions for future installs as well. Your basic logic of software management is helpful; I will keep it in mind. Thanks also for reiterating the order for installing the components of the desktop.



grahamperrin said:


> Typo. There's no such module.


Thank you. I take it astyle meant running `# kldload /boot/modules/i915kms.ko`. not "i915.ko kldload-ed," or am I missing something?



grahamperrin said:


> KWin <https://en.wikipedia.org/wiki/KWin> is the window manager <https://en.wikipedia.org/wiki/Window_manager> that is normally used with KDE.
> 
> The port to FreeBSD: x11-wm/plasma5-kwin


Thanks; that's good to know. I'm not sure if anyone else has said anything about KWin yet.



grahamperrin said:


> Starting X does *not* require membership of the _video_ group.
> 
> View attachment 12052
> 
> ...


Interesting. Thank you. I made my main user part of the operator, wheel, and video groups. So this wasn't necessary? Is there ever an event where it would be helpful? Could it cause any harm?



grahamperrin said:


> FreshPorts finds /dev/fd in package messages for these ports:
> 
> java/bootstrap-openjdk11
> java/bootstrap-openjdk6
> ...


Thank you. It sounds like a good idea to mount it then.

--

I will now prepare a third version of my rough draft for installing KDE. If astyle and anyone else could kindly look over the instructions, that would be great. I think it is necessary to have a third version of the rough draft because (primarily) astyle and I have discussed many changes from the second rough draft. I think it will be much easier to discuss changes (if there are any) after looking at fresh set of instructions.

*Instructions for Installing KDE on FreeBSD (Rough Draft #3)*

_In this third rough draft of instructions, I will show you how to install KDE that will be started with the command  startx. My second rough draft of instructions should not be followed because steps I20-I23 are not edited from a usr account (i.e. they should not be edited as root). My first rough draft of instructions shows you how to install KDE that is started by sddm. This third version of instructions contains edits suggested mostly by astyle. Thanks go to him!_

J1. 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 *#*.

J2. Run `# pkg install drm-kmod`

J3. Enter the easy editor to edit the file /etc/rc.conf by entering the following command: `# ee /etc/rc.conf`

J4. Once in the easy editor, on a new line, enter the following line: 
	
	



```
kld_list="/boot/modules/i915kms.ko"
```

J5. Make sure to hit *Enter* so the file starts on a new line after saving.

J6. 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.

J7. Go ahead and load the drm driver. Run `# kldload /boot/modules/i915kms.ko`

J8. Run `# pkg install xorg`

J9. Reboot by running `# shutdown -r now` and booting up to a command-line login prompt.

J10. Log in as regular user (this is important).

J11. Run `% startx` as regular user (Even the Handbook tells you to do that, the Quick Start section 5.4.1, Step 3.)

J12. TWM window manager will start. You can return to text mode by typing `exit` in every single Xterm you can find.

J13. Become the superuser/root account again by running `% su`

J14. Reboot by running `# shutdown -r now`

J15. After logging in, become the superuser/root account again by running `% su`

J16. Run `# pkg install kde5 firefox`

J17. Enter the easy editor to edit the file /etc/fstab by entering the following command: `# ee /etc/fstab`

J18. Once in the easy editor, on new lines, enter the following two lines (you can push the *Tab* key or spacebar after entering each field):
`fdesc                   /dev/fd fdescfs rw                      0       0
proc                    /proc   procfs  rw                      0       0`
(See post #33. There is debate on whether this instruction should be included; I am including it because it may be beneficial for those who want to run applications such as LibreOffice.)

J19. Make sure to hit *Enter* so the file starts on a new line after saving.

J20. Save and exit the easy editor by pushing *Esc* and following the prompts to save and exit.

J21. Run `# mount /dev/fd`

J22. Run `# mount /proc`

J23. Enter the easy editor to edit the file /etc/rc.conf by entering the following command: `# ee /etc/rc.conf`

J24. Once in the easy editor, on a new line, enter the following line: 
	
	



```
dbus_enable="YES"
```

J25. Make sure to hit *Enter* so the file starts on a new line after saving.

J26. Save and exit the easy editor by pushing *Esc* and following the prompts to save and exit.

J27. Run `# service dbus start`

J28. Exit the superuser account by running `# exit`. All files in your $HOME directory should be edited as a regular user, not as root.

J29. Enter the easy editor to edit the file ~/.xinitrc by entering the following command: `% ee ~/.xinitrc`

J30. Once in the easy editor, on a new line, enter the following line: 
	
	



```
exec ck-launch-session startplasma-x11
```

J31. Make sure to hit *Enter* so the file starts on a new line after saving.

J32. Save and exit the easy editor by pushing *Esc* and following the prompts to save and exit.

J33. Become the superuser/root account again by running `% su`

J34. Reboot by running `# shutdown -r now`

J35. If you chose not to reboot, enter `# exit` to leave the superuser account.

J36. If everything worked, you should see the KDE desktop after running `% startx` as a regular account.


----------



## astyle (Nov 18, 2021)

Almost there... move your J24 up to J4. In step J4, you should add *two* lines to /etc/rc.conf : `kld_list="/boot/modules/i915kms.ko"` and `dbus_enable="YES"`. That's the difference maker left to iron out in your notes.

Your instructions J18 (and J21, by extension) are debatable, because the Handbook doesn't mention fdescfs for setting up KDE.  I don't think it hurts anything, though.


----------



## Scribner (Nov 18, 2021)

astyle said:


> Almost there... move your J24 up to J4. In step J4, you should add *two* lines to /etc/rc.conf : `kld_list="/boot/modules/i915kms.ko"` and `dbus_enable="YES"`. That's the difference maker left to iron out in your notes.


Thanks! I will type up Rough Draft #4 below, which I take it will be the final draft.



astyle said:


> Your instructions J18 (and J21, by extension) are debatable, because the Handbook doesn't mention fdescfs for setting up KDE.  I don't think it hurts anything, though.


See these two messages by mer (post #90) and Vull (post #93) that say they got /dev/fd in package messages, namely in LibreOffice. If that's what they're saying--and I am planning on using LibreOffice--it seems like a good idea to include these instructions (unless I'm mistaken).

Would you also be able to look at and respond to the following passage in my last reply?



Scribner said:


> I Googled the exact term you gave me, "Using TWM window manager," and looked at this article, Get back to basics with the TWM Linux desktop. This passage seems relevant: "You can get a pop-up menu with a left-click on the desktop. By default, it has one application listed: xterm. When you launch xterm, the outline of a window appears until you click to place it on the desktop." What's the last sentence talking about? You wanted me to return to text mode by typing `exit` in every single xterm I can find. How does that last sentence figure in? I guess I'm just worried about the possibility of being stuck in TWM if I am not able to close all the xterm's for some reason.


--

*Instructions for Installing KDE on FreeBSD (Rough Draft #4)*

_In this fourth rough draft of instructions, I will show you how to install KDE that will be started with the command  startx. My second rough draft of instructions should not be followed because steps I20-I23 are not edited from a usr account (i.e. they should not be edited as root). The third rough draft of instructions should also not be followed because steps J23-J27 should be merged with step J4. My first rough draft of instructions shows you how to install KDE that is started by sddm. Thanks go to astyle for ironing out the final details and everyone else who contributed on The FreeBSD Forums._

K1. 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 *#*.

K2. Run `# pkg install drm-kmod`

K3. Enter the easy editor to edit the file /etc/rc.conf by entering the following command: `# ee /etc/rc.conf`

K4. Once in the easy editor, on a new line, enter the following two lines on separate lines: 
	
	



```
kld_list="/boot/modules/i915kms.ko"
dbus_enable="YES"
```

K5. Make sure to hit *Enter* so the file starts on a new line after saving.

K6. 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.

K7. Go ahead and load the drm driver. Run `# kldload /boot/modules/i915kms.ko`

K8. Run `# service dbus start`

K9. Run `# pkg install xorg`

K10. Reboot by running `# shutdown -r now` and booting up to a command-line login prompt.

K11. Log in as regular user (this is important).

K12. Run `% startx` as regular user (Even the Handbook tells you to do that, the Quick Start section 5.4.1, Step 3.)

K13. TWM window manager will start. You can return to text mode by typing `exit` in every single Xterm you can find.

K14. Become the superuser/root account again by running `% su`

K15. Reboot by running `# shutdown -r now`

K16. After logging in, become the superuser/root account again by running `% su`

K17. Run `# pkg install kde5 firefox`

K18. Enter the easy editor to edit the file /etc/fstab by entering the following command: `# ee /etc/fstab`

K19. Once in the easy editor, on new lines, enter the following two lines (you can push the *Tab* key or spacebar after entering each field):
`fdesc                   /dev/fd fdescfs rw                      0       0
proc                    /proc   procfs  rw                      0       0`
(See post #33. There is debate on whether this instruction should be included; I am including it because it may be beneficial for those who want to run applications such as LibreOffice.)

K20. Make sure to hit *Enter* so the file starts on a new line after saving.

K21. Save and exit the easy editor by pushing *Esc* and following the prompts to save and exit.

K22. Run `# mount /dev/fd`

K23. Run `# mount /proc`

K24. Exit the superuser account by running `# exit`. All files in your $HOME directory should be edited as a regular user, not as root.

K25. Enter the easy editor to edit the file ~/.xinitrc by entering the following command: `% ee ~/.xinitrc`

K26. Once in the easy editor, on a new line, enter the following line: 
	
	



```
exec ck-launch-session startplasma-x11
```

K27. Make sure to hit *Enter* so the file starts on a new line after saving.

K28. Save and exit the easy editor by pushing *Esc* and following the prompts to save and exit.

K29. Become the superuser/root account again by running `% su`

K30. Reboot by running `# shutdown -r now`

K31. If you chose not to reboot, enter `# exit` to leave the superuser account.

K32. If everything worked, you should see the KDE desktop after running `% startx` as a regular account.

--

How do those look?


----------



## astyle (Nov 18, 2021)

Scribner said:


> Would you also be able to look at and respond to the following passage in my last reply?
> 
> --


I was just hoping that this will give you a visual handle on how I expected my 5 troubleshooting step to work.  Some places provide pretty good commentary to the screenshots. Just do some playing with Xorg as those places suggest, but don't forget that this 'playing' is right in the middle of my 5 steps, and you still gotta come back. Kind of like exiting off the freeway into a rest area, and then getting back on the freeway to continue the trip.


----------



## eternal_noob (Nov 18, 2021)

K7 and K8 are superfluous if you reboot in step K10 anyway.
`i915kms` and `dbus` get loaded while booting because you added them to /etc/rc.conf in K4.


----------



## astyle (Nov 18, 2021)

I just took a look at the link that Scribner provided (https://opensource.com/article/19/12/twm-linux-desktop). One of the screenshots (Under section "Desktop Tour") should have provided a hint on how to exit an Xorg/TWM session.   And yeah, it's slightly different than what I've been saying.  But the basic idea is the same.


----------



## Scribner (Nov 18, 2021)

eternal_noob said:


> K7 and K8 are superfluous if you reboot in step K10 anyway.
> `i915kms` and `dbus` get loaded while booting because you added them to /etc/rc.conf in K4.


I think you're right. I guess I'll just keep those steps in there for now in the event someone doesn't restart or if someone is taking bits and pieces from these instructions. Those instructions can't hurt, can they?



astyle said:


> I just took a look at the link that Scribner provided (https://opensource.com/article/19/12/twm-linux-desktop). One of the screenshots (Under section "Desktop Tour") should have provided a hint on how to exit an Xorg/TWM session.   And yeah, it's slightly different than what I've been saying.  But the basic idea is the same.


Thanks! That is actually really helpful. So I take it I would open the pop-up menu by left-clicking on the desktop and then click *Exit* to return to text mode? Do this instead of typing `exit` in every single xterm I can find?


----------



## astyle (Nov 18, 2021)

Scribner said:


> Thanks! That is actually really helpful. So I take it I would open the pop-up menu by left-clicking on the desktop and then click *Exit* to return to text mode? Do this instead of typing `exit` in every single xterm I can find?


Yeah. I was hoping you'll look at more than one such article, but even this was a useful exercise in doing research and connecting the dots back to your FreeBSD adventures.


----------



## eternal_noob (Nov 18, 2021)

Scribner said:


> Those instructions can't hurt, can they?


While those instructions are not harmful per se i believe that tutorials should be as short as possible and focus on the necessary steps. Maybe people know that these modules get started while booting and are confused and wonder why you start them beforehand.


----------



## Scribner (Nov 19, 2021)

astyle said:


> Yeah. I was hoping you'll look at more than one such article, but even this was a useful exercise in doing research and connecting the dots back to your FreeBSD adventures.


I will try to read more about TWM once I get KDE set up. It does seem interesting, but right now all I can think about is getting KDE set up.



eternal_noob said:


> While those instructions are not harmful per se i believe that tutorials should be as short as possible and focus on the necessary steps. Maybe people know that these modules get started while booting and are confused and wonder why you start them beforehand.


Upon further reflection, I think you were in the right, and I was in the wrong. I am going to amend my instructions (see Rough Draft #5 below) to say those two instructions are not necessary. With that said, I am still going to do the instructions myself -- even though I'm sure 99% of FreeBSD users would not. This is because I am overly cautious and want to do everything I can to make sure everything is loaded and works. Keeping the instructions in the rough draft -- though saying they are not necessary -- is mostly just for myself, but maybe other people will find seeing those steps mentioned and _why_ they don't need to be followed helpful. Thank you for your concern.

--

I think I am going to attempt to install KDE now because tonight is the longest lunar eclipse in 580 years. (I know, I'm weird.) How do I take a screenshot once I get into KDE (so I can post it here)?

--

*Instructions for Installing KDE on FreeBSD (Rough Draft #5)*

_In this fifth rough draft of instructions, I will show you how to install KDE that will be started with the command  startx. My second rough draft of instructions should not be followed because steps I20-I23 are not edited from a usr account (i.e. they should not be edited as root). The third rough draft of instructions should also not be followed because steps J23-J27 should be merged with step J4. The fourth rough draft is mostly correct; this fifth rough draft makes minor edits to L7, L8, and L13. My first rough draft of instructions shows you how to install KDE that is started by sddm. Thanks go to astyle for ironing out the final details and everyone else who contributed on The FreeBSD Forums._

L1. 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 *#*.

L2. Run `# pkg install drm-kmod`

L3. Enter the easy editor to edit the file /etc/rc.conf by entering the following command: `# ee /etc/rc.conf`

L4. Once in the easy editor, on a new line, enter the following two lines on separate lines: 
	
	



```
kld_list="/boot/modules/i915kms.ko"
dbus_enable="YES"
```

L5. Make sure to hit *Enter* so the file starts on a new line after saving.

L6. 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.

L7. (L7 and L8 are superfluous if you reboot in step L10. `i915kms` and `dbus` get loaded while booting because you added them to /etc/rc.conf in L4. In other words, you can skip L7 and L8. I am still including the steps for future reference.) Go ahead and load the drm driver. Run `# kldload /boot/modules/i915kms.ko`

L8. (L7 and L8 are superfluous if you reboot in step L10. `i915kms` and `dbus` get loaded while booting because you added them to /etc/rc.conf in L4. In other words, you can skip L7 and L8. I am still including the steps for future reference.) Run `# service dbus start`

L9. Run `# pkg install xorg`

L10. Reboot by running `# shutdown -r now` and booting up to a command-line login prompt.

L11. Log in as regular user (this is important).

L12. Run `% startx` as regular user (Even the Handbook tells you to do that, the Quick Start section 5.4.1, Step 3.)

L13. TWM window manager will start. You can return to text mode by opening the pop-up menu by left-clicking on the desktop and then clicking *Exit*.

L14. Become the superuser/root account again by running `% su`

L15. Reboot by running `# shutdown -r now`

L16. After logging in, become the superuser/root account again by running `% su`

L17. Run `# pkg install kde5 firefox`

L18. Enter the easy editor to edit the file /etc/fstab by entering the following command: `# ee /etc/fstab`

L19. Once in the easy editor, on new lines, enter the following two lines (you can push the *Tab* key or spacebar after entering each field):
`fdesc                   /dev/fd fdescfs rw                      0       0
proc                    /proc   procfs  rw                      0       0`
(See post #33. There is debate on whether this instruction should be included; I am including it because it may be beneficial for those who want to run applications such as LibreOffice.)

L20. Make sure to hit *Enter* so the file starts on a new line after saving.

L21. Save and exit the easy editor by pushing *Esc* and following the prompts to save and exit.

L22. Run `# mount /dev/fd`

L23. Run `# mount /proc`

L24. Exit the superuser account by running `# exit`. All files in your $HOME directory should be edited as a regular user, not as root.

L25. Enter the easy editor to edit the file ~/.xinitrc by entering the following command: `% ee ~/.xinitrc`

L26. Once in the easy editor, on a new line, enter the following line: 
	
	



```
exec ck-launch-session startplasma-x11
```

L27. Make sure to hit *Enter* so the file starts on a new line after saving.

L28. Save and exit the easy editor by pushing *Esc* and following the prompts to save and exit.

L29. Become the superuser/root account again by running `% su`

L30. Reboot by running `# shutdown -r now`

L31. If you chose not to reboot, enter `# exit` to leave the superuser account.

L32. If everything worked, you should see the KDE desktop after running `% startx` as a regular account.


----------



## astyle (Nov 19, 2021)

Scribner said:


> How do I take a screenshot once I get into KDE (so I can post it here)?


graphics/spectacle is the screenshot utility I use. I highly recommend it, it's part of the KDE project. Oh, and I can also recommed x11/konsole, it's the KDE version of Xterm.


----------



## Scribner (Nov 19, 2021)

KDE is up and running! See the attachments for a photo (I have not figured out how to do screenshots yet).

However, I have some concerns and took (mostly good) notes.

1. After entering L2, I got this message:


> The package management tool is not yet installed on your system. Do you want to fetch and install it now? [y/N]



I entered y. I take it this bootstraps the system to use packages; is that right?

2. When I was trying to type L7, it entered the command too soon (I don’t _think_ I accidentally pressed Enter). So the command was something like `# kldload /boot/` or some other fractional portion rather than `# kldload /boot/modules/i915kms.ko`

I got some kind of error message, which I wish I wrote down. I even had to type `exit` to get back to the command prompt (the cursor was just blinking on some empty line). Do you know why this happened? And do you know anything about the command kldload and if I potentially messed up my computer?

3. When I did step L8, I got this message:


> dbus does not exist in /etc/rc.d or the local startup
> directories (/usr/local/etc/rc.d), or is not executable



4. For L13, I clicked *Exit*, but I also had to enter `exit` in all the xterm’s to get back to text mode.

5. I skipped L18-L23, because I couldn’t figure out where to enter the fields in L19. Is it OK that I skipped these steps? Can I add those lines and run those commands later? Please see the attached photo and let me know where I should enter each of the fields.

6. This one is not specific to the desktop install, but, rather, has been present ever since I installed FreeBSD last night. Do you know why my computer's clock is set to UTC, but it shows my timezone (CST) after the UTC time when I first boot up the computer? Shouldn't the time either be my local time or the timezone be UTC? I'm confused with this nomenclature. I believe I set up the computer to check the network time at startup, yet it still seems maybe a minute off. Do you know what's going on with the computer's clock?


----------



## grahamperrin@ (Nov 19, 2021)

Scribner said:


> FreeBSD 13.0-RELEASE





Scribner said:


> `# kldload /boot/modules/i915kms.ko`



Instead (the full path is superflous):

`# kldload i915kms`



astyle said:


> add *two* lines to /etc/rc.conf : ``



For safety, better make it habit to use sysrc(8). 

(People sometimes add a line without realising that instead, it's necessary to _edit_ an existing line. And so on.)



Scribner said:


> say they got /dev/fd in package messages, namely in LibreOffice.



There's no such message.

<https://www.freshports.org/editors/libreoffice/#message>

<https://cgit.freebsd.org/ports/tree/editors/libreoffice>


----------



## grahamperrin@ (Nov 19, 2021)

Scribner said:


> When I did step L8, I got this message:



Please share your rc.conf and the output from `pkg info -x dbus`


----------



## Vull (Nov 19, 2021)

Scribner said:


> (I have not figured out how to do screenshots yet).
> 
> ...


For screenshots in KDE or Mate, just press the [Print Screen] or [prt sc] key on your keyboard, if your keyboard has such a key. A save screenshot file dialog should pop up immediately.


----------



## grahamperrin@ (Nov 19, 2021)

Scribner said:


> I made my main user part of the operator, wheel, and video groups.



So:



Scribner said:


> L14. Become the superuser/root account again by running `% su`



– that's unnecessary, because operators can reboot.



> L15. Reboot by running `# shutdown -r now`



Instead, to avoid loss of history:

`exit` (repeatedly, if necessary) until the login prompt reappears
If no other user is logged in (at a different tty), Control-Alt-Delete
– alternatively, explicitly save command history before shutdown(8).

Assuming use of a shell that allows saving; <https://forums.freebsd.org/posts/522112>.


----------



## grahamperrin@ (Nov 20, 2021)

These four steps:



Scribner said:


> L3. Enter the easy editor to edit the file /etc/rc.conf by entering the following command: `# ee /etc/rc.conf`
> 
> L4. Once in the easy editor, on a new line, enter the following two lines on separate lines:
> 
> ...



– can be condensed to a single line: 

`sysrc dbus_enable="YES" ; sysrc kld_list+=i915kms`



Scribner said:


> The KMS driver should now be set up.



(For Intel graphics.)


----------



## eternal_noob (Nov 20, 2021)

Likewise, L2, L9, L17 can be condensed to a single line
`pkg install drm-kmod xorg kde5 firefox`

I don't want to sound mean but i think 70% of this tutorial is just unecessary information.
Keep it short, keep it simple. No one wants to read an entire book just to install KDE.


----------



## grahamperrin@ (Nov 20, 2021)

Something subtle: installing those four packages at once might lead to a _long_-ish list of post-installation messages, one or more of which might be overlooked.

If there's a separate step for installation of graphics/drm-kmod, then the one and only package message will be more likely to receive attention.



eternal_noob said:


> Keep it short, keep it simple.



+1

This topic is, I think, more of a learning journey than the "Best (and Most Correct) Way to Run FreeBSD for Desktop". The journey is a good thing  the guidance draft instructions will be debatable.


----------



## eternal_noob (Nov 20, 2021)

Ok, but you can read all the messages afterwards with `pkg info -a -D` or for a single package with `pkg info -D <package>`.

Edit:
I would structure the tutorial like this:

Become root
Install necessary packages
Read post-installation messages of packages
Edit /etc/rc.conf to start services on boot
Edit /etc/fstab for additional mount points
Reboot
Edit ~/.xinitrc in order to start KDE on `startx`
Profit


----------



## Scribner (Nov 20, 2021)

grahamperrin said:


> Instead (the full path is superflous):
> 
> `# kldload i915kms`


Thanks; I will think about adding that to the instructions if I make another rough draft.



grahamperrin said:


> For safety, better make it habit to use sysrc(8).
> 
> (People sometimes add a line without realising that instead, it's necessary to _edit_ an existing line. And so on.)


Thanks; that's good to know. If I make another rough draft, I will add a note about that. I did actually use `sycrc` in my first rough draft of instructions (post #53). I switched to editing /etc/rc.conf because I thought it provided more understanding of what was going on in the step.

Regarding editing an existing line versus adding a line, I added two new lines without even checking (a mistake). But I take it, in this instance, I was supposed to add two new lines?



grahamperrin said:


> There's no such message.
> 
> <https://www.freshports.org/editors/libreoffice/#message>
> 
> <https://cgit.freebsd.org/ports/tree/editors/libreoffice>


I'm not sure what I will mount then, when I figure out how to do that.



grahamperrin said:


> Please share your rc.conf and the output from `pkg info -x dbus`


See the attached photos. I take it you wanted me to run `pkg info -x dbus` as root?



Vull said:


> For screenshots in KDE or Mate, just press the [Print Screen] or [prt sc] key on your keyboard, if your keyboard has such a key. A save screenshot file dialog should pop up immediately.


Thanks; that worked! I've never seen a screenshot program that advanced before.



grahamperrin said:


> – that's unnecessary, because operators can reboot.


Thanks. I did not know that.



grahamperrin said:


> Instead, to avoid loss of history:
> 
> `exit` (repeatedly, if necessary) until the login prompt reappears
> If no other user is logged in (at a different tty), Control-Alt-Delete
> ...


When you say "to avoid loss of history," do you mean to avoid data loss or just to avoid losing a visual record of the previous commands entered?

A related question, what does Control-Alt-Delete do on FreeBSD? Does it work in the command-line interface as well as KDE?

I am using the tcsh shell.



grahamperrin said:


> These four steps:
> 
> 
> 
> ...


Thanks. I will think about adding that if I make another rough draft. Would I also be able to run `# sysrc dbus_enable="YES" && service dbus start ; sysrc kld_list+=i915kms`? Furthermore, how could I add to that command to load the drm driver? In my first set of instructions I use `# kldload /boot/modules/i915kms.ko`. Would it be something like `# sysrc dbus_enable="YES" && service dbus start ; sysrc kld_list+=i915kms && kldload i915kms`?



grahamperrin said:


> (For Intel graphics.)


Thanks. If I make another rough draft I will specify that in L6.



eternal_noob said:


> Likewise, L2, L9, L17 can be condensed to a single line
> `pkg install drm-kmod xorg kde5 firefox`
> 
> I don't want to sound mean but i think 70% of this tutorial is just unecessary information.
> Keep it short, keep it simple. No one wants to read an entire book just to install KDE.


Earlier versions of my rough draft did have you install drm-kmod and xorg with kde5 and firefox. My discussion with astyle (and possibly other users) made me decide to install all the packages in a particular order.

The instructions are mostly for myself, being a noob. I found that short instructions often left out steps or didn't explain how things worked. With that said, debating the instructions for installing a FreeBSD desktop is what this thread is all about!



grahamperrin said:


> This topic is, I think, more of a learning journey than the "Best (and Most Correct) Way to Run FreeBSD for Desktop". The journey is a good thing  the guidance draft instructions will be debatable.


Agreed. I would never be so bold as to say my instructions are the "Best (and Most Correct) Way to Run FreeBSD for Desktop." They should be approached with healthy skepticism.



eternal_noob said:


> Edit:
> I would structure the tutorial like this:
> 
> Become root
> ...


That's helpful, thanks.

--

If anyone has time, could you _please_ also look over my post-installation questions (post #129)?

Maybe start with figuring out why my system clock is UTC, but the timezone shows as Central U.S. (CST). It looks like I might be able to set the clock in KDE, but, because the problem was there before I installed KDE (and it seems more like a FreeBSD issue), I think it would be better to do a correction in the command line. In another thread on the Forums, a user says to create an empty file for /etc/wall_cmos_clock by running `# touch /etc/wall_cmos_clock`, but other people suggest doing other methods. Even after reading the man page, I am not sure what the `touch` command does.


----------



## grahamperrin@ (Nov 20, 2021)

Scribner said:


> … using the tcsh shell. …



Run a few commands, then close the terminal window (without commanding `exit`); Alt-F4 should do it. Then in a new terminal window:

`history`

– the commands will not be there (at the tail of the history).

Having a well-kept history (appropriate use of `history -S`, `exit` and Control-D) can help with learning.


----------



## astyle (Nov 20, 2021)

Scribner said:


> A related question, what does Control-Alt-Delete do on FreeBSD? Does it work in the command-line interface as well as KDE?


Ctrl-Alt-Del keyboard combination is for rebooting the computer. This key combination works even on FreeBSD, and it doesn't care if you're in a CLI or in KDE - the computer will reboot regardless. I only use that if the rest of the computer becomes visually unresponsive.


----------



## grahamperrin@ (Nov 21, 2021)

astyle said:


> … it doesn't care if you're in a CLI or in KDE - the computer will reboot …



KDE Plasma

The default for Control-Alt-Delete is *log out* (a dialogue), not reboot.

My preferences:



Defaults:



TTY

In plain English: Control-Alt-Delete triggers a graceful/nice reboot. 

Semi-technical: 



grahamperrin said:


> …  In chronological order:
> 
> <https://cgit.freebsd.org/src/commit...c?id=ad4240fec4feed2dfca1ca0e0bb303eb01aa3a5b> _move all functions related to shutting down to one file called kern_shutdown.c …_
> <https://cgit.freebsd.org/src/commit...c?id=3e755f76d1f51651901d3893554a92b8aa371684> _Make it possible to pass boot()'s flags to shutdown_nice() …_
> ...


----------



## Scribner (Nov 22, 2021)

grahamperrin said:


> – the commands will not be there (at the tail of the history).


Did you mean to say the commands _will_ be there? I'm guessing running all these commands as a regular user (not root) works?



astyle said:


> Ctrl-Alt-Del keyboard combination is for rebooting the computer. This key combination works even on FreeBSD, and it doesn't care if you're in a CLI or in KDE - the computer will reboot regardless. I only use that if the rest of the computer becomes visually unresponsive.


Thank you. I think grahamperrin corrected you below, so it's my understanding that Ctrl-Alt-Del will do a "graceful" reboot in the command-line interface and log out in KDE.

If anyone has time, looking over and answering my post-installation questions in post #129 would be extremely helpful. Also, answering my questions to (mostly) grahamperrin in post #138 would be helpful.

I still think people should start here:


Scribner said:


> Maybe start with figuring out why my system clock is UTC, but the timezone shows as Central U.S. (CST). It looks like I might be able to set the clock in KDE, but, because the problem was there before I installed KDE (and it seems more like a FreeBSD issue), I think it would be better to do a correction in the command line. In another thread on the Forums, a user says to create an empty file for /etc/wall_cmos_clock by running `# touch /etc/wall_cmos_clock`, but other people suggest doing other methods. Even after reading the man page, I am not sure what the `touch` command does.



I don't know if anyone has ever had the wrong time set on their computer before, but it really detracts from the user experience. My clock is currently +6, so it's quite a bit off. I think I will appreciate my FreeBSD computer much more once I get the correct time set.

I know it's probably bad form to post all these noob questions on the Forums, but I am a new user to FreeBSD and I plan to stay with it for the long haul. Once I get all of these concerns taken care of, I will get back to work learning the OS. I don't want to start any more threads on these questions in the Forums. Ideally, in the future, I will be confident enough to search the Forums for my issues without needing to post new threads. Thanks again.


----------



## astyle (Nov 22, 2021)

Scribner said:


> I am not sure what the `touch` command does.


See the touch(1) manpage or type `man touch` for the same information in Konsole/XTerm.  What  `touch` does is slap the 'Last saved' timestamp onto a file. If you saved a file at 2:32 PM, that will be the 'last saved' timestamp on your file. Or, you can skip opening the file altogether, and type `touch myfile` instead. If you ran the `touch` command at 2:32 pm, that will be the  'last saved' timestamp on your file. 
But for your issue, I'd suggest looking at date(1) manpage or type `man date`. If you just run `date` in a terminal like Konsole, it will show you today's date. But,


> ```
> date 8506131627
> 
> sets the date to "June 13,    1985, 4:27 PM".
> ...



You do have to be root to modify the system's date.

Oh, I'm not taking you out to movies. Download 'em yourself.


----------



## Scribner (Nov 22, 2021)

astyle said:


> See the touch(1) manpage or type `man touch` for the same information in Konsole/XTerm.  What  `touch` does is slap the 'Last saved' timestamp onto a file. If you saved a file at 2:32 PM, that will be the 'last saved' timestamp on your file. Or, you can skip opening the file altogether, and type `touch myfile` instead. If you ran the `touch` command at 2:32 pm, that will be the  'last saved' timestamp on your file.
> But for your issue, I'd suggest looking at date(1) manpage or type `man date`. If you just run `date` in a terminal like Konsole, it will show you today's date. But,
> 
> 
> ...


Thanks for the explanation of touch(1). It's my understanding the command `touch` will also create a file if the file doesn't exist, which I think might be needed in my case.

I think what you're suggesting is post #3 from this thread I linked to: <https://forums.freebsd.org/threads/utc-time-setting.9254/>. However, what I was asking about, from post #2, seems to have more reactions, so I'm wondering if that's a better method.

Thanks for specifying to run `date` as root. Because the date is correct, I take it I should just make sure to use that method (of setting the time only) when the correct date is showing.

A related question: Do you know why my clock runs about a minute slow? I enabled the ntpd system service when I installed FreeBSD, so I thought that would automatically set the correct time at boot.


----------



## grahamperrin@ (Nov 23, 2021)

Scribner said:


> Did you mean to say the commands _will_ be there?



No.

<https://forums.freebsd.org/posts/542959> was to demonstrate what does _not_ happen. 

Try it for yourself – as suggested, _run a few commands_ (but *not* `history -S`) …


----------



## Scribner (Sep 1, 2022)

I published Rough Draft #5 to one of my blogs at <https://www.jeers.com/blog/instructions-installing-kde-plasma-freebsd/>. Thanks again, FreeBSD Forums! --Nicholas


----------

