|
1 | 1 | - [Distrobox](../README.md) |
2 | | - - [Run latest GNOME and KDE Plasma using distrobox](run_latest_gnome_kde_on_distrobox.md) |
| 2 | + - [Run latest GNOME, KDE Plasma, and Hyprland using distrobox](run_latest_gnome_kde_on_distrobox.md) |
3 | 3 | - [Using a stable-release distribution](#using-a-stable-release-distribution) |
4 | 4 | - [Initializing the distrobox](#initializing-the-distrobox) |
5 | 5 | - [Running Latest GNOME](#running-latest-gnome) |
6 | 6 | - [Generate session file - GNOME](#generate-session-file---gnome) |
7 | 7 | - [Running Latest Plasma](#running-latest-plasma) |
8 | 8 | - [Generate session file - Plasma](#generate-session-file---plasma) |
9 | 9 | - [Add a couple of fixes](#add-a-couple-of-fixes) |
| 10 | + - [Running Latest Hyprland](#running-latest-hyprland) |
10 | 11 | - [Using other GUIs](#using-other-guis) |
11 | 12 | - [Using apps from host](#using-apps-from-host) |
12 | 13 |
|
@@ -157,6 +158,34 @@ Let's log out and voilá! |
157 | 158 | We now are in latest KDE Plasma session inside Fedora Rawhide while our main OS remains |
158 | 159 | Centos. |
159 | 160 |
|
| 161 | +## Running Latest Hyprland |
| 162 | + |
| 163 | +Hyprland is a bit tricky because of how it is implemented. We will need to |
| 164 | +create a container with access to `dri` and `input` devices, along with the dbus |
| 165 | +socket that Wayland will use. Simply use this as a template: |
| 166 | + |
| 167 | +```shell |
| 168 | +distrobox-create -n hyprbox -i archlinux:latest \ |
| 169 | + --additional-flags "--device /dev/dri --device /dev/input -v /run/dbus/system_bus_socket:/run/dbus/system_bus_socket" |
| 170 | +``` |
| 171 | + |
| 172 | +Install Hyprland inside the container and then use the following line to start Hyprland: |
| 173 | + |
| 174 | +```shell |
| 175 | +distrobox-enter hyprbox -- bash -c ' |
| 176 | + #export XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR |
| 177 | + #export WAYLAND_DISPLAY=$WAYLAND_DISPLAY |
| 178 | +
|
| 179 | + exec Hyprland |
| 180 | +' |
| 181 | +``` |
| 182 | + |
| 183 | +This will require you to not have any other Wayland sessions running. |
| 184 | + |
| 185 | +If you want to run Hyprland on a second tty, set the `XDG_RUNTIME_DIR` and the |
| 186 | +`WAYLAND_DISPLAY` variables to something unique. Otherwise, applications |
| 187 | +launched from the container will display on the first Wayland Display they see. |
| 188 | + |
160 | 189 | # Using other GUIs |
161 | 190 |
|
162 | 191 | Thanks to [J.S. Evans](https://twitter.com/usenetnerd) he experimented and wrote a beautiful blog post |
|
0 commit comments