FreeBSD/Setup: Difference between revisions

From KDE Community Wiki
(Created page with "== Setup == To install the current official release, get [[../Ports|ports or packages]. To install the bleeding edge, get [[../Area51|area51]. Once you have installed which...")
 
m (Wayland has come a long way if you are not using an Nvidia GPU.)
 
(41 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Setup ==
== Quick start ==


To install the current official release, get [[../Ports|ports or packages].
=== Graphics first ===


To install the bleeding edge, get [[../Area51|area51].
For a VirtualBox virtual machine:


Once you have installed whichever version of KDE you like (official ports of KDE4, or KDE Frameworks, Plasma Workspace and Applications from area51, as of early 2017), there are a few more steps to get it running, which we try to list here.
# preset the machine to VBoxSVGA – '''not''' VMSVGA
# start the machine
# install [https://www.freshports.org/emulators/virtualbox-ose-additions/ emulators/virtualbox-ose-additions] 6.1.36_1 or greater
# observe the [https://www.freshports.org/emulators/virtualbox-ose-additions/#message package message].
 
For a real machine, see <https://wiki.freebsd.org/Graphics>.
 
=== KDE and the rest ===
 
# <code>pkg install --quiet --yes kde5 plasma5-sddm-kcm sddm xorg</code>
# <code>sysrc dbus_enable="YES" && service dbus start</code>
# <code>sysrc sddm_enable="YES" && service sddm start</code>
# when logging in, you may want to avoid the ''Plasma (Wayland) …'' default that's presented by sddm – for NVidia GPUs, Wayland is not yet reliable.
 
== Setup, in greater detail ==
 
To install the current official release, get [[{{PAGENAME}}/Ports|ports or packages]].
 
To install the bleeding edge, get [[{{PAGENAME}}/Area51|area51]].
 
After you have installed your preferred version official ports of KDE Plasma 5, or (as of early 2017) KDE Frameworks, Plasma Workspace and Applications from area51 a few more steps are required.


== X Window System ==
== X Window System ==


To use KDE Software Compilation on FreeBSD, <a href="http://www.x.org">X.Org</a> is required. If you still dont't have it, you'll need to <a href="http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/x-install.html">install</a> and <a href="http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/x-config.html">configure</a> it properly.
KDE on FreeBSD currently requires [http://www.x.org X.Org]. Installation of x11/org is [https://docs.freebsd.org/en/books/handbook/x11/#x-install described in the FreeBSD Handbook]. Whilst X.Org is designed to work automatically wherever possible, it's sometimes necessary to [https://docs.freebsd.org/en/books/handbook/x11/#x-config spend some time on configuration].


== Other Dependencies ==
== Other requirements ==


You should have the following packages installed and configured:
Without this:  
- DBus
- HAL
- procfs


Without them, either KDE software won't run, or you won't have a keyboard and mouse in the X Window System, which reduces its usefulness considerably.
* the X Window System might not recognise your keyboard, mouse or other pointing device
* some KDE software will not run.  


== Starting KDE4 ==
; D-Bus:


After installing KDE workspace (`x11/kde4-workspace`) either via ports or packages, you can add `kdm4_enable="YES"` to `/etc/rc.conf` to boot into KDE Plasma Desktop via KDM, the KDE Display Manager.
[https://www.freshports.org/devel/dbus/ devel/dbus]
 
<code>sysrc dbus_enable="YES" && service dbus start</code>
 
https://man.freebsd.org/dbus-daemon(1)


== Starting KDE Plasma 5 Workspace ==
== Starting KDE Plasma 5 Workspace ==


After installing KDE Plasma 5 Workspace (`x11/plasma5-plasma-workspace`) either via ports or packages, you must also install SDDM.
After [https://www.freshports.org/x11/plasma5-plasma-workspace/#add installing KDE Plasma 5 Workspace], you must also install SDDM.
 
= rewrite =
 
: by [[User:Vater|Vater]] ([[User talk:Vater|talk]]) 18:02, 3 January 2019 (UTC)
 
== Installing ==
 
The easiest way to get KDE running (on nearly every FreeBSD box) is to install the KDE binary packages from the standard FreeBSD repository.
: [[#Installing by using the Binary Package Management]]
 
The other way to install the KDE is to compile it from (FreeBSD) ports.
: [[#Installing by using the FreeBSD Ports Collection]]
 
And you can also install by cloning and compiling sources directly like for Area 51.
: [[#Installing by using the sources for the FreeBSD Port]]
 
=== Installing by using the Binary Package Management ===
[https://www.freebsd.org/doc/handbook/pkgng-intro.html FreeBSD Handbook:''Installing Applications: Packages and Ports''/''Using pkg for Binary Package Management]
 
The default repository for binary packages on FreeBSD is ''quarterly''. An alternate repository for FreeBSD is ''latest'' provided from FreeBSD as well.
: [[#Changing the binary packages repository]]
 
It is recommended to install and use ([[#X.Org minimal]] or) [[#X.Org]].
 
It is recommended to install and use [[#SDDM]].
 
==== Installing only the small stack of [https://www.kde.org/plasma-desktop KDE Plasma] by using the Binary Package Management ====
 
Installing the binary package [https://www.freshports.org/x11/plasma5-plasma/ x11/plasma5-plasma] (KDE5 plasma meta port)
: <code>pkg ins -y plasma5-plasma</code>
 
[[#Installing the minimal stack of X.Org by using the Binary Package Management]]
 
Optional <small>(To have a first terminal emulator.)</small> installing the (recommended) binary package [https://www.freshports.org/x11/konsole/ x11/konsole]
: <code>pkg ins -y konsole</code>
 
==== Installing only a basic stack of KDE by using the Binary Package Management ====
 
[[#Installing only the small stack of KDE Plasma by using the Binary Package Management]]
 
Installing the binary package [https://www.freshports.org/x11/kde-baseapps/ x11/kde-baseapps] (KDE5 baseapps meta port)
: <code>pkg ins -y kde-baseapps</code>
 
==== Installing the full stack of KDE by using the Binary Package Management ====
 
Installing the binary package [https://www.freshports.org/x11/kde5/ x11/kde5] (KDE Plasma Desktop and Applications (current))
: <code>pkg ins -y kde5</code>
 
[[#Installing the full stack of X.Org by using the Binary Package Management]]
 
==== <s>Installing Wayland by using the Binary Package Management</s> ====
 
Running KDE with Wayland do not work (2020-02).
 
To install the binary package (integration plugins for a Wayland-based desktop), please see:
 
https://www.freshports.org/x11/plasma5-kwayland-integration/#add
 
==== Installing X.Org by using the Binary Package Management ====
 
===== Installing the minimal stack of X.Org by using the Binary Package Management =====
 
Installing the (recommended) binary package [https://www.freshports.org/x11/xorg-minimal/ x11/xorg-minimal] (X.Org minimal distribution metaport)
: <code>pkg ins -y xorg-minimal</code>
 
[[#Installing the graphics driver for X.Org by using the Binary Package Management]]
 
===== Installing the full stack of X.Org by using the Binary Package Management =====
 
Installing the (recommended) binary package [https://www.freshports.org/x11/xorg/ x11/xorg] (X.Org complete distribution metaport)
: <code>pkg ins -y xorg</code>
 
[[#Installing the graphics driver for X.Org by using the Binary Package Management]]
 
===== Installing the graphics driver for X.Org by using the Binary Package Management =====
 
Search a (recommended) graphics driver package for your (hardware) graphics chipset (usually can be find as a part of the [https://www.freshports.org/x11-drivers/ x11-drivers] category)
: <code>pkg sea xf86-video</code>
 
Installing the (recommended) graphics driver package for your (hardware) graphics chipset [https://www.freshports.org/x11-drivers/xf86-video-intel/ x11-drivers/xf86-video-intel] (Driver for Intel integrated graphics chipsets)
: <code>pkg ins -y xf86-video-intel</code>
 
Installing the (recommended) graphics driver package for your (hardware) graphics chipset [https://www.freshports.org/x11-drivers/xf86-video-intel/ x11-drivers/xf86-video-intel] (Driver for Intel integrated graphics chipsets)
Adding all the user accounts for the (hardware accelerated X11 sessions) to the group ''video''
:: If you are the one and only user for the graphical user interface with X11 like KDE.
::: <code>pw groupmod video -m the-one-and-only-kde-user</code>
: or
:: For more than one user a comma-separated list of user names (for example ''kde-user-1'' and ''kde-user-2'').
::: <code>pw groupmod video -m kde-user-1,kde-user-2</code>
 
==== Installing SDDM by using the Binary Package Management ====
 
Installing the binary package  [https://www.freshports.org/x11/sddm x11/sddm]
: <code>pkg ins -y sddm</code>
 
[[#Installing the minimal stack of X.Org by using the Binary Package Management]]
 
; additional packages:
 
Optional installing the binary package  [https://www.freshports.org/deskutils/plasma5-sddm-kcm deskutils/plasma5-sddm-kcm]
: <code>pkg ins -y plasma5-sddm-kcm</code>
 
Optional installing the binary package  [https://www.freshports.org/x11-themes/sddm-freebsd-black-theme x11-themes/sddm-freebsd-black-theme]
: <code>pkg ins -y sddm-freebsd-black-theme</code>
 
==== Changing the binary packages repository ====
 
On FreeBSD are a lot of useful tools that optional can be used. For example there is <code>[https://www.freebsd.org/cgi/man.cgi?query=beadm beadm]</code> (package ''[https://www.freshports.org/sysutils/beadm sysutils/beadm]''), a tool to create create and manage ZFS snapshots of your system (independent from your home directory data).
 
===== Checking the binary packages repository =====
 
Optional printing the standard configuration file for the pkg binary package management (to the standard output)
: <code>cat /etc/pkg/FreeBSD.conf</code>
On a default FreeBSD you should get the following.
<pre></pre>
<pre>
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
</pre>
 
Optional checking the standard directory for custom configurations of the pkg binary package management and printing all configuration files in the standard directory for custom repositories of the pkg binary package management (to the standard output)
: <code>ls /local/etc/pkg/ && cat /local/etc/pkg/repos/*</code>
On a default FreeBSD you should get the following.
<pre>
ls: /local/etc/pkg/: No such file or directory
</pre>
 
===== Changing the binary packages repository quick & dirty =====
 
Replacing ''<nowiki>pkg+http://pkg.FreeBSD.org/${ABI}/quarterly</nowiki>'' with ''<nowiki>pkg+http://pkg.FreeBSD.org/${ABI}/latest</nowiki>'' in the standard configuration file for the pkg binary package management
: <code><nowiki>sed -i '' -e 's/pkg.FreeBSD.org\/\${ABI}\/quarterly/pkg.FreeBSD.org\/\${ABI}\/latest/g' /etc/pkg/FreeBSD.conf</nowiki></code>
 
Updating all (currently) installed binary packages
: <code>pkg upg -y</code>
 
===== Changing the binary packages repository the exemplary FreeBSD way =====
 
=== Installing by using the FreeBSD Ports Collection ===
[https://www.freebsd.org/doc/handbook/ports-using.html FreeBSD Handbook:''Installing Applications: Packages and Ports''/''Using the Ports Collection'']
 
==== Installing SDDM by using the FreeBSD Ports Collection ====
 
=== Installing by using the sources for the FreeBSD Port ===
 
== Dependencies ==
 
=== display server ===
 
==== <s>Wayland</s> ====
 
* <s>[[#Installing Wayland by using the Binary Package Management]]</s>
* <s>[[#Configuring Wayland]]</s>
 
===== <s>Configuring Wayland</s>  =====
 
==== X.Org ====
 
:* [[#Installing the minimal stack of X.Org by using the Binary Package Management]]
: or
:* [[#Installing the full stack of X.Org by using the Binary Package Management]]
* [[#Configuring X.Org]]
 
===== X.Org minimal =====
 
a smaller stack of [[#X.Org]]
 
===== Configuring X.Org  =====
 
=== display manager ===
 
==== SDDM ====
 
SDDM is highly recommended to get KDE running easily. (So you can avoid some problems. SDDM helps to choose the right Screen<!-- ''DISPLAY'' variable --> for example.)
 
:* [[#Installing SDDM by using the Binary Package Management]]
: or
:* [[#Installing SDDM by using the FreeBSD Ports Collection]]
* [[#Configuring SDDM]]
* [[#Service SDDM]]
 
===== Configuring SDDM =====
 
====== Configuring SDDM by using plasma5-sddm-kcm ======
 
If you installed sddm by binary package you have to set this rule in order to get this module functional:
 
Create this file <code>/usr/local/etc/polkit-1/rules-d/40-wheel-group.rules</code> with this content:
 
<pre>
polkit.addRule(function(action, subject) {
    if (subject.isInGroup("wheel")) {
    return polkit.Result.YES;
    }
});
</pre>
 
and restart the session.
 
====== Configuring SDDM by using the configuration file ======
 
: <code>diff /usr/local/etc/sddm.conf.sample /usr/local/etc/sddm.conf</code>
: <code>$EDITOR /usr/local/etc/sddm.conf</code>
 
Likewise, if you installed sddm using binary packets perhaps you cannot find sddm.conf and sddm.conf.sample files. You can get one by launching
: <code># sddm --example-config /usr/local/etc/sddm.conf</code>
 
===== Service SDDM =====
 
Starting the service ''sddm'' once
: <code>service sddm onestart</code>
Stopping the service ''sddm'' once
: <code>service sddm onestop</code>
 
Enabling the service ''sddm'' for system starts
: <code>sysrc sddm_enable=yes</code>
Starting the (enabled) service ''sddm'' now
: <code>service sddm start</code>
 
=== dbus ===
 
[[wikipedia:en:D-Bus]]
 
https://www.freshports.org/devel/dbus/ (Message bus system for inter-application communication)
 
== Recommendations ==
 
=== drm-kmod ===
 
https://www.freshports.org/graphics/drm-kmod/ (Metaport of DRM modules for the linuxkpi-based KMS components)
 
== Problems ==
 
== See also ==
 
* [https://docs.freebsd.org/en/books/handbook/x11/#x11-wm-kde ''5.7.2. KDE'' in the FreeBSD Handbook] – but please ignore the ''hald'' subsection under Troubleshooting.

Latest revision as of 17:10, 29 October 2023

Quick start

Graphics first

For a VirtualBox virtual machine:

  1. preset the machine to VBoxSVGA – not VMSVGA
  2. start the machine
  3. install emulators/virtualbox-ose-additions 6.1.36_1 or greater
  4. observe the package message.

For a real machine, see <https://wiki.freebsd.org/Graphics>.

KDE and the rest

  1. pkg install --quiet --yes kde5 plasma5-sddm-kcm sddm xorg
  2. sysrc dbus_enable="YES" && service dbus start
  3. sysrc sddm_enable="YES" && service sddm start
  4. when logging in, you may want to avoid the Plasma (Wayland) … default that's presented by sddm – for NVidia GPUs, Wayland is not yet reliable.

Setup, in greater detail

To install the current official release, get ports or packages.

To install the bleeding edge, get area51.

After you have installed your preferred version – official ports of KDE Plasma 5, or (as of early 2017) KDE Frameworks, Plasma Workspace and Applications from area51 – a few more steps are required.

X Window System

KDE on FreeBSD currently requires X.Org. Installation of x11/org is described in the FreeBSD Handbook. Whilst X.Org is designed to work automatically wherever possible, it's sometimes necessary to spend some time on configuration.

Other requirements

Without this:

  • the X Window System might not recognise your keyboard, mouse or other pointing device
  • some KDE software will not run.
D-Bus

devel/dbus

sysrc dbus_enable="YES" && service dbus start

https://man.freebsd.org/dbus-daemon(1)

Starting KDE Plasma 5 Workspace

After installing KDE Plasma 5 Workspace, you must also install SDDM.

rewrite

by Vater (talk) 18:02, 3 January 2019 (UTC)

Installing

The easiest way to get KDE running (on nearly every FreeBSD box) is to install the KDE binary packages from the standard FreeBSD repository.

#Installing by using the Binary Package Management

The other way to install the KDE is to compile it from (FreeBSD) ports.

#Installing by using the FreeBSD Ports Collection

And you can also install by cloning and compiling sources directly like for Area 51.

#Installing by using the sources for the FreeBSD Port

Installing by using the Binary Package Management

FreeBSD Handbook:Installing Applications: Packages and Ports/Using pkg for Binary Package Management

The default repository for binary packages on FreeBSD is quarterly. An alternate repository for FreeBSD is latest provided from FreeBSD as well.

#Changing the binary packages repository

It is recommended to install and use (#X.Org minimal or) #X.Org.

It is recommended to install and use #SDDM.

Installing only the small stack of KDE Plasma by using the Binary Package Management

Installing the binary package x11/plasma5-plasma (KDE5 plasma meta port)

pkg ins -y plasma5-plasma

#Installing the minimal stack of X.Org by using the Binary Package Management

Optional (To have a first terminal emulator.) installing the (recommended) binary package x11/konsole

pkg ins -y konsole

Installing only a basic stack of KDE by using the Binary Package Management

#Installing only the small stack of KDE Plasma by using the Binary Package Management

Installing the binary package x11/kde-baseapps (KDE5 baseapps meta port)

pkg ins -y kde-baseapps

Installing the full stack of KDE by using the Binary Package Management

Installing the binary package x11/kde5 (KDE Plasma Desktop and Applications (current))

pkg ins -y kde5

#Installing the full stack of X.Org by using the Binary Package Management

Installing Wayland by using the Binary Package Management

Running KDE with Wayland do not work (2020-02).

To install the binary package (integration plugins for a Wayland-based desktop), please see:

https://www.freshports.org/x11/plasma5-kwayland-integration/#add

Installing X.Org by using the Binary Package Management

Installing the minimal stack of X.Org by using the Binary Package Management

Installing the (recommended) binary package x11/xorg-minimal (X.Org minimal distribution metaport)

pkg ins -y xorg-minimal

#Installing the graphics driver for X.Org by using the Binary Package Management

Installing the full stack of X.Org by using the Binary Package Management

Installing the (recommended) binary package x11/xorg (X.Org complete distribution metaport)

pkg ins -y xorg

#Installing the graphics driver for X.Org by using the Binary Package Management

Installing the graphics driver for X.Org by using the Binary Package Management

Search a (recommended) graphics driver package for your (hardware) graphics chipset (usually can be find as a part of the x11-drivers category)

pkg sea xf86-video

Installing the (recommended) graphics driver package for your (hardware) graphics chipset x11-drivers/xf86-video-intel (Driver for Intel integrated graphics chipsets)

pkg ins -y xf86-video-intel

Installing the (recommended) graphics driver package for your (hardware) graphics chipset x11-drivers/xf86-video-intel (Driver for Intel integrated graphics chipsets) Adding all the user accounts for the (hardware accelerated X11 sessions) to the group video

If you are the one and only user for the graphical user interface with X11 like KDE.
pw groupmod video -m the-one-and-only-kde-user
or
For more than one user a comma-separated list of user names (for example kde-user-1 and kde-user-2).
pw groupmod video -m kde-user-1,kde-user-2

Installing SDDM by using the Binary Package Management

Installing the binary package x11/sddm

pkg ins -y sddm

#Installing the minimal stack of X.Org by using the Binary Package Management

additional packages

Optional installing the binary package deskutils/plasma5-sddm-kcm

pkg ins -y plasma5-sddm-kcm

Optional installing the binary package x11-themes/sddm-freebsd-black-theme

pkg ins -y sddm-freebsd-black-theme

Changing the binary packages repository

On FreeBSD are a lot of useful tools that optional can be used. For example there is beadm (package sysutils/beadm), a tool to create create and manage ZFS snapshots of your system (independent from your home directory data).

Checking the binary packages repository

Optional printing the standard configuration file for the pkg binary package management (to the standard output)

cat /etc/pkg/FreeBSD.conf

On a default FreeBSD you should get the following.


FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}

Optional checking the standard directory for custom configurations of the pkg binary package management and printing all configuration files in the standard directory for custom repositories of the pkg binary package management (to the standard output)

ls /local/etc/pkg/ && cat /local/etc/pkg/repos/*

On a default FreeBSD you should get the following.

ls: /local/etc/pkg/: No such file or directory
Changing the binary packages repository quick & dirty

Replacing pkg+http://pkg.FreeBSD.org/${ABI}/quarterly with pkg+http://pkg.FreeBSD.org/${ABI}/latest in the standard configuration file for the pkg binary package management

sed -i '' -e 's/pkg.FreeBSD.org\/\${ABI}\/quarterly/pkg.FreeBSD.org\/\${ABI}\/latest/g' /etc/pkg/FreeBSD.conf

Updating all (currently) installed binary packages

pkg upg -y
Changing the binary packages repository the exemplary FreeBSD way

Installing by using the FreeBSD Ports Collection

FreeBSD Handbook:Installing Applications: Packages and Ports/Using the Ports Collection

Installing SDDM by using the FreeBSD Ports Collection

Installing by using the sources for the FreeBSD Port

Dependencies

display server

Wayland

Configuring Wayland

X.Org

or
X.Org minimal

a smaller stack of #X.Org

Configuring X.Org

display manager

SDDM

SDDM is highly recommended to get KDE running easily. (So you can avoid some problems. SDDM helps to choose the right Screen for example.)

or
Configuring SDDM
Configuring SDDM by using plasma5-sddm-kcm

If you installed sddm by binary package you have to set this rule in order to get this module functional:

Create this file /usr/local/etc/polkit-1/rules-d/40-wheel-group.rules with this content:

polkit.addRule(function(action, subject) {
    if (subject.isInGroup("wheel")) {
    	return polkit.Result.YES;
    }
});

and restart the session.

Configuring SDDM by using the configuration file
diff /usr/local/etc/sddm.conf.sample /usr/local/etc/sddm.conf
$EDITOR /usr/local/etc/sddm.conf

Likewise, if you installed sddm using binary packets perhaps you cannot find sddm.conf and sddm.conf.sample files. You can get one by launching

# sddm --example-config /usr/local/etc/sddm.conf
Service SDDM

Starting the service sddm once

service sddm onestart

Stopping the service sddm once

service sddm onestop

Enabling the service sddm for system starts

sysrc sddm_enable=yes

Starting the (enabled) service sddm now

service sddm start

dbus

wikipedia:en:D-Bus

https://www.freshports.org/devel/dbus/ (Message bus system for inter-application communication)

Recommendations

drm-kmod

https://www.freshports.org/graphics/drm-kmod/ (Metaport of DRM modules for the linuxkpi-based KMS components)

Problems

See also