{"id":207,"date":"2019-01-14T17:20:09","date_gmt":"2019-01-15T00:20:09","guid":{"rendered":"http:\/\/blog.northfield.ws\/wordpress\/?p=207"},"modified":"2020-02-23T11:05:24","modified_gmt":"2020-02-23T18:05:24","slug":"wayfire","status":"publish","type":"post","link":"http:\/\/blog.northfield.ws\/wordpress\/wayfire\/","title":{"rendered":"Wayfire"},"content":{"rendered":"<p>Usually I blog about compiz after a release but I wanted to share something different. There is a C++ wayland\/wlroots compositor by\u00a0<a href=\"https:\/\/github.com\/ammen99\">Ilia Bozhinov<\/a> in the works that has many compiz-like features. It&#8217;s called <a href=\"https:\/\/github.com\/WayfireWM\/wayfire\/\">Wayfire<\/a> and it has quite a few bells so far. It functions on a plugin based system much like compiz and the API is fairly nice. I&#8217;ve written <a href=\"https:\/\/github.com\/WayfireWM\/wcm\">wcm<\/a>,\u00a0 a configuration GUI for wayfire inspired heavily by ccsm. There are videos on the website at <a href=\"https:\/\/wayfire.org\">wayfire.org<\/a> you can view to see the basics. It will only work with drivers offering gbm however, which basically means it works with open source drivers. Wayfire and wlroots are very much in development so the bleeding edge may not work but when it does, it&#8217;s fire.<br \/>\nGeneral build guide for ubuntu 18.04:<\/p>\n<p>1) Install dependencies from packages.<\/p>\n<pre class=\"lang:default decode:true\">$ sudo apt install git python3-pip pkg-config libwayland-dev autoconf libtool libffi-dev libxml2-dev libegl1-mesa-dev libgles2-mesa-dev libgbm-dev libinput-dev libxkbcommon-dev libpixman-1-dev xutils-dev xcb-proto python-xcbgen libcairo2-dev libglm-dev libjpeg-dev libgtkmm-3.0-dev xwayland<\/pre>\n<p>2) Install meson and ninja.<\/p>\n<pre class=\"lang:default decode:true \">$ pip3 install meson ninja; . ~\/.profile<\/pre>\n<p>3) Export prefix, PATH and PKG_CONFIG_PATH variables.<\/p>\n<pre class=\"lang:default decode:true \">$ export prefix=\/opt\/wayfire\r\n$ export PATH=$prefix\/bin:$PATH\r\n$ export PKG_CONFIG_PATH=$prefix\/lib\/pkgconfig:$prefix\/share\/pkgconfig:$prefix\/lib\/x86_64-linux-gnu\/pkgconfig<\/pre>\n<p>4) Create the installation directory and change user and group so we can install the software as user. Also create a src directory to hold the source code.<\/p>\n<pre class=\"lang:default decode:true \">$ sudo mkdir $prefix; sudo chown $USER:$USER $prefix\r\n$ mkdir ~\/src; cd ~\/src<\/pre>\n<p>5) Clone the source we will need.<\/p>\n<pre class=\"lang:default decode:true\">$ git clone https:\/\/gitlab.freedesktop.org\/wayland\/wayland\r\n$ git clone git:\/\/anongit.freedesktop.org\/wayland\/wayland-protocols\r\n$ git clone git:\/\/anongit.freedesktop.org\/xcb\/libxcb\r\n$ git clone https:\/\/github.com\/swaywm\/wlroots\r\n$ git clone https:\/\/github.com\/WayfireWM\/wayfire\r\n$ git clone https:\/\/github.com\/WayfireWM\/wf-shell\r\n$ git clone https:\/\/github.com\/WayfireWM\/wcm<\/pre>\n<p>6) Build the source code.<\/p>\n<pre class=\"lang:default decode:true\">$ cd ~\/src\/wayland &amp;&amp; .\/autogen.sh --prefix=$prefix --disable-documentation &amp;&amp; make &amp;&amp; make install<\/pre>\n<pre class=\"lang:default decode:true\">$ cd ~\/src\/wayland-protocols &amp;&amp; .\/autogen.sh --prefix=$prefix &amp;&amp; make &amp;&amp; make install<\/pre>\n<pre class=\"lang:default decode:true\">$ cd ~\/src\/libxcb &amp;&amp; .\/autogen.sh --prefix=$prefix &amp;&amp; make &amp;&amp; make install<\/pre>\n<pre class=\"lang:default decode:true\">$ cd ~\/src\/wlroots &amp;&amp; meson build --prefix=$prefix &amp;&amp; ninja -C build &amp;&amp; ninja -C build install<\/pre>\n<pre class=\"lang:default decode:true\">$ cd ~\/src\/wayfire &amp;&amp; meson build --prefix=$prefix &amp;&amp; ninja -C build &amp;&amp; ninja -C build install<\/pre>\n<pre class=\"lang:default decode:true\">$ cd ~\/src\/wf-shell &amp;&amp; meson build --prefix=$prefix &amp;&amp; ninja -C build &amp;&amp; ninja -C build install<\/pre>\n<pre class=\"lang:default decode:true\">$ cd ~\/src\/wcm &amp;&amp; meson build --prefix=$prefix &amp;&amp; ninja -C build &amp;&amp; ninja -C build install<\/pre>\n<p>7) Copy config files in place and modify them a bit.<\/p>\n<pre class=\"lang:default decode:true \">$ cp ~\/src\/wayfire\/wayfire.ini.default ~\/.config\/wayfire.ini\r\n$ cp ~\/src\/wf-shell\/wf-shell.ini.example ~\/.config\/wf-shell.ini\r\n$ sed -i 's\/env XDG_CURRENT_DESKTOP=GNOME gnome-control-center\/wcm\/' ~\/.config\/wf-shell.ini<\/pre>\n<p>Optionally set a background image in ~\/.config\/wf-shell.ini from your system.<\/p>\n<p>8) Save this script as \/usr\/local\/bin\/wayfire.<\/p>\n<pre class=\"lang:default decode:true \">#!\/bin\/bash\r\n\r\nprefix=\/opt\/wayfire\r\nlog_file=\/tmp\/wayfire.log\r\n\r\nexport PATH=\"$prefix\"\/bin:$PATH\r\nexport XDG_DATA_DIRS=\"$prefix\"\/share:$XDG_DATA_DIRS\r\nexport GTK_THEME=Adwaita:dark\r\nexport GDK_BACKEND=wayland\r\nexport QT_QPA_PLATFORM=wayland\r\nexport LD_LIBRARY_PATH=\"$prefix\"\/lib:\"$prefix\"\/lib\/x86_64-linux-gnu\/\r\nexec \"$prefix\"\/bin\/wayfire \"$@\" &amp;&gt; \"$log_file\"<\/pre>\n<p>8b) Make it executable.<\/p>\n<pre class=\"lang:default decode:true\">$ sudo chmod +x \/usr\/local\/bin\/wayfire\r\n<\/pre>\n<p>9) Run it.<\/p>\n<pre class=\"lang:default decode:true\">$ \/usr\/local\/bin\/wayfire\r\n<\/pre>\n<p>9b) Open an application. Either run a native terminal,<\/p>\n<pre class=\"lang:default decode:true\">WAYLAND_DISPLAY=wayland-0 GDK_BACKEND=wayland terminator\r\n<\/pre>\n<p>or an X11 one.<\/p>\n<pre class=\"lang:default decode:true\">DISPLAY=:1 xterm<\/pre>\n<p>10) Optionally switch to tty to use the drm backend. Make sure your user is part of the video group to run as user.<\/p>\n<pre class=\"lang:default decode:true \">sudo adduser $USER video<\/pre>\n<p>11) Optionally create \/usr\/share\/wayland-sessions\/wayfire.desktop to login from lightdm.<\/p>\n<pre class=\"lang:default decode:true\">[Desktop Entry]\r\nVersion=1.0\r\nName=Wayfire Session\r\nComment=Use this session to run Wayfire as your desktop environment\r\nExec=\/usr\/local\/bin\/wayfire\r\nType=Application<\/pre>\n<p>Firefox nightly should work as a native browser. Ctrl+Alt+Bckspc to log out. Any questions should be asked in #wayfire on irc.freenode.net or an issue filed on <a href=\"https:\/\/github.com\/WayfireWM\">github<\/a> for the relevant component. To remove the compiled packages and source, remove \/opt\/wayfire\/, ~\/src\/, \/usr\/local\/bin\/wayfire and \/usr\/share\/wayland-sessions\/wayfire.desktop. Checkout <a href=\"http:\/\/wayfire.org\">wayfire.org<\/a> for more information.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Usually I blog about compiz after a release but I wanted to share something different. There is a C++ wayland\/wlroots compositor by\u00a0Ilia Bozhinov in the works that has many compiz-like features. It&#8217;s called Wayfire and it has quite a few bells so far. It functions on a plugin based system much like compiz and the &hellip; <a href=\"http:\/\/blog.northfield.ws\/wordpress\/wayfire\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Wayfire<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-207","post","type-post","status-publish","format-standard","hentry","category-wayland"],"_links":{"self":[{"href":"http:\/\/blog.northfield.ws\/wordpress\/wp-json\/wp\/v2\/posts\/207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.northfield.ws\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.northfield.ws\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.northfield.ws\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.northfield.ws\/wordpress\/wp-json\/wp\/v2\/comments?post=207"}],"version-history":[{"count":45,"href":"http:\/\/blog.northfield.ws\/wordpress\/wp-json\/wp\/v2\/posts\/207\/revisions"}],"predecessor-version":[{"id":263,"href":"http:\/\/blog.northfield.ws\/wordpress\/wp-json\/wp\/v2\/posts\/207\/revisions\/263"}],"wp:attachment":[{"href":"http:\/\/blog.northfield.ws\/wordpress\/wp-json\/wp\/v2\/media?parent=207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.northfield.ws\/wordpress\/wp-json\/wp\/v2\/categories?post=207"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.northfield.ws\/wordpress\/wp-json\/wp\/v2\/tags?post=207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}