Help me install KDE built from source in alternative prefix path

Quite a follow-up to my previous post.

Once I have built the essential components of KDE Plasma (kinit, kwin, dolphin, plasma-framework, plasma-desktop, etc) and put the result in /opt/kde, I can see it’s not sufficient to actually start the session.

I’ve set the following environment variables at system level:

  • PATH=/opt/kde/bin:$PATH
  • QT_PLUGIN_PATH=/opt/kde/lib/x86_64-linux-gnu/plugins:/opt/kde/lib/x86_64-linux-gnu/qt5/plugins:/usr/lib/x86_64-linux-gnu/qt5/plugins
  • QT_QUICK_CONTROLS_STYLE_PATH=/opt/kde/lib/x86_64-linux-gnu/qml/QtQuick/Controls.2:/usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Controls.2
  • QML2_IMPORT_PATH=/opt/kde/lib/x86_64-linux-gnu/qml:/usr/lib/x86_64-linux-gnu/qt5/qml
  • XDG_DATA_DIRS=/opt/kde/share
  • XDG_CONFIG_DIRS=/opt/kde/etc/xdg

But I imagine there must be additional work to put to make everything working, can someone who’s knowledgable in KDE development help me?

Thank you in advance :slight_smile:

I don’t think there’s enough information here to help, unfortunately.

What specifically is the issue and what specifically are you doing? We need specifics, since in general, it sounds like you’re doing the right thing. But the devil is in the details.

Have you built plasma-workspace too? And run [build dir]/plasma-workspace/login-sessions/install-sessions.sh?

Yes, I apologize for omitting the details in my first post. :slight_smile:

Basically, my objective is to -starting from an ‘empty’ Debian machine without GUI at installation- build the latest stable version of KDE Plasma 5 from the source code for personal use.

I haven’t tried to run the install-sessions.sh… I didn’t know it was required. I’ll try tomorrow, is it the only script to run after installation or are they more?

I tried to provide the maximum details I could of my workflow, don’t hesitate to tell me if you need more. :stuck_out_tongue:

Here are every step I went so far :

  1. I install Debian 12 Bookworm on my machine, with no desktop environment.
  2. I install git, cmake, build-essential, qtbase5-dev and other dependencies for the build (the list is a bit long but I can provide it).
  3. I clone kdesrc-build from the standard repository, and put it in ~/kde/src/.
  4. I skip the --initial-setup because I already wrote a list of dependencies as well as my kdesrc-buildrc file (same, I can provide it). The install prefix is set to /opt/kde.
  5. I run kdesrc-build --rc-file=(rc file) --metadata-only
  6. I run kdesrc-build --rc-file=(rc file) --src-only (packages), supplying the list of projects I want to build (I provided the list below).
  7. I run kdesrc-build --rc-file=(rc file) --no-src (packages), supplying the same list of projects.
  8. I put the mentionned environment variables in /etc/environment (maybe here lies my mistake…)
  9. I install SDDM, configured to use the correct xsessions and wayland-sessions files in the installed location (here, /opt/kde/share/…).
  10. I reboot my machine.
  11. I Log in a X11 session.
  12. I’m welcomed by a black screen, the Plasma loading screen is not showing, and my cursor is a cross…

The only logs I could find, in ~/.xsession-errors :

Xsession: X session started for rubis at jeu. 11 mai 2023 18:58:46 CEST
dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting XAUTHORITY=/home/rubis/.Xauthority
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
org.kde.startup: "kapplymousetheme" ("breeze_cursors", "24") exited with code 255
QIODevice::read (QFile, "/home/rubis/.config/kdedefaults/package"): device not open
kf.package: Invalid metadata for package structure "Plasma/LookAndFeel"
"applications.menu"  not found in  ()
org.kde.startup: "xsetroot" ("-cursor_name", "left_ptr") exited with code 255

The list of KDE projects I want to build :

I must mention that include-dependencies true is set in kdesrc-buildrc, so every projects in-between are also built.

mailcommon
kwin
kinit
kio-extras
kdeplasma-addons
kde-gtk-config
kamera
kalarm
kalendar
kaddressbook
kcolorchooser
kcolorpicker
kcalc
kcron
kfind
kinfocenter
kimageannotator
kmenuedit
khotkeys
kgamma5
kontact
konsole
konqueror
kscreen
ksystemstats
kwayland-integration
plasma-workspace
plasma-welcome
plasma-firewall
plasma-systemmonitor
plasma-desktop
plasma-disks
plasma-browser-integration
systemsettings
systemdgenie
ffmpegthumbs
breeze-gtk
discover
dolphin
sddm-kcm
spectacle
milou
ark
juk
kmag
kmouth
knotes
gwenview

Thank you very much, I really appreciate your help !

I vote that you self help. By installing Debian 12 with KDE Plasma. Setting up kdesrc-build. Get Involved/development - KDE Community Wiki And logging into the KDE Plasma 5 session built using kdesrc-build. After you finish this, test it for a couple of weeks. Then get back with questions.

Based on your list, you’re missing tons of packages.

Starting with the instructions that @nmariusp linked to is probably the sanest way to do it. It also includes a better list of packages. Start from there, get it working, then pare everything down.

1 Like

Alright, I’ll follow your advice @ngraham. I will install the list of packages mentionned in the list, then pare down.

But because it’s certainly not the only thing I did wrong, may I ask to correct me on the step-by-step I provided (especially regarding the scripts to run after a successful build) ?

Thanks !

I did build all the packages mentionned in the Get Involved manual, and alas I’m still getting the black screen after logging in an X11 question… the only difference now is that the cursor is displaying well… :frowning:

Did you install all the relevant Xorg packages? What about video drivers?

Regarding video drivers, I have left the pre-installed “nouveau” Nvidia Driver, which is supposed to work…

Here’s the list of installed “Xorg” packages :

xorg-sgml-doctools
xserver-xorg-core
xserver-xorg-dev
xserver-xorg-input-all
xserver-xorg-input-evdev-dev
xserver-xorg-input-evdev
xserver-xorg-input-libinput-dev
xserver-xorg-input-libinput
xserver-xorg-input-synaptics-dev
xserver-xorg-video-all
xserver-xorg-video-amdgpu
xserver-xorg-video-ati
xserver-xorg-video-fbdev
xserver-xorg-video-nouveau
xserver-xorg-video-radeon
xserver-xorg-video-vesa
xserver-xorg-video-vmware
xserver-xorg

Hmm, I hoped it was as easy as a not installed xorg server :frowning:
The packages on my distro are differently named, so I can’t even tell if you are missing anything.

One thing that could help: If you use systemd, post (or read) your journald.

The easiest way is probably(like the others said):
Step 1:
Use a regular Debian install and follow the Get Involved instructions. If that works:
Step 2:
Use a regular Debian install but this time install your stuff in /opt/kde (or wherever you want it)
If that works, save the list of installed packages.
Step 3:
Do it like you originally wanted (no gui debian, with your stuff in /opt/kde, or whatever you wanted)
Check the installed packaged list from step 2 to figure out whats missing.

I would have hoped too… :neutral_face:

Just to be sure and as you recommanded, I tried to install my KDE Plasma build in /usr/ instead of /opt/kde in order to eliminate a potential cause of failure; but nothing changed so far.

I posted my journalctl below starting from the moment I log in from SDDM, I’m really hoping it helps troubleshooting :

mai 15 20:55:04 Rubis sddm-greeter[1403]: Reading from "/usr/share/xsessions/plasma.desktop"
mai 15 20:55:04 Rubis sddm[1319]: Message received from greeter: Login
mai 15 20:55:04 Rubis sddm[1319]: Reading from "/usr/share/xsessions/plasma.desktop"
mai 15 20:55:04 Rubis sddm[1319]: Reading from "/usr/share/xsessions/plasma.desktop"
mai 15 20:55:04 Rubis sddm[1319]: Session "/usr/share/xsessions/plasma.desktop" selected, command: "/usr/bin/startplasma-x11"
mai 15 20:55:04 Rubis sddm-helper[1436]: [PAM] Starting...
mai 15 20:55:04 Rubis sddm-helper[1436]: [PAM] Authenticating...
mai 15 20:55:04 Rubis sddm-helper[1436]: [PAM] Preparing to converse...
mai 15 20:55:04 Rubis sddm-helper[1436]: [PAM] Conversation with 1 messages
mai 15 20:55:04 Rubis sddm-helper[1436]: gkr-pam: unable to locate daemon control file
mai 15 20:55:04 Rubis sddm-helper[1436]: gkr-pam: stashed password to try later in open session
mai 15 20:55:04 Rubis sddm-helper[1436]: [PAM] returning.
mai 15 20:55:04 Rubis sddm[1319]: Authenticated successfully
mai 15 20:55:04 Rubis sddm-greeter[1403]: Message received from daemon: LoginSucceeded
mai 15 20:55:04 Rubis sddm-helper[1436]: pam_unix(sddm:session): session opened for user rubis(uid=1000) by (uid=0)
mai 15 20:55:04 Rubis systemd-logind[640]: New session 9 of user rubis.
mai 15 20:55:04 Rubis sddm-helper[1366]: [PAM] Closing session
mai 15 20:55:04 Rubis sddm-helper[1366]: [PAM] Ended.
mai 15 20:55:04 Rubis sddm-helper[1366]: pam_unix(sddm-greeter:session): session closed for user sddm
mai 15 20:55:04 Rubis sddm[1319]: Auth: sddm-helper exited successfully
mai 15 20:55:04 Rubis sddm[1319]: Greeter stopped.
mai 15 20:55:04 Rubis systemd[1]: Started session-9.scope - Session 9 of User rubis.
mai 15 20:55:04 Rubis systemd[1]: session-7.scope: Deactivated successfully.
mai 15 20:55:04 Rubis systemd-logind[640]: Session 7 logged out. Waiting for processes to exit.
mai 15 20:55:04 Rubis systemd-logind[640]: Removed session 7.
mai 15 20:55:04 Rubis sddm-helper[1436]: gkr-pam: unlocked login keyring
mai 15 20:55:04 Rubis sddm-helper[1436]: pam_env(sddm:session): deprecated reading of user environment enabled
mai 15 20:55:04 Rubis sddm-helper[1436]: Starting: "/etc/sddm/Xsession \"/usr/bin/startplasma-x11\""
mai 15 20:55:04 Rubis sddm-helper[1441]: Adding cookie to "/home/rubis/.Xauthority"
mai 15 20:55:04 Rubis sddm[1319]: Session started
mai 15 20:55:04 Rubis systemd[814]: Reloading.
mai 15 20:55:04 Rubis systemd-xdg-autostart-generator[1544]: /etc/xdg/autostart/org.kde.plasma-welcome.desktop:94: Unknown key name 'SingleMainWindow' in section 'Desktop Entry', ignoring.
mai 15 20:55:05 Rubis systemd[814]: Starting plasma-kwin_x11.service - KDE Window Manager...
mai 15 20:55:05 Rubis kwin_x11[1547]: kwin_xkbcommon: XKB: inet:334:58: unrecognized keysym "XF86EmojiPicker"
mai 15 20:55:05 Rubis kwin_x11[1547]: OpenGL vendor string:                   Intel
mai 15 20:55:05 Rubis kwin_x11[1547]: OpenGL renderer string:                 Mesa Intel(R) HD Graphics 530 (SKL GT2)
mai 15 20:55:05 Rubis kwin_x11[1547]: OpenGL version string:                  4.6 (Compatibility Profile) Mesa 22.3.6
mai 15 20:55:05 Rubis kwin_x11[1547]: OpenGL shading language version string: 4.60
mai 15 20:55:05 Rubis kwin_x11[1547]: Driver:                                 Intel
mai 15 20:55:05 Rubis kwin_x11[1547]: GPU class:                              Skylake
mai 15 20:55:05 Rubis kwin_x11[1547]: OpenGL version:                         4.6
mai 15 20:55:05 Rubis kwin_x11[1547]: GLSL version:                           4.60
mai 15 20:55:05 Rubis kwin_x11[1547]: Mesa version:                           22.3.6
mai 15 20:55:05 Rubis kwin_x11[1547]: X server version:                       1.21.1
mai 15 20:55:05 Rubis kwin_x11[1547]: Linux kernel version:                   6.1
mai 15 20:55:05 Rubis kwin_x11[1547]: Requires strict binding:                yes
mai 15 20:55:05 Rubis kwin_x11[1547]: GLSL shaders:                           yes
mai 15 20:55:05 Rubis kwin_x11[1547]: Texture NPOT support:                   yes
mai 15 20:55:05 Rubis kwin_x11[1547]: Virtual Machine:                        no
mai 15 20:55:14 Rubis systemd[1]: Stopping user@106.service - User Manager for UID 106...
mai 15 20:55:14 Rubis systemd[1371]: Activating special unit exit.target...
mai 15 20:55:14 Rubis systemd[1371]: Stopped target default.target - Main User Target.
mai 15 20:55:14 Rubis systemd[1371]: Stopping dbus.service - D-Bus User Message Bus...
mai 15 20:55:14 Rubis systemd[1371]: Stopped dbus.service - D-Bus User Message Bus.
mai 15 20:55:14 Rubis systemd[1371]: Removed slice session.slice - User Core Session Slice.
mai 15 20:55:14 Rubis systemd[1371]: Stopped target basic.target - Basic System.
mai 15 20:55:14 Rubis systemd[1371]: Stopped target paths.target - Paths.
mai 15 20:55:14 Rubis systemd[1371]: Stopped target sockets.target - Sockets.
mai 15 20:55:14 Rubis systemd[1371]: Stopped target timers.target - Timers.
mai 15 20:55:14 Rubis systemd[1371]: Closed dbus.socket - D-Bus User Message Bus Socket.
mai 15 20:55:14 Rubis systemd[1371]: Closed dirmngr.socket - GnuPG network certificate management daemon.
mai 15 20:55:14 Rubis systemd[1371]: Closed gcr-ssh-agent.socket - GCR ssh-agent wrapper.
mai 15 20:55:14 Rubis systemd[1371]: Closed gnome-keyring-daemon.socket - GNOME Keyring daemon.
mai 15 20:55:14 Rubis systemd[1371]: Closed gpg-agent-browser.socket - GnuPG cryptographic agent and passphrase cache (access for web browsers).
mai 15 20:55:14 Rubis systemd[1371]: Closed gpg-agent-extra.socket - GnuPG cryptographic agent and passphrase cache (restricted).
mai 15 20:55:14 Rubis systemd[1371]: Closed gpg-agent-ssh.socket - GnuPG cryptographic agent (ssh-agent emulation).
mai 15 20:55:14 Rubis systemd[1371]: Closed gpg-agent.socket - GnuPG cryptographic agent and passphrase cache.
mai 15 20:55:14 Rubis systemd[1371]: Removed slice app.slice - User Application Slice.
mai 15 20:55:14 Rubis systemd[1371]: Reached target shutdown.target - Shutdown.
mai 15 20:55:14 Rubis systemd[1371]: Finished systemd-exit.service - Exit the Session.
mai 15 20:55:14 Rubis systemd[1371]: Reached target exit.target - Exit the Session.
mai 15 20:55:14 Rubis systemd[1]: user@106.service: Deactivated successfully.
mai 15 20:55:14 Rubis systemd[1]: Stopped user@106.service - User Manager for UID 106.
mai 15 20:55:14 Rubis systemd[1]: Stopping user-runtime-dir@106.service - User Runtime Directory /run/user/106...
mai 15 20:55:14 Rubis systemd[1]: run-user-106.mount: Deactivated successfully.
mai 15 20:55:14 Rubis systemd[1]: user-runtime-dir@106.service: Deactivated successfully.
mai 15 20:55:14 Rubis systemd[1]: Stopped user-runtime-dir@106.service - User Runtime Directory /run/user/106.
mai 15 20:55:14 Rubis systemd[1]: Removed slice user-106.slice - User Slice of UID 106.
mai 15 20:55:34 Rubis kwin_x11[1547]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 11309, resource id: 4194351, major code: 18 (ChangeProperty), minor code: 0

Hi all,
Every time i tried to change the .Xauthority location with KDE, it failed to log_in
For exemple, normally, KDE create :
$> xauth info
Authority file: /tmp/kde-$USER/xauth-blablabla

My issue is that /tmp is remove once in a while every 6 month by the OS, so i lost $DISPLAY every 6 month.

So i would like to change its default into /var/tmp/kde-username/xauth-foobar
but export XAUTHORITY=/var/tmp/kde-username/xauth-foobar
into my ~/.bashrc freeze the connection with my VNC-like connection.

I think setting XAUTHORITY=/home/rubis/.Xauthority
is you issue.
(i did not find yet how to tell KDE to configure it correctly), this i why i end up into your question