Does anyone here have cloud-init script to get minimal KDE Plasma desktop on top of Ubuntu Server?

There are plenty of posts over internet (primarily quite aged) that suggests how to get minimal/lightweight/minimalistic KDE Plasma desktop on top of Ubuntu Server. For example, minimalistic means there is no need for bluetooth stack, fancy fonts or thunderbolt devices mgmt (that are all inscluded if to install kde-plasma-deskto).

But maybe someone here has cloud-init script for the implementation with all the caveats covered?:slight_smile:

Background - a number of cloud providers don’t allow import of custom ISO as valid OS image for the VM. For example, digitalocean doesn’t allow it, however vultr does.
But both do support cloud-init scripts.

Just in case, kde-plasma-desktop by itself is not a complete solution, as it pulls bluetooth stack, fancy fonts or thunderbolt devices mgmt and many others.

Thank you

You don’t need a complete ISO image or anything fancy to add a desktop to something like Ubuntu Server.

Install a desired meta-package, such as kde-plasma-desktop.

Thank you for the reply.

Do I understand correctly, that if I install kde-plasma-desktop with --no-install-recommends (as I’m up to “minimal”), it will not automatically install x server, sddm and others “required” packages?

No idea.
You could do a dry run with apt and see, I am not sure if any of the desktop component physically require xorg or related components. I am sure some libraries will be, but I can’t say if an actual xserver is needed.

From what I know KDE Plasma requires graphical server (one can’t run it without).

Installing kde-plasma-desktop with --no-install-recommends on top of Ubuntu Server will not give you any functional system, as xorg, sddm, kwim etc will not be installed as per the package dependencies (as I understand them).

Contrary, if one skips --no-install-recommends, it will install quite noticeable number of unnecessary packages like bluedevil, kde-style-oxygen-qt5, plasma-thunderbolt and many others

That’s why I was looking for a complete cloud-init script that accounts for those aspects.

UPD. Thank you, I’ve updated the post to mentioned “desktop” package.

Ok, my draft is (couldn’t find the way to set ‘assume-yes’ and ‘no-install-recommends’ to be applied to “packages”. so had to wrap it into “runcmd”). Comments are welcome. Especially if I can skip X and leave only Wayland (if that’s feasible, etc) asuuming I will be installing Chromium and some dev tools on that machine.

#cloud-config
# run commands
runcmd:
# Install X
- [apt, install, xserver-xorg-video-all, --no-install-recommends, --assume-yes]
- [apt, install, xserver-xorg-input-all, --no-install-recommends, --assume-yes]
- [apt, install, xserver-xorg-core, --no-install-recommends, --assume-yes]
- [apt, install, xinit, --no-install-recommends, --assume-yes]
- [apt, install, x11-xserver-utils, --no-install-recommends, --assume-yes]
# Install KDE
- [apt, install, plasma-desktop, --no-install-recommends, --assume-yes]
- [apt, install, sddm, --no-install-recommends, --assume-yes]
- [apt, install, plasma-nm, --no-install-recommends, --assume-yes]
- [apt, install, konsole, --no-install-recommends, --assume-yes]
- [apt, install, dolphin, --no-install-recommends, --assume-yes]
- [apt, install, plasma-workspace-wayland, --no-install-recommends, --assume-yes]