You have 2 options, use the script descrived bellow or follow the instrutions
script in this gist if you want the source code
wget https://gist.githubusercontent.com/Vertecedoc4545/6e54487f07a1888b656b656c0cdd9764/raw/2c5e8ccb428fc331307e2f653cab88174c051310/build-ubuntu-23.sh
chmod +x build-ubuntu-23.sh
./build-ubuntu-23.sh
Warning you will need to add the bellow config to your hyprland.conf file after installing hyprland either way. If you detect a bug respect to xdg-portals reffer to the issue in github
misc {
suppress_portal_warnings = true
}
Nvidia building : Here
Most of our dependencies are disponible in the official repos, for speed is recomendable to use nala package manager intead of apt
installing nala will keep apt
sudo apt-get install -y nala
sudo nala install -y meson wget build-essential ninja-build cmake-extras cmake gettext gettext-base fontconfig libfontconfig-dev libffi-dev libxml2-dev libdrm-dev libxkbcommon-x11-dev libxkbregistry-dev libxkbcommon-dev libpixman-1-dev libudev-dev libseat-dev seatd libxcb-dri3-dev libvulkan-dev libvulkan-volk-dev vulkan-validationlayers-dev libvkfft-dev libgulkan-dev libegl-dev libgles2 libegl1-mesa-dev glslang-tools libinput-bin libinput-dev libxcb-composite0-dev libavutil-dev libavcodec-dev libavformat-dev libxcb-ewmh2 libxcb-ewmh-dev libxcb-present-dev libxcb-icccm4-dev libxcb-render-util0-dev libxcb-res0-dev libxcb-xinput-dev libpango1.0-dev xdg-desktop-portal-wlr hwdata-dev
or if you don't want to use nala apt replacement do:
sudo apt-get install -y meson wget build-essential ninja-build cmake-extras cmake gettext gettext-base fontconfig libfontconfig-dev libffi-dev libxml2-dev libdrm-dev libxkbcommon-x11-dev libxkbregistry-dev libxkbcommon-dev libpixman-1-dev libudev-dev libseat-dev seatd libxcb-dri3-dev libvulkan-dev libvulkan-volk-dev vulkan-validationlayers-dev libvkfft-dev libgulkan-dev libegl-dev libgles2 libegl1-mesa-dev glslang-tools libinput-bin libinput-dev libxcb-composite0-dev libavutil-dev libavcodec-dev libavformat-dev libxcb-ewmh2 libxcb-ewmh-dev libxcb-present-dev libxcb-icccm4-dev libxcb-render-util0-dev libxcb-res0-dev libxcb-xinput-dev xdg-desktop-portal-wlr hwdata-dev
but some dependencies that we requiere are a little older in the repos so we need to build them
first get all of our sources for building then extarct them
Hyprland and containing folder
mkdir HyprSource
cd HyprSource
## We get Source
wget https://github.com/hyprwm/Hyprland/releases/download/v0.24.1/source-v0.24.1.tar.gz
tar -xvf source-v0.24.1.tar.gz
wget https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/1.31/downloads/wayland-protocols-1.31.tar.xz
tar -xvJf wayland-protocols-1.31.tar.xz
wget https://gitlab.freedesktop.org/wayland/wayland/-/releases/1.22.0/downloads/wayland-1.22.0.tar.xz
tar -xzvJf wayland-1.22.0.tar.xz
wget https://gitlab.freedesktop.org/emersion/libdisplay-info/-/releases/0.1.1/downloads/libdisplay-info-0.1.1.tar.xz
tar -xvJf libdisplay-info-0.1.1.tar.xz
now only get inside each one, we build and install directly
cd wayland-1.22.0
mkdir build &&
cd build &&
meson setup .. \
--prefix=/usr \
--buildtype=release \
-Ddocumentation=false &&
ninja
sudo ninja install
cd ../..
cd wayland-protocols-1.31
mkdir build &&
cd build &&
meson setup --prefix=/usr --buildtype=release &&
ninja
sudo ninja install
cd ../..
cd libdisplay-info-0.1.1/
mkdir build &&
cd build &&
meson setup --prefix=/usr --buildtype=release &&
ninja
sudo ninja install
cd ../..
you will need to change the folder permisions due to the use of sudo, so in the future you can acces and modify the folder
chmod a+rw hyprland-source
cd hyprland-source/
modify config.mk and change PREFIX=/usr/local to PREFIX=/usr or use this command
sed -i 's/\/usr\/local/\/usr/g' config.mk
also in that file you could use your custom cflags as for example adding -O3 or -Ofast optimization even -Og etc..
sudo make install
*enjoy Hyprland !!
Installing Hyprland through PikaOS Repository
For anyone wanting to install hyprland from the pika-os repo, which is easier (but only if ya trust them), here is a neat and concise guide for adding the PikaOS repository, installing Hyprland, including the fix for hyprland not showing up on login screen... Since some of y'all are new to linux.
1. Download and Install the GPG Key
Create a Directory for Keyrings (Skips automatically, if exists):
Download and Add the GPG Key:
2. Add the Repository
Create the Repository List File:
Add the Repository Entry:
Add the following line to the file:
This line includes:
arch=amd64
: Specifies the architecture (adjust if necessary or leave as it is).signed-by=/usr/share/keyrings/pikaos-archive-keyring.gpg
: Uses the GPG keyring for repository verification.https://ppa.pika-os.com
: Base URL for the repository.pikauwu main external
: Specifies the distribution and components.3. Update Package List
Update your package list to include packages from the new repository:
4. Install Packages
You can now install packages from the repository. In our case, to install
hyprland
:(Optional) If Hyprland does not show up in the login screen, you may need to add a
.desktop
file for it in the appropriate directory and maybe restart. Here’s how you can do it:1. Create the .desktop File
Open a Terminal and Create/Edit the File:
Add the Following Content:
Name
: The name that will appear in the login screen.Comment
: A short description of the window manager.Exec
: The command to start Hyprland.Type
: The type of desktop entry.DesktopNames
: The name of the desktop environment (optional, used in some login managers).Save and Exit:
Save the file and exit the editor (Ctrl + O, Enter, Ctrl + X).
2. Ensure Permissions Are Correct
Make sure the
.desktop
file has the correct permissions:3. Restart the Display Manager
Restart your display manager to refresh the login screen options. The exact command may vary depending on your display manager (or just try all of them xD):
GDM (GNOME Display Manager):
LightDM:
SDDM (Simple Desktop Display Manager):
4. Log In
Restart your system or log out and Hyprland should appear as an option in your login screen. Try to select Hyprland from the login screen.
Well that's it lads, have a great day and have fun ricing! 💛
@ferrreo @MartinFillon @mklx25
Edit: It seems that @katabame has a way easier solution. I would recommend to follow their method than the above for anyone who wants to install in future, here is the comment for reference:
https://gist.github.com/Vertecedoc4545/3b077301299c20c5b9b4db00f4ca6000?permalink_comment_id=5061289#gistcomment-5061289