I'll need someone to walk me through setting up Wayland Desktop Environment with linux within a systemd-nspawn container.
How to set up nested Wayland Desktop Environment with systemd-nspawn container, like VirtualBox
8.5k Views Asked by AudioBubble At
1
There are 1 best solutions below
Related Questions in CONTAINERS
- Pass Data between two view controllers using 'Delegation' : Objective-C
- Revealing module pattern instantiation and naming convention
- Is using the same Redis instance for different applications against Separation of Concerns principle?
- Swift - Issue trying to access to Singleton object
- How to set data context of ViewModela View's xaml?
- How to use nested builder pattern in json?
- Is object casting a good practice?
- reference data class member visitor pattern
- variable global const "macros" in C++ and optimal design patterns
- How to design abstract listener and its implementation?
Related Questions in VIRTUALIZATION
- Pass Data between two view controllers using 'Delegation' : Objective-C
- Revealing module pattern instantiation and naming convention
- Is using the same Redis instance for different applications against Separation of Concerns principle?
- Swift - Issue trying to access to Singleton object
- How to set data context of ViewModela View's xaml?
- How to use nested builder pattern in json?
- Is object casting a good practice?
- reference data class member visitor pattern
- variable global const "macros" in C++ and optimal design patterns
- How to design abstract listener and its implementation?
Related Questions in WAYLAND
- Pass Data between two view controllers using 'Delegation' : Objective-C
- Revealing module pattern instantiation and naming convention
- Is using the same Redis instance for different applications against Separation of Concerns principle?
- Swift - Issue trying to access to Singleton object
- How to set data context of ViewModela View's xaml?
- How to use nested builder pattern in json?
- Is object casting a good practice?
- reference data class member visitor pattern
- variable global const "macros" in C++ and optimal design patterns
- How to design abstract listener and its implementation?
Related Questions in SYSTEMD-NSPAWN
- Pass Data between two view controllers using 'Delegation' : Objective-C
- Revealing module pattern instantiation and naming convention
- Is using the same Redis instance for different applications against Separation of Concerns principle?
- Swift - Issue trying to access to Singleton object
- How to set data context of ViewModela View's xaml?
- How to use nested builder pattern in json?
- Is object casting a good practice?
- reference data class member visitor pattern
- variable global const "macros" in C++ and optimal design patterns
- How to design abstract listener and its implementation?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
How to set up your nested Wayland Desktop Environment with systemd-nspawn container, like VirtualBox
This tutorial walks you through setting up Wayland Desktop Environment with linux systemd-nspawn container on your computer. This is similar to VMware Workstation or VirtualBox, but linux only with minimal overhead performance.
A Quick Look at the final result
Features and benefits
✓ Hardware independent containerOS by the hardware abstraction with extremely efficient, minimal performance overhead method by systemd-nspawn container technology
✓ 100% portable among systemd enabled linux hosts, easy backup and recovery
✓ Direct rendering works such as 3D Desktop effects
✓ Video and Sound works
✓ Network works out of the box
✓ Less likely to mess up the hostOS and infrequent reboot operations for the hostOS and the hardware, instead, enjoy the instant virtual boot, poweroff and reboot of the containerOS.
Summary of How to
Launch
kwin_wayland
window,that is nested on your current desktop environment.
Boot your container OS with
systemd-nspawn
From the containerOS console:
(a) Launch a Desktop Environment such as XFCE or LXQt to the targeted
kwin_wayland
window.(b) Simply prepare your favorite launcher app like synapse or xfce4-panel alone for a minimal setup.
Walk through
HostOS with minimal applications
The hostOS can be any linuxOS with systemd and the desktop environment can be either Wayland or legacy X11.
Alghough, Wayland hostOS is obviously preferable, the situation is still immature. As of March 2017, only Fedora 25 sports Wayland-based GNOME session as the default over the X11-based one, but the other distros does not. The latest version of KDE-Plasma is stable with X11/Xorg, but unstable with Wayland.
Probably, if you use GNOME for the host environment, go for Wayland, but if Plasma or other DE, be conservative to use X11/Xorg for stability.
This method works very well on both conditions, and personally, I use Arch Linux with KDE-Plasma(X11/Xorg).
Install
systemd-nspawn
andkwin_wayland
Some distro such as Arch already has
systemd-nspawnsystemd-nspawn
, but others such as Ubuntu does not.Binary package “systemd-container” in ubuntu xenial
kwin-waylandBinary package “kwin-wayland” in ubuntu xenial
Arch probably has
kwin_wayland
inxorg-server-xwayland
package.Launch kwin_wayland window
KWin
is known as one of the most feature complete and most stable window managers. This is a direct rendering enabledwayland
window space managed byKWin
, and nested on your current desktop environment.for
fish
shellBoot your containerOS
Bind
/YOUR_DATA_DIRECTORY
of the hostOS to the containerOS, so that you can share the data directory between both, at the same time, your containerOS can stay as small and clean as possible and good for portability and backup/restore.Login the containerOS console.
Typically, you build your container distro OS from minimal/server OS images.Remember, you do not need to instal X11/Xorg display server, or wayland for containerOS since
kwin_wayland
window plays the role.Launch a DesktopEnvironment (XFCE) to the targeted
kwin_wayland
window.Remember, KWin is already running, and it's a feature complete and powerful WindowManager. You can launch and switch tasks with KWin via shortcut-keys, or prepare your favorite launcher app like
synapse
orxfce4-panel
for a minimal setup.However, if we need more user friendly Desktop Environments, just install and launch
XFCE
orLXQt
that can run along withKWin
.From the containerOS console:
Maximize and remove the frame of the kwin_wayland window as default
Probably, you want to remove the frame of the containerOS, this is how to on Plasma (DE of the HostOS).
Final result
Confirm XFCE environment recognizes that running on XWAYLAND display.
XWayland implements a compatibility layer to seamlessly run legacy X11 applications on Wayland.
So far, more like exceptionally, if you install GUI libraries of wayland, with a certain flag, you can see the GUI applications run natively on wayland.
The left is
kate
window with Xorg/X11 compatiblity mode.The right is the window with wayland native mode.
As you can see the native wayland app does not reflect the current window theme and the XFCE panel does not show the app task, and you cannot tell the difference of the performance as long as you use the normal applications of PC.
So, probably there's not much reason to pursuit wayland native mode app. but the situation can be different for 3D games, and significantly different on small devices such as Raspberry Pi.
(Optional) legacy X11/Xorg
Althogh this tutorial focuses on wayland nested window, Xephyr (a nested X server that runs as an X application) has been around for a long time.
Unlike
kwin_wayland
,Xepher
is not optimized for direct rendering and KWin Window manager is not bundled, so if you run KWin or other direct rendering composer on top ofXepher
, things are going slow and inefficient, therefore, not recommended, but here's how:HostOS and ContainerOS interaction
You cannot Copy&Paste between HostOS and ContainerOS.
You may consider to use GoogleKeep to share contents between HostOS and ContainerOS, and of course, you shold have shared directories via systemd-nspawn bind.
Portability
You may "backup/recover" or "copy" or "move" the continerOS to anywhere regardless of
/etc/fstab
etc.)or any other typical integration glitches!
Just be aware of the host kernel versions.
Backup
your machines directory
./machines
your machines backup directory
./machines-bak
your machine image directory
arch1
Recovery
Backup Tools
The
tar
commands above may be not the smartest method, however, it's a proven robust method without any extra tool installations. Often, simple is best.However, you may select various backup tools for more efficiency.
Synchronization and backup programs @ArchWIKI
Git base bup looks good and new.
What you may consider to remove from the container OS
Any hardeware dependent factors such as:
/etc/fstab
NetworkManager.service
ofsystemd
MIT License