Skip to content

Commit 159acc0

Browse files
authored
docs: add Hyprland setup instructions to Distrobox guide (#1833)
* Add Hyprland setup instructions to Distrobox guide Added instructions for running the latest Hyprland session in Distrobox, including container creation and environment variable setup. I did not add any images, as I am unsure if they are needed. * fixed lint issues * Update link to include Hyprland in documentation
1 parent 42c8dc6 commit 159acc0

1 file changed

Lines changed: 30 additions & 1 deletion

File tree

docs/posts/run_latest_gnome_kde_on_distrobox.md renamed to docs/posts/run_latest_gnome_kde_hyprland_on_distrobox.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
- [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)
33
- [Using a stable-release distribution](#using-a-stable-release-distribution)
44
- [Initializing the distrobox](#initializing-the-distrobox)
55
- [Running Latest GNOME](#running-latest-gnome)
66
- [Generate session file - GNOME](#generate-session-file---gnome)
77
- [Running Latest Plasma](#running-latest-plasma)
88
- [Generate session file - Plasma](#generate-session-file---plasma)
99
- [Add a couple of fixes](#add-a-couple-of-fixes)
10+
- [Running Latest Hyprland](#running-latest-hyprland)
1011
- [Using other GUIs](#using-other-guis)
1112
- [Using apps from host](#using-apps-from-host)
1213

@@ -157,6 +158,34 @@ Let's log out and voilá!
157158
We now are in latest KDE Plasma session inside Fedora Rawhide while our main OS remains
158159
Centos.
159160

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+
160189
# Using other GUIs
161190

162191
Thanks to [J.S. Evans](https://twitter.com/usenetnerd) he experimented and wrote a beautiful blog post

0 commit comments

Comments
 (0)