Alternatives & Notes - dslm4515/BMLFS Wiki

Replacing elogind with seatd

elogind setups XDG_RUNTIME_DIR which is needs to be set for wayfire or other wlroot-based compositors

Create a seatd service that creates /run/user with permissions 0770 and runs seatd -g seat. There should be a group called seat with a GID of 28. Any users that will need a seat managed by seatd should be part of this group. Each user should have a .bashrc that creates a directory /run/user/$(id -u) with permissions 700 and sets XDG_RUNTIME_DIR=/run/user/$(id -u) source

An example to add to .bashrc:

# Setup XDG_RUNTIME_DIR
if [ ! -e /run/user/$(id -u) ](/dslm4515/BMLFS/wiki/-!--e-/run/user/$(id--u)-); then
        install -m0770 -d /run/user/$(id -u)
        touch /run/user/$(id -u)/created_by_bashrc
fi
export XDG_RUNTIME_DIR="/run/user/$(id -u)"

Setting up sudo to allow only users of group sudo

Make a group sudo with GID of 27. All users that will use sudo should be part of this group. Via visudo, uncomment this line:

# %sudo ALL=(ALL) ALL

D-Bus Machine ID Generation

A new machine-id can be generated by:

rm -v /var/lib/dbus/machine-id
dbus-uuidgen --ensure=/etc/machine-id
dbus-uuidgen --ensure

Remote Desktop with Wayland (Wlroots)

Install wayvnc for the host and tigervnc-client for the client.

wlvncc can be used if host and client are on the same nework and no ecryption or authorization used.

Create a self-signed X509 certificate on the host with gnutls. For IP address, enter public facing IP address of host:

certtool --generate-privkey --outfile ca-key.pem
certtool --generate-self-signed --load-privkey ca-key.pem --outfile ca-cert.pem

This should produce a certificate (ca-cert.pem) and key (ca-key.pem). Store both to a directory like /etc/wayvnc

Then create the config file for wayvnc. Address can be set to 0.0.0.0 for local access or use host's local IP address:

cat > wayvnc.config << "EOF"
address=0.0.0.0
enable_auth=true
username=user
password=password
private_key_file=/etc/wayvnc/ca-key.pem
certificate_file=/etc/wayvnc/ca-cert.pem
EOF

Copy ca-cert.pem to client, like /etc/wayvnc/ca-cert.pem on the client.

Configure tigervnc client:

Security
 > Encryption
   >> [ ] none
   >> [x] TLS with anonymous certificates
   >> [x] TLS with X509 certificates
      >>> Path to CA X509 Certificate file
          [ /etc/wayvnc/ca-cert.pem ]
      >>> Path to CA X509 CRL File
          [ /etc/wayvnc/ca-cert.pem ]
 > Authentication
   >> [ ] none
   >> [x] Standard VNC
   >> [x] User name & password

Building and Setting up NetworkManager with IWD

*iwd should be running before NetworkManager starts.

Configure NetworkManager source with:

--with-crypto=gnutls 
--without-wext # if not using wpa_supplicant
--with-iwd 

Then configure build with /etc/NetworkManager/conf.d/nm.conf

[device]
wifi.backend=iwd
wifi.iwd.autoconnect=yes
iwd-config-path=/var/lib/iwd

Source

Desktop Notifications under Wayland

For Wayfire, install mako (mako-notifications, not the Mako python module). Test it by using firefox to visit https://www.bennish.net/web-notifications.html

Gamepads

For the Xbox One Controller (model 1708), use xpadneo:

$ git clone https://github.com/atar-axis/xpadneo.git
$ cd xpadneo
# Make sure kernel source of running is linked at /usr/src/linux
$ cd hid-xpadneo && make modules && sudo make modules_install

Tested Xbox One Controller (model 1708) to work fine via bluetooth and tested with 'Don't Starve' game

Display Managers

So far I have tested ly with Wayfire on a S6+S6-rc init system. ly is unresponsive if launched as a longrun boot service but works fine as a oneshot service (any errors, ly will exit, leaving the tty without a login).

As a oneshot service, ly can be launched as:

# To launch on tty1:
exec setsid agetty -J -nl /usr/bin/ly tty1 38400 linux