Help needed to get KDE installed and running inside a Jail.

I'm trying to install KDE in jail.

I've installed these:
pkg install xorg
pkg install kde5
pkg install sddm

Set the /etc/fstab (inside the jail):
proc /proc procfs rw 0 0

And added to /etc/rc.conf (inside jail):

dbus_enable="YES"
hald_enable="YES"
sddm_enable="YES"

And the I tried to start the jail, and got these errors in the sddm.log file:

[04:53:48.077] (EE) DAEMON: Failed to read display number from pipe
[04:53:48.077] (EE) DAEMON: Could not start Display server on vt 9

I tried to run "Xorg -configure" and got:

X.Org X Server 1.20.9
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 12.1-RELEASE-p12 amd64
Current Operating System: FreeBSD testenv 12.2-RELEASE-p1 FreeBSD 12.2-RELEASE-p1 GENERIC amd64
Build Date: 26 January 2021 10:41:09AM

Current version of pixman: 0.40.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Fri Jan 29 05:09:02 2021
List of video drivers:
scfb
modesetting
vesa
scfb trace: probe start
No devices to configure. Configuration failed.
(EE) Server terminated with error (2). Closing log file.

I think there is no video device inside the jail.
How can I resolve this problem?
 
Create a specific rules set for it and set your jail to that rule:
Code:
     devfs_ruleset
             The number of the devfs ruleset that is enforced for mounting
             devfs in this jail.  A value of zero (default) means no ruleset
             is enforced.  Descendant jails inherit the parent jail's devfs
             ruleset enforcement.  Mounting devfs inside a jail is possible
             only if the allow.mount and allow.mount.devfs permissions are
             effective and enforce_statfs is set to a value lower than 2.
             Devfs rules and rulesets cannot be viewed or modified from inside
             a jail.

             NOTE: It is important that only appropriate device nodes in devfs
             be exposed to a jail; access to disk devices in the jail may
             permit processes in the jail to bypass the jail sandboxing by
             modifying files outside of the jail.  See devfs(8) for
             information on how to use devfs rules to limit access to entries
             in the per-jail devfs.  A simple devfs ruleset for jails is
             available as ruleset #4 in /etc/defaults/devfs.rules.
 
Well, I tried that and it didn't work...

I forgot to explain that I'm trying to set up in a remote server (to get KDE working inside a jail, and viewable via SSH / vnc remotely)

If I create a new jail, and then,
pkg install xorg
pkg install tightvnc
configure the "CheckDisplayNumber" in the "vncserver" file
then start vnc by "vncserver"
(no need to configure devfs_ruleset)
... it WORKS! I can access it via SSH / VNC Client!

The problem is, still, I cannot get KDE to run.

Why does it work easily for xorg and tightvnc, but not for KDE?
Why does xorg/tightvnc could easily recognize the VNC server as the "display"?
What can't KDE see the same VNC server as the "display"?
 
I forgot to explain that I'm trying to set up in a remote server (to get KDE working inside a jail, and viewable via SSH / vnc remotely) [...]
You have to adjust the [X11] section of sddm.conf(5). By default, it tries to start the Xserver(1) on the local display device, while you want it to use the VNC server instead. I don't know if devel/dbus & hald(8) can handle remote devices (e.g. HID); VNC should provide a solution for this issue. Please read the VNC docs carefully.
 
Back
Top