Skip to content

Instantly share code, notes, and snippets.

@solidus1983
Forked from concatime/dot.md
Created August 11, 2023 21:57
Show Gist options
  • Save solidus1983/964542b7a5a4aa416daced71cd5e410f to your computer and use it in GitHub Desktop.
Save solidus1983/964542b7a5a4aa416daced71cd5e410f to your computer and use it in GitHub Desktop.

apt-transport-https

First, if you are on Ubuntu Cosmic, you need to manually compile json-c because the version provided is 0.12.1, but sway requires at least version 0.13. It is pretty straight forward, so take a look here.

Then, we need to install common dependencies between wlroots and sway-1.0.

sudo apt install gcc pkgconf meson ninja-build libwayland-dev libinput-dev libcap-dev

Secondly, we need to install wlroots dependencies.

sudo apt install wayland-protocols libegl1-mesa-dev libgles2-mesa-dev libdrm-dev libgbm-dev libxkbcommon-dev libudev-dev libpixman-1-dev

If you want xwayland/X11 support, add these dependencies.

sudo apt install libxcb-composite0-dev libxcb-xfixes0-dev libxcb-image0-dev libxcb-render0-dev libx11-xcb-dev

Let’s compile wlroots.

git clone https://github.com/swaywm/wlroots
cd wlroots
meson build
cd build
ninja
sudo ninja install

Then, build sway.

sudo apt install libjson-c-dev libpcre3-dev libcairo-dev libpango1.0-dev libpangocairo-1.0-0 libgdk-pixbuf2.0-dev libpam-dev
git clone https://github.com/swaywm/sway -b 1.0-alpha.5
cd sway
meson build
cd build
ninja
sudo ninja install
sudo sed -ie 's/bionic/cosmic/g' /etc/apt/sources.list
sudo apt update
sudo apt install libxkbcommon-dev libudev-dev libpixman-1-dev libgles2-mesa-dev xcb libxcb-composite0-dev libxcb-image0-dev libsystemd-dev libxcb-icccm4-dev libxcb-xkb-dev libxcb-util-dev libpng-dev libavutil-dev libavcodec-dev libavformat-dev libpango1.0-dev libgdk-pixbuf2.0-dev libcap-dev libpam0g-dev
# COMMONS
sudo apt install gcc pkgconf meson ninja-build libwayland-dev libinput-dev libcap-dev
# WLROOTS
sudo apt install wayland-protocols libegl1-mesa-dev libgles2-mesa-dev libdrm-dev libgbm-dev libxkbcommon-dev libudev-dev libpixman-1-dev
# xwayland
libxcb-composite0-dev libxcb-xfixes0-dev libxcb-image0-dev libxcb-render0-dev libx11-xcb-dev
# libsystemd-dev libelogind-dev libpng-dev libavutil-dev libavcodec-dev libavformat-dev etags ctags
# SWAY
sudo apt install libjson-c-dev libpcre3-dev libcairo-dev libpango1.0-dev libpangocairo-1.0-0 libgdk-pixbuf2.0-dev libpam-dev
json-c-devel pcre-devel wlroots-devel wayland-devel wayland-protocols libxkbcommon-devel cairo-devel pango-devel gdk-pixbuf-devel pixman-devel libcap-devel libinput-devel pam-devel scdoc
wget https://github.com/swaywm/wlroots/archive/2a58d44.tar.gz https://github.com/swaywm/sway/archive/1.0-alpha.4.tar.gz https://github.com/json-c/json-c/archive/json-c-0.13.1-20180305.tar.gz
tar xf *.tar.gz
cd jsno-c*
sh autogen.sh
make
sudo make install
cd ../wlroots*
meson build
cd build
ninja
sudo ninja install
cd ../../sway*
meson build
cd build
ninja
sudo ninja install
sudo setcap "cap_sys_ptrace,cap_sys_tty_config=eip" /usr/local/bin/sway
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment