How can I install Sway on CentOS 9 or 10?

How can I install Sway Windows Manager on CentOS Stream 9 or 10?

I am okay making / compiling it myself if I can get some instructions or links to instructions.

I currently use Fedora and want to try out CentOS as a desktop.

In Fedora you have groups for the environments. Probably in CentOS not.

groups list / F41
 sudo dnf list groups sway*
Updating and loading repositories:
Repositories loaded.
Available packages
SwayNotificationCenter.x86_64                 0.10.1-1.fc41 fedora
SwayNotificationCenter-bash-completion.noarch 0.10.1-1.fc41 fedora
SwayNotificationCenter-fish-completion.noarch 0.10.1-1.fc41 fedora
SwayNotificationCenter-zsh-completion.noarch  0.10.1-1.fc41 fedora
sway.x86_64                                   1.10.1-1.fc41 updates
sway-config-fedora.noarch                     0.4.2-1.fc41  fedora
sway-config-minimal.noarch                    1.10.1-1.fc41 updates
sway-config-upstream.noarch                   1.10.1-1.fc41 updates
sway-contrib.noarch                           1.10.1-1.fc41 updates
sway-systemd.noarch                           0.4.1-1.fc41  fedora
sway-wallpapers.noarch                        1.10.1-1.fc41 updates
swaybg.x86_64                                 1.2.1-2.fc41  fedora
swayidle.x86_64                               1.8.0-5.fc41  fedora
swayimg.x86_64                                3.9-1.fc41    updates
swaylock.x86_64                               1.8.2-1.fc41  updates

So I guess EPEL is the interface to do that in CentOS.

1 Like

dnf list groups sway* list packages whose name matches “groups” or “sway*” and has nothing to do with groups.

You do have groups in CentOS, dnf grouplist lists them (CentOS uses dnf 4).

You do not have sway groups nor sway packages in CentOS. You can try rebuilding the Fedora packages on CentOS, but you may run into dependency trouble.

If yoy want to build from source: sway has build instructions at Development Setup · swaywm/sway Wiki · GitHub

2 Likes

The missing dependencies are

meson
ninja-build
libinput-devel
libpcap-devel
pcre-devel
hwdata-devel

If I can build them from source or find an alternative to meson and ninja-build I think I can get there :slight_smile:

hwdata-devel.noarch                     0.379-10.4.el10                     crb
libinput-devel.x86_64                   1.26.1-2.el10                       crb
libpcap-devel.x86_64                    14:1.10.4-7.el10                    crb
meson.noarch                            1.4.1-4.el10                        crb
ninja-build.x86_64                      1.11.1-9.el10                       crb

And pcre2-devel is there, too. Do you really need pcre-devel?
I guess you’re good to go if you enable crb. (The above is on CentOS Stream 10.)

BTW, someone’s doing this already:

I just searched for this, I cannot vouch in any way.

I did not know about crb, thank you.

I tried to enable it but “user cannot register with any organization” when running subscription-manager register

I have an unpaid RedHat account, is there a way I can register with Fedora as a contributor with the project?

Just enable CRB?

Thanks,
I had installed subscription-manager before I found that page you linked, I removed subscription-manager and it allowed me to enable crb

The correct answer here is EPEL as @ilikelinux suggested. Packages like sway that are in Fedora but not yet in a particular EPEL version can be requested using this guide.

2 Likes

Request submitted.

If anyone wants to comment there to add weight to the EPEL request that would be great.

I did try to build it myself, but got stuck by a .1 of a version of Wayland-Server