River: Difference between revisions

From Alpine Linux
(1. Enhanced Beginning to distinguish River from the new river-classic fork; 2. Added suggestions for other packages, including bash/zsh/fish completion; and hints to search: first for river-classic*, etc.; 3. Proposed merging Troubleshooting content into Firefox page; 4. Changed instances of River to river-classic, its new name - may need page title change unless new River version 0.4 is integrated here, if made available; 5. Style amendments)
 
(72 intermediate revisions by 11 users not shown)
Line 1: Line 1:
[https://github.com/riverwm/river River] is a dynamic tiling Wayland compositor. An introduction to River can be found in [https://isaacfreund.com/blog/river-intro/ this blog post] by the author for the 0.1.0 release.
[https://github.com/riverwm/river River] is a dynamic tiling [[Wayland]] compositor. '''River''' ''"upstream"'' has developed into [https://codeberg.org/river/river/releases/tag/v0.3.12 two different projects]:-
* '''river-classic''', which is an upstream fork of the original '''River''' version 0.3, now known under that [https://codeberg.org/river/river-classic new name].  As of November 2025, it is '''the only version available on Alpine Linux''': it can be downloaded as {{Pkg|river-classic}} from the edge community repository while it retains its legacy name as {{Pkg|river|branch=v3.22}} in the Alpine Linux v3.22 and v3.21 community repositories. {{Pill||v3.22.x|green|palegreen}} {{Pill||v3.21.x|cadetblue|lightblue}}
* The current '''River''' project upstream, version 0.4+, which is developing under their new ''river-window-management-v1 protocol'', also known by its ''rwm tag''.
Updating the original {{ic|river}} package from version 0.3 to version 0.4 would cause breakages, and therefore, distinct projects are being developed upstream.


This wiki was written starting from a fresh install using the Alpine 3.14.2 x86_64 extended .iso. The steps begin from the first reboot after running setup-alpine and performing a sys install to disk.  
== Prerequisites ==
{{:Include:Desktop prerequisites}}
* Wayland compositors need raw access to input and output devices, typically mediated by a [[seat manager]]. Either [[seatd]] or [[elogind]] work fine, but installing both leads to conflicts.
* Installing [[Alpine_setup_scripts#setup-wayland-base|wayland-base]] enables [[elogind]] as the [[Seat manager|seat manager]] and also enables the [[Repositories#Community|community repository]] and [[eudev]].


== First Boot ==
== Installation ==
 
On the first boot after a new Alpine installation, there are some basic system configuration tasks typically done regardless of whether you plan to run a GUI desktop or not. These are the steps I run through:
 
Login as root, create a new user and update group membership:
{{Cmd|adduser sodface
addgroup sodface audio
addgroup sodface input
addgroup sodface video
addgroup sodface wheel
}}
 
Install sudo and run visudo to uncomment the wheel group:
{{Cmd|apk add sudo && visudo}}
 
The following links contain guides for setting up the video stack.
 
* [https://wiki.alpinelinux.org/wiki/Intel_Video Intel Video]
* [https://wiki.alpinelinux.org/wiki/Radeon_Video Radeon Video]
 
Add yourself to the input and video groups:


<pre>
Install '''river-classic''' and its documentation:
# adduser $USER input
* Under Alpine Linux v3.22 and v3.21 {{Pill||v3.22.x|green|palegreen}} {{Pill||v3.21.x|cadetblue|lightblue}}
# adduser $USER video
:{{Cmd|# apk add {{Pkg|river|branch=v3.22}} {{Pkg|river-doc|branch=v3.22}}}}
</pre>


You have to log out and back in for this to take effect.
* Under Alpine Linux Edge version
:{{Cmd|# apk add {{Pkg|river-classic}} {{Pkg|river-classic-doc}}}}


Install some TTF fonts:
The <code>-doc</code> packages are required to use the example config.


<pre>
Install your choice of additional packages.  The following list includes icons, fonts and a terminal emulator named '''foot''', which is the default in '''river-classic''''s sample init file that we will use later.
# apk add ttf-dejavu
</pre>


Since sway 1.6.1 (more specifically, since wlroots 0.14), you need to set up libseat backend if you wish to run sway directly (without nesting it in another wayland compositor). To do that, choose one of the following methods:
{{Cmd|# apk add {{Pkg|adwaita-icon-theme}} {{Pkg|foot}} {{Pkg|font-dejavu}}}}


<dl>
Further packages that are available include the following.  Ensure that the [[Repositories#Using_testing_repository|edge repository is enabled and tagged]] first before installing any of the following with the ''@testing'' tag, last checked in November 2025:-
 
* {{Pkg|rivercarro}} for a fork of the rivertile layout (tag as @testing);
<dt>seatd daemon</dt>
* {{Pkg|river-luatile}} to write layouts in lua (tag as @testing);
<dd>
* {{Pkg|river-shifttags}} to enable the reordering of tags (tag as @testing):
<pre>
* {{Pkg|river-bedload}} to send info to STDOUT (tag as @testing);
# apk add seatd
* those for bash/zsh/fish completion (some are in @testing, some in community repo):  say, {{Pkg|river-bash-completion|branch=v3.22}} in Alpine Linux v3.22 community repo, or {{Pkg|river-classic-bash-completion}} in Alpine Linux Edge community;
# rc-update add seatd
To begin a search for any more packages:-
# rc-service seatd start
* If running Edge, run {{ic|apk search -v river-classic}} first, or see {{Pkg|river-classic*}}.
# adduser $USER seat
* For Alpine Linux v3.22/v3.21, or for a cruder, more generic search, one could try {{ic|<nowiki>apk search -v river | grep -v 'driver'</nowiki>}} , which would exclude the term 'driver'; {{ic|apk search -v river}}; or see {{Pkg|river*|branch=3.22}} for packages that begin with that term.
</pre>
 
If you are already logged in as a $USER, you will need to relogin.
</dd>
 
<dt>seatd-launch</dt>
<dd>
<pre>
# apk add seatd-launch
</pre>
 
When starting sway, you will need to prefix invocation with <code>seatd-launch</code>.
Note: <code>seatd-launch</code> is a suid binary, so it might be wise to use one of the other methods from a security perspective.
</dd>
 
<dt>elogind daemon</dt>
<dd>
TODO
</dd>
 
</dl>
 
== Installation ==


We can now install sway:
== Running river-classic ==


<pre>
Before running '''river-classic''' for the first time, copy the sample init file to {{Path|~/.config}}:
# apk add sway sway-doc
# apk add                \ # Install optional dependencies:
    xwayland            \ # strongly reccommended for compatibility reasons
    alacritty            \ # default terminal emulator
    dmenu                \ # default application launcher
    swaylock            \ # lockscreen tool
    swayidle              # idle management (DPMS) daemon
</pre>


== Running Sway ==
{{Cmd|install -Dm0755 /usr/share/doc/river/examples/init -t ~/.config/river}}


To run sway, first set XDG_RUNTIME_DIR to a suitable location (e.g. /tmp). Install & configure elogind to skip this step. Then run sway from the Linux console:
Set [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] and then start '''river-classic'''/'''river''' with the same instruction:
{{Cmd|river}}


<pre>
== Troubleshooting ==
$ XDG_RUNTIME_DIR=/tmp sway
{{Merge|Firefox}}
</pre>
The following are a few observations discovered while running '''river-classic''';  although not directly related to the compositor, they have been tacked onto the end of this wiki.


(if you run sway with seatd-launch, you will need to use <code>$ XDG_RUNTIME_DIR=/tmp seatd-launch sway</code>)
Firefox 89.0.1 complained of ''"glxtest: libpci missing"'' on launch, resolved with:


See the [https://wiki.alpinelinux.org/wiki/Wayland Wayland] page for a permanent configuration
{{Cmd|apk add {{Pkg|pciutils-libs}}}}


{{Note|
Firefox 89.0.1 furthermore complained continuously:  ''"Unable to load hand2 from the cursor theme"'', resolved as follows:
swaylock needs to be able to read your <code>/etc/shadow</code> file to be able to validate your password
}}


== Configuration and Usage ==
{{Cmd|mkdir -p ~/.icons/default
ln -s /usr/share/icons/Adwaita/cursors ~/.icons/default/cursors}}


An example config is provided at <code>/etc/sway/config</code>. Copy it to <code>~/.config/sway/config</code> and read through it to learn the default keybindings.
== See also ==


For additional information, start at <code>man 5 sway</code> and read the [https://github.com/swaywm/sway/wiki upstream FAQ].
* [https://isaacfreund.com/blog/river-intro/ An introduction to River - isaacfreund.com]


[[Category:Desktop]]
[[Category:Compositor]]

Latest revision as of 04:14, 27 November 2025

River is a dynamic tiling Wayland compositor. River "upstream" has developed into two different projects:-

  • river-classic, which is an upstream fork of the original River version 0.3, now known under that new name. As of November 2025, it is the only version available on Alpine Linux: it can be downloaded as river-classic from the edge community repository while it retains its legacy name as river in the Alpine Linux v3.22 and v3.21 community repositories.

v3.22.x v3.21.x

  • The current River project upstream, version 0.4+, which is developing under their new river-window-management-v1 protocol, also known by its rwm tag.

Updating the original river package from version 0.3 to version 0.4 would cause breakages, and therefore, distinct projects are being developed upstream.

Prerequisites

Installation

Install river-classic and its documentation:

  • Under Alpine Linux v3.22 and v3.21

v3.22.x v3.21.x

# apk add river river-doc

  • Under Alpine Linux Edge version

# apk add river-classic river-classic-doc

The -doc packages are required to use the example config.

Install your choice of additional packages. The following list includes icons, fonts and a terminal emulator named foot, which is the default in river-classic's sample init file that we will use later.

# apk add adwaita-icon-theme foot font-dejavu

Further packages that are available include the following. Ensure that the edge repository is enabled and tagged first before installing any of the following with the @testing tag, last checked in November 2025:-

To begin a search for any more packages:-

  • If running Edge, run apk search -v river-classic first, or see river-classic*.
  • For Alpine Linux v3.22/v3.21, or for a cruder, more generic search, one could try apk search -v river | grep -v 'driver' , which would exclude the term 'driver'; apk search -v river; or see river* for packages that begin with that term.

Running river-classic

Before running river-classic for the first time, copy the sample init file to ~/.config:

install -Dm0755 /usr/share/doc/river/examples/init -t ~/.config/river

Set XDG_RUNTIME_DIR and then start river-classic/river with the same instruction:

river

Troubleshooting

This material is proposed for merging ...

It should be merged with Firefox. (Discuss)

The following are a few observations discovered while running river-classic; although not directly related to the compositor, they have been tacked onto the end of this wiki.

Firefox 89.0.1 complained of "glxtest: libpci missing" on launch, resolved with:

apk add pciutils-libs

Firefox 89.0.1 furthermore complained continuously: "Unable to load hand2 from the cursor theme", resolved as follows:

mkdir -p ~/.icons/default ln -s /usr/share/icons/Adwaita/cursors ~/.icons/default/cursors

See also