<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Espindola</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Espindola"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Espindola"/>
	<updated>2026-05-05T11:18:22Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Eudev&amp;diff=30755</id>
		<title>Eudev</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Eudev&amp;diff=30755"/>
		<updated>2025-08-17T18:43:11Z</updated>

		<summary type="html">&lt;p&gt;Espindola: /* Manual installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:eudev}}&lt;br /&gt;
[https://github.com/eudev-project/eudev eudev] is a [[Device_Manager|device manager]] that provides a drop-in replacement for systemd udev. It is therefore recommended for full blown desktop environments.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
The easy way to setup eudev is through the [[#Setup_script|setup script]]. Only advanced users are recommended to do [[#Manual installation|manual installation]].&lt;br /&gt;
&lt;br /&gt;
=== Setup script ===&lt;br /&gt;
{{:Include:Setup Device Manager}}&lt;br /&gt;
&lt;br /&gt;
=== Manual installation ===&lt;br /&gt;
&lt;br /&gt;
You need to install eudev itself and the udev services. {{cmd|# apk add {{pkg|eudev}} {{pkg|udev-init-scripts}}}}&lt;br /&gt;
&lt;br /&gt;
If you already have a device manager installed you need to stop it before you start eudev. Then enable the following services.&lt;br /&gt;
{{cmd|&amp;lt;nowiki&amp;gt;# rc-update add udev sysinit&lt;br /&gt;
# rc-update add udev-trigger sysinit&lt;br /&gt;
# rc-update add udev-settle sysinit&lt;br /&gt;
# rc-update add udev-postmount default&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If you are not running in a chroot you will also want to start eudev. {{cmd|&amp;lt;nowiki&amp;gt;# rc-service udev start&lt;br /&gt;
# rc-service udev-trigger start&lt;br /&gt;
# rc-service udev-settle start&lt;br /&gt;
# rc-service udev-postmount start &amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If you want to use [https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ predictable network interface names], install eudev-netifnames. {{cmd|# apk add {{pkg|eudev-netifnames}}}}&lt;br /&gt;
&lt;br /&gt;
== Remove ==&lt;br /&gt;
&lt;br /&gt;
{{warning|Disabling eudev without setting up a different device manager may cause unexpected issues. If you install a different device manager with the setup script this step is not needed.}}&lt;br /&gt;
&lt;br /&gt;
If you are not running in a chroot you need to stop the service first.{{cmd|&amp;lt;nowiki&amp;gt;# rc-service udev stop&lt;br /&gt;
# rc-service udev-postmount stop&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Then disable the services. {{cmd|&amp;lt;nowiki&amp;gt;# rc-update delete udev sysinit&lt;br /&gt;
# rc-update delete udev-trigger sysinit&lt;br /&gt;
# rc-update delete udev-settle sysinit&lt;br /&gt;
# rc-update delete udev-postmount default&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
You might also want to uninstall the packages since they are not used anymore. {{cmd|# apk del {{pkg|eudev}} {{pkg|udev-init-scripts}}}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[:Category:Device_Manager|Device Managers]]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Eudev Gentoo wiki eudev]&lt;br /&gt;
* [https://wiki.archlinux.org/title/Udev Archwiki udev]&lt;br /&gt;
* [[Gamepad]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Device_Manager]]&lt;/div&gt;</summary>
		<author><name>Espindola</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Elogind&amp;diff=26767</id>
		<title>Elogind</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Elogind&amp;diff=26767"/>
		<updated>2024-05-23T12:22:34Z</updated>

		<summary type="html">&lt;p&gt;Espindola: /* Hibernating */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://github.com/elogind/elogind &#039;&#039;&#039;elogind&#039;&#039;&#039;] is a login manager and provides support for &lt;br /&gt;
&lt;br /&gt;
* setting up necessary permissions for the desktop environment or window manager&lt;br /&gt;
* handling poweroff, reboot, suspend and hibernate via &#039;&#039;&#039;loginctl&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# apk add {{Pkg|elogind}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; rc-update add elogind&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; rc-service elogind start}}&lt;br /&gt;
Polkit is used for authentication. Without it some things may not function. You need to install and configure [[D-Bus#Installation|D-Bus]] to use polkit.&lt;br /&gt;
{{Cmd|# apk add {{Pkg|polkit-elogind}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; rc-update add polkit&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; rc-service polkit start}}&lt;br /&gt;
&lt;br /&gt;
Set up a [[PAM]] login.&lt;br /&gt;
&lt;br /&gt;
== Hibernating ==&lt;br /&gt;
&lt;br /&gt;
For {{Cmd|# loginctl hibernate}} to work, you must have a swap partition. Check {{Cmd|# lsblk}} for a partition with the mountpoint [SWAP].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
nvme0n1     259:0    0 953.9G  0 disk &lt;br /&gt;
├─nvme0n1p1 259:1    0   200M  0 part /boot&lt;br /&gt;
├─nvme0n1p2 259:2    0   100G  0 part /&lt;br /&gt;
├─nvme0n1p3 259:3    0   805G  0 part /home&lt;br /&gt;
└─nvme0n1p4 259:4    0  48.7G  0 part [SWAP]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember also to add a kernel parameter to resume, ie in {{Path|/etc/default/grub}} :&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/default/grub|&amp;lt;nowiki&amp;gt;...&lt;br /&gt;
GRUB_CMDLINE_LINUX_DEFAULT=&amp;quot;modules=sd-mod,usb-storage,ext4,nvme quiet rootfstype=ext4 resume=/dev/nvme0n1p4&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Note the &amp;quot;resume=&amp;quot; flag with the same partition that was marked as [SWAP].&lt;br /&gt;
&lt;br /&gt;
The resume process can be speed up reducing the size of the hibernation images. See the documentation for [https://docs.kernel.org/admin-guide/pm/sleep-states.html?highlight=image_size#basic-sysfs-interfaces-for-system-suspend-and-hibernation image_size] in the kernel docs for the details, but writing 0 to {{Path|/sys/power/image_size}} should make the images as small as possible.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== logind.conf ===&lt;br /&gt;
&lt;br /&gt;
Edit {{Path|/etc/elogind/logind.conf}} to configure handling of power events, such as suspending the computer when power button is pressed:&lt;br /&gt;
&lt;br /&gt;
{{cat|/etc/elogind/logind.conf|...&lt;br /&gt;
[Login]&lt;br /&gt;
HandlePowerKey{{=}}suspend&lt;br /&gt;
...}}&lt;br /&gt;
&lt;br /&gt;
=== Working with Desktop Environments ===&lt;br /&gt;
&lt;br /&gt;
If using a Window Manager or Desktop Environment, such as [[Sway]], the user must ensure that login session is correctly configured.  When correctly configured, the &amp;lt;code&amp;gt;loginctl&amp;lt;/code&amp;gt; command should output the following:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Using [[Sway]] and [[SDDM]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;background-color:#f9f9f9; border:1px dashed #2f6fab; line-height:1.1em; padding:1em; font-family:monospace; font-size:10pt; white-space:pre; overflow:auto;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:green;&amp;quot;&amp;gt;~&amp;lt;/span&amp;gt;&#039;&#039;&#039;$&#039;&#039;&#039; loginctl&lt;br /&gt;
&lt;br /&gt;
SESSION  UID USER SEAT  TTY &lt;br /&gt;
     c1  105 sddm seat0     &lt;br /&gt;
     c2 1000 User seat0 tty8&lt;br /&gt;
&lt;br /&gt;
2 sessions listed.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the output is &amp;lt;code&amp;gt;No session available.&amp;lt;/code&amp;gt;, such as in the case of launching Sway from tty, suspend and many other functionality will not work.  The user then must configure a display manager such as {{Pkg|greetd}}, [[SDDM]] or {{Pkg|lightdm|LightDM}}.&lt;br /&gt;
&lt;br /&gt;
== Doas ==&lt;br /&gt;
&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &lt;br /&gt;
&lt;br /&gt;
 /bin/loginctl suspend&lt;br /&gt;
&lt;br /&gt;
(use full path to executable) and brightness can be adjusted by running&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/brightnessctl set 100&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Elogind elogind - Gentoo Wiki]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Polkit polkit - Gentoo Wiki]&lt;br /&gt;
* [https://wiki.archlinux.org/title/Polkit polkit - ArchWiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]]&lt;br /&gt;
[[Category:Seat_manager]]&lt;/div&gt;</summary>
		<author><name>Espindola</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Elogind&amp;diff=26766</id>
		<title>Elogind</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Elogind&amp;diff=26766"/>
		<updated>2024-05-23T12:21:24Z</updated>

		<summary type="html">&lt;p&gt;Espindola: /* Hibernating */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://github.com/elogind/elogind &#039;&#039;&#039;elogind&#039;&#039;&#039;] is a login manager and provides support for &lt;br /&gt;
&lt;br /&gt;
* setting up necessary permissions for the desktop environment or window manager&lt;br /&gt;
* handling poweroff, reboot, suspend and hibernate via &#039;&#039;&#039;loginctl&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# apk add {{Pkg|elogind}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; rc-update add elogind&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; rc-service elogind start}}&lt;br /&gt;
Polkit is used for authentication. Without it some things may not function. You need to install and configure [[D-Bus#Installation|D-Bus]] to use polkit.&lt;br /&gt;
{{Cmd|# apk add {{Pkg|polkit-elogind}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; rc-update add polkit&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; rc-service polkit start}}&lt;br /&gt;
&lt;br /&gt;
Set up a [[PAM]] login.&lt;br /&gt;
&lt;br /&gt;
== Hibernating ==&lt;br /&gt;
&lt;br /&gt;
For {{Cmd|# loginctl hibernate}} to work, you must have a swap partition. Check {{Cmd|# lsblk}} for a partition with the mountpoint [SWAP].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
nvme0n1     259:0    0 953.9G  0 disk &lt;br /&gt;
├─nvme0n1p1 259:1    0   200M  0 part /boot&lt;br /&gt;
├─nvme0n1p2 259:2    0   100G  0 part /&lt;br /&gt;
├─nvme0n1p3 259:3    0   805G  0 part /home&lt;br /&gt;
└─nvme0n1p4 259:4    0  48.7G  0 part [SWAP]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember also to add a kernel parameter to resume, ie in {{Path|/etc/default/grub}} :&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/default/grub|&amp;lt;nowiki&amp;gt;...&lt;br /&gt;
GRUB_CMDLINE_LINUX_DEFAULT=&amp;quot;modules=sd-mod,usb-storage,ext4,nvme quiet rootfstype=ext4 resume=/dev/nvme0n1p4&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Note the &amp;quot;resume=&amp;quot; flag with the same partition that was marked as [SWAP].&lt;br /&gt;
&lt;br /&gt;
The resume process can be speed up reducing the size of the hibernation images. See the documentation for [https://docs.kernel.org/admin-guide/pm/sleep-states.html?highlight=image_size#basic-sysfs-interfaces-for-system-suspend-and-hibernation image_size] in the kernel docs for the details, but writing 0 to /sys/power/image_size should make the images as small as possible.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== logind.conf ===&lt;br /&gt;
&lt;br /&gt;
Edit {{Path|/etc/elogind/logind.conf}} to configure handling of power events, such as suspending the computer when power button is pressed:&lt;br /&gt;
&lt;br /&gt;
{{cat|/etc/elogind/logind.conf|...&lt;br /&gt;
[Login]&lt;br /&gt;
HandlePowerKey{{=}}suspend&lt;br /&gt;
...}}&lt;br /&gt;
&lt;br /&gt;
=== Working with Desktop Environments ===&lt;br /&gt;
&lt;br /&gt;
If using a Window Manager or Desktop Environment, such as [[Sway]], the user must ensure that login session is correctly configured.  When correctly configured, the &amp;lt;code&amp;gt;loginctl&amp;lt;/code&amp;gt; command should output the following:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Using [[Sway]] and [[SDDM]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;background-color:#f9f9f9; border:1px dashed #2f6fab; line-height:1.1em; padding:1em; font-family:monospace; font-size:10pt; white-space:pre; overflow:auto;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:green;&amp;quot;&amp;gt;~&amp;lt;/span&amp;gt;&#039;&#039;&#039;$&#039;&#039;&#039; loginctl&lt;br /&gt;
&lt;br /&gt;
SESSION  UID USER SEAT  TTY &lt;br /&gt;
     c1  105 sddm seat0     &lt;br /&gt;
     c2 1000 User seat0 tty8&lt;br /&gt;
&lt;br /&gt;
2 sessions listed.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the output is &amp;lt;code&amp;gt;No session available.&amp;lt;/code&amp;gt;, such as in the case of launching Sway from tty, suspend and many other functionality will not work.  The user then must configure a display manager such as {{Pkg|greetd}}, [[SDDM]] or {{Pkg|lightdm|LightDM}}.&lt;br /&gt;
&lt;br /&gt;
== Doas ==&lt;br /&gt;
&lt;br /&gt;
Doas is used to grant permissions for suspend-to-RAM and brightness control with brightnessctl:&lt;br /&gt;
&lt;br /&gt;
 apk add doas brightnessctl&lt;br /&gt;
 # optionally, allow $USER root access with password&lt;br /&gt;
 adduser $USER wheel&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;/etc/doas.conf&amp;lt;/code&amp;gt;, set&lt;br /&gt;
&lt;br /&gt;
 permit :wheel&lt;br /&gt;
 permit nopass $USER as root cmd /bin/loginctl&lt;br /&gt;
 permit nopass $USER as root cmd /usr/bin/brightnessctl&lt;br /&gt;
&lt;br /&gt;
After setting the above, suspend-to-RAM can be triggered by running &lt;br /&gt;
&lt;br /&gt;
 /bin/loginctl suspend&lt;br /&gt;
&lt;br /&gt;
(use full path to executable) and brightness can be adjusted by running&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/brightnessctl set 100&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Elogind elogind - Gentoo Wiki]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Polkit polkit - Gentoo Wiki]&lt;br /&gt;
* [https://wiki.archlinux.org/title/Polkit polkit - ArchWiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]]&lt;br /&gt;
[[Category:Seat_manager]]&lt;/div&gt;</summary>
		<author><name>Espindola</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=MDNS&amp;diff=26672</id>
		<title>MDNS</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=MDNS&amp;diff=26672"/>
		<updated>2024-05-03T10:33:21Z</updated>

		<summary type="html">&lt;p&gt;Espindola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:mDNS}}&lt;br /&gt;
[https://en.wikipedia.org/wiki/Multicast_DNS Multicast DNS] is a protocol that is normally used for the discovery of printers. It is implemented by Avahi, but more setup is needed for the regular name resolution to see the results.&lt;br /&gt;
&lt;br /&gt;
== Setup avahi ==&lt;br /&gt;
&lt;br /&gt;
Install, enable and start avahi with:&lt;br /&gt;
&lt;br /&gt;
{{cmd|doas apk add {{pkg|avahi}}&lt;br /&gt;
doas rc-update add avahi-daemon&lt;br /&gt;
doas rc-service avahi-daemon start}}&lt;br /&gt;
&lt;br /&gt;
It should now be possible to browse results. To look for a printer, use:&lt;br /&gt;
&lt;br /&gt;
{{cmd|doas apk add {{pkg|avahi-tools}}&lt;br /&gt;
avahi-browse --resolve --terminate  _ipp._tcp}}&lt;br /&gt;
&lt;br /&gt;
Make note of the hostname, as we will use it afterwards.&lt;br /&gt;
&lt;br /&gt;
== Setup avahi2dns ==&lt;br /&gt;
&lt;br /&gt;
Name resolution is implemented by musl, and it only supports DNS, so we have to map the avahi results to a regular DNS server. This is done by avahi2dns.&lt;br /&gt;
&lt;br /&gt;
{{cmd|git clone https://github.com/LouisBrunner/avahi2dns&lt;br /&gt;
cd avahi2dns&lt;br /&gt;
go build&lt;br /&gt;
doas cp avahi2dns /usr/bin&lt;br /&gt;
doas cp openrc/avahi2dns /etc/init.d}}&lt;br /&gt;
&lt;br /&gt;
since we will want a full DNS server running at port 53, we need to configure avahi2dns to use another port. Do that by creating {{path|/etc/conf.d/avahi2dns}} containing:&lt;br /&gt;
&lt;br /&gt;
  command_args=&amp;quot;-p 5354&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Enable and start avahi2dns with&lt;br /&gt;
&lt;br /&gt;
{{cmd|doas rc-update add avahi2dns&lt;br /&gt;
doas rc-service avahi2dns start}}&lt;br /&gt;
&lt;br /&gt;
It should now be possible to use DNS to query the address of the printer.&lt;br /&gt;
&lt;br /&gt;
{{cmd|drill -p 5354 @127.0.0.1 &amp;lt;printer_name&amp;gt;.local}}&lt;br /&gt;
&lt;br /&gt;
Where printer_name is the hostname given by avahi-browse.&lt;br /&gt;
&lt;br /&gt;
== Setup DNS resolver ==&lt;br /&gt;
&lt;br /&gt;
We now need to setup a DNS resolver that will forward request of .local domain to avahi2dns and handle other requests normally. There is more than one way to do it, but we document an option that is probably most convenient for a laptop: using the DHCP provided server for the regular DNS requests. We will use unbound as the server and resolvconf to inform unbound about the DHCP results.&lt;br /&gt;
&lt;br /&gt;
Install the programs:&lt;br /&gt;
&lt;br /&gt;
{{cmd|doas apk add {{pkg|openresolv}} {{pkg|unbound}}}}&lt;br /&gt;
&lt;br /&gt;
Create {{path|/etc/resolvconf.conf}}:&lt;br /&gt;
&lt;br /&gt;
  name_servers=127.0.0.1&lt;br /&gt;
  unbound_conf=/etc/unbound-resolvconf.conf&lt;br /&gt;
&lt;br /&gt;
This tells resolveconf to use a local nameserver and pass the DHCP provided DNS server to unbound&lt;br /&gt;
&lt;br /&gt;
Create {{path|/etc/unbound/unbound.conf}}:&lt;br /&gt;
&lt;br /&gt;
  forward-zone:&lt;br /&gt;
        name: &amp;quot;local&amp;quot;&lt;br /&gt;
        forward-addr: 127.0.0.1@5354&lt;br /&gt;
  include: &amp;quot;/etc/unbound-resolvconf.conf&amp;quot;&lt;br /&gt;
  server:&lt;br /&gt;
        do-not-query-localhost: no&lt;br /&gt;
        domain-insecure: &amp;quot;local&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This reads the information provided by resolvconf, but forwards .local requests to avahi2dns. We also need to disable dnssec for .local and tell unbound that it is OK to query localhost.&lt;br /&gt;
&lt;br /&gt;
Enable and start unbound&lt;br /&gt;
&lt;br /&gt;
{{cmd|doas rc-update add unbound&lt;br /&gt;
doas rc-service unbound start}}&lt;br /&gt;
&lt;br /&gt;
== Setup DHCP client ==&lt;br /&gt;
&lt;br /&gt;
How send the DHCP provided DNS to resolvconf depends on the DHCP client being used.&lt;br /&gt;
&lt;br /&gt;
=== udhcpc ===&lt;br /&gt;
&lt;br /&gt;
This is the DHCP client in busybox, and will work for both wired and wireless interfaces. &lt;br /&gt;
&lt;br /&gt;
Create {{path|/etc/udhcpc/udhcpc.conf}}:&lt;br /&gt;
&lt;br /&gt;
  RESOLV_CONF=&amp;quot;/etc/udhcpc-resolv.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Create {{path|/etc/udhcpc/post-bound/resolvconf}}:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/sh&lt;br /&gt;
  cat /etc/udhcpc-resolv.conf | resolvconf -a $interface&lt;br /&gt;
&lt;br /&gt;
and make it executable&lt;br /&gt;
&lt;br /&gt;
{{cmd|chmod 755 /etc/udhcpc/post-bound/resolvconf}}&lt;br /&gt;
&lt;br /&gt;
An inconvenience of this setup is that udhcpc will not reconfigure the interface when connecting to other wifi networks. For that to happen one has to run&lt;br /&gt;
&lt;br /&gt;
{{cmd|iwctl station wlan0 connect &amp;lt;network_name&amp;gt;&lt;br /&gt;
doas kill -USR2 $(cat  /run/udhcpc.wlan0.pid)&lt;br /&gt;
doas kill -USR1 $(cat  /run/udhcpc.wlan0.pid)}}&lt;br /&gt;
&lt;br /&gt;
=== iwd ===&lt;br /&gt;
&lt;br /&gt;
To avoid having to manually reconfigure the wifi interface, we can configure iwd to use DHCP internally and forward DNS server info to resolveconf. To do that create {{path|/etc/iwd/main.conf}}:&lt;br /&gt;
&lt;br /&gt;
  [General]&lt;br /&gt;
  EnableNetworkConfiguration=True&lt;br /&gt;
&lt;br /&gt;
  [Network]&lt;br /&gt;
  NameResolvingService=resolvconf&lt;br /&gt;
&lt;br /&gt;
== Test the setup ==&lt;br /&gt;
&lt;br /&gt;
You should now be able to query for both the printer address and regular addresses with&lt;br /&gt;
&lt;br /&gt;
{{cmd|drill @127.0.0.1 &amp;lt;printer_name&amp;gt;.local&lt;br /&gt;
drill @127.0.0.1 alpinelinux.org}}&lt;br /&gt;
&lt;br /&gt;
Your {{path|/etc/resolv.conf}} should also contain&lt;br /&gt;
&lt;br /&gt;
  nameserver 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Printer discovery should now be working.&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;/div&gt;</summary>
		<author><name>Espindola</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=MDNS&amp;diff=26671</id>
		<title>MDNS</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=MDNS&amp;diff=26671"/>
		<updated>2024-05-03T10:22:56Z</updated>

		<summary type="html">&lt;p&gt;Espindola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:mDNS}}&lt;br /&gt;
[https://en.wikipedia.org/wiki/Multicast_DNS Multicast DNS] is a protocol that is normally used for the discovery of printers. It is implemented by Avahi, but more setup is needed for the regular name resolution to see the results.&lt;br /&gt;
&lt;br /&gt;
== Setup avahi ==&lt;br /&gt;
&lt;br /&gt;
Install, enable and start avahi with:&lt;br /&gt;
&lt;br /&gt;
{{cmd|doas apk add {{pkg|avahi}}&lt;br /&gt;
doas rc-update add avahi-daemon&lt;br /&gt;
doas rc-service avahi-daemon start}}&lt;br /&gt;
&lt;br /&gt;
It should now be possible to browse results. To look for a printer, use:&lt;br /&gt;
&lt;br /&gt;
{{cmd|doas apk add {{pkg|avahi-tools}}&lt;br /&gt;
avahi-browse --resolve --terminate  _ipp._tcp}}&lt;br /&gt;
&lt;br /&gt;
Make note of the hostname, as we will use it afterwards.&lt;br /&gt;
&lt;br /&gt;
== Setup avahi2dns ==&lt;br /&gt;
&lt;br /&gt;
Name resolution is implemented by musl, and it only supports DNS, so we have to map the avahi results to a regular DNS server. This is done by avahi2dns.&lt;br /&gt;
&lt;br /&gt;
{{cmd|git clone https://github.com/LouisBrunner/avahi2dns&lt;br /&gt;
cd avahi2dns&lt;br /&gt;
go build&lt;br /&gt;
doas cp avahi2dns /usr/bin&lt;br /&gt;
doas cp openrc/avahi2dns /etc/init.d}}&lt;br /&gt;
&lt;br /&gt;
since we will want a full DNS server running at port 53, we need to configure avahi2dns to use another port. Do that by creating {{path|/etc/conf.d/avahi2dns}} containing:&lt;br /&gt;
&lt;br /&gt;
  command_args=&amp;quot;-p 5354&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Enable and start avahi2dns with&lt;br /&gt;
&lt;br /&gt;
{{cmd|doas rc-update add avahi2dns&lt;br /&gt;
doas rc-service avahi2dns start}}&lt;br /&gt;
&lt;br /&gt;
It should now be possible to use DNS to query the address of the printer.&lt;br /&gt;
&lt;br /&gt;
{{cmd|drill -p 5354 @127.0.0.1 &amp;lt;printer_name&amp;gt;.local}}&lt;br /&gt;
&lt;br /&gt;
Where printer_name is the hostname given by avahi-browse.&lt;br /&gt;
&lt;br /&gt;
== Setup DNS resolver ==&lt;br /&gt;
&lt;br /&gt;
We now need to setup a DNS resolver that will forward request of .local domain to avahi2dns and handle other requests normally. There is more than one way to do it, but we document an option that is probably most convenient for a laptop: using the DHCP provided server for the regular DNS requests. We will use unbound as the server and resolvconf to inform unbound about the DHCP results.&lt;br /&gt;
&lt;br /&gt;
Install the programs:&lt;br /&gt;
&lt;br /&gt;
{{cmd|doas apk add {{pkg|openresolv}} {{pkg|unbound}}}}&lt;br /&gt;
&lt;br /&gt;
Create {{path|/etc/resolvconf.conf}}:&lt;br /&gt;
&lt;br /&gt;
  name_servers=127.0.0.1&lt;br /&gt;
  unbound_conf=/etc/unbound-resolvconf.conf&lt;br /&gt;
&lt;br /&gt;
This tells resolveconf to use a local nameserver and pass the DHCP provided DNS server to unbound&lt;br /&gt;
&lt;br /&gt;
Create {{path|/etc/unbound/unbound.conf}}:&lt;br /&gt;
&lt;br /&gt;
  forward-zone:&lt;br /&gt;
        name: &amp;quot;local&amp;quot;&lt;br /&gt;
        forward-addr: 127.0.0.1@5354&lt;br /&gt;
  include: &amp;quot;/etc/unbound-resolvconf.conf&amp;quot;&lt;br /&gt;
  server:&lt;br /&gt;
        do-not-query-localhost: no&lt;br /&gt;
        domain-insecure: &amp;quot;local&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This reads the information provided by resolvconf, but forwards .local requests to avahi2dns. We also need to disable dnssec for .local and tell unbound that it is OK to query localhost.&lt;br /&gt;
&lt;br /&gt;
Enable and start unbound&lt;br /&gt;
&lt;br /&gt;
{{cmd|doas rc-update add unbound&lt;br /&gt;
doas rc-service unbound start}}&lt;br /&gt;
&lt;br /&gt;
== Setup DHCP client ==&lt;br /&gt;
&lt;br /&gt;
How send the DHCP provided DNS to resolvconf depends on the DHCP client being used.&lt;br /&gt;
&lt;br /&gt;
=== udhcpc ===&lt;br /&gt;
&lt;br /&gt;
This is the DHCP client in busybox, and will work for both wired and wireless interfaces. &lt;br /&gt;
&lt;br /&gt;
Create {{path|/etc/udhcpc/udhcpc.conf}}:&lt;br /&gt;
&lt;br /&gt;
  RESOLV_CONF=&amp;quot;/etc/udhcpc-resolv.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Create {{path|/etc/udhcpc/post-bound/resolvconf}}:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/sh&lt;br /&gt;
  cat /etc/udhcpc-resolv.conf | resolvconf -a $interface&lt;br /&gt;
&lt;br /&gt;
An inconvenience of this setup is that udhcpc will not reconfigure the interface when connecting to other wifi networks. For that to happen one has to run&lt;br /&gt;
&lt;br /&gt;
{{cmd|iwctl station wlan0 connect &amp;lt;network_name&amp;gt;&lt;br /&gt;
doas kill -USR2 $(cat  /run/udhcpc.wlan0.pid)&lt;br /&gt;
doas kill -USR1 $(cat  /run/udhcpc.wlan0.pid)}}&lt;br /&gt;
&lt;br /&gt;
=== iwd ===&lt;br /&gt;
&lt;br /&gt;
To avoid having to manually reconfigure the wifi interface, we can configure iwd to use DHCP internally and forward DNS server info to resolveconf. To do that create {{path|/etc/iwd/main.conf}}:&lt;br /&gt;
&lt;br /&gt;
  [General]&lt;br /&gt;
  EnableNetworkConfiguration=True&lt;br /&gt;
&lt;br /&gt;
  [Network]&lt;br /&gt;
  NameResolvingService=resolvconf&lt;br /&gt;
&lt;br /&gt;
== Test the setup ==&lt;br /&gt;
&lt;br /&gt;
You should now be able to query for both the printer address and regular addresses with&lt;br /&gt;
&lt;br /&gt;
{{cmd|drill @127.0.0.1 &amp;lt;printer_name&amp;gt;.local&lt;br /&gt;
drill @127.0.0.1 alpinelinux.org}}&lt;br /&gt;
&lt;br /&gt;
Your {{path|/etc/resolv.conf}} should also contain&lt;br /&gt;
&lt;br /&gt;
  nameserver 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Printer discovery should now be working.&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;/div&gt;</summary>
		<author><name>Espindola</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=MDNS&amp;diff=26018</id>
		<title>MDNS</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=MDNS&amp;diff=26018"/>
		<updated>2023-12-26T17:36:16Z</updated>

		<summary type="html">&lt;p&gt;Espindola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://en.wikipedia.org/wiki/Multicast_DNS Multicast DNS] is a protocol that is normally used for the discovery of printers. It is implemented by Avahi, but more setup is needed for the regular name resolution to see the results.&lt;br /&gt;
&lt;br /&gt;
== Setup avahi ==&lt;br /&gt;
&lt;br /&gt;
Install, enable and start avahi with:&lt;br /&gt;
&lt;br /&gt;
{{cmd|doas apk add {{pkg|avahi}}&lt;br /&gt;
doas rc-update add avahi-daemon&lt;br /&gt;
doas rc-service avahi-daemon start}}&lt;br /&gt;
&lt;br /&gt;
It should now be possible to browse results. To look for a printer, use:&lt;br /&gt;
&lt;br /&gt;
{{cmd|doas apk add {{pkg|avahi-tools}}&lt;br /&gt;
avahi-browse --resolve --terminate  _ipp._tcp}}&lt;br /&gt;
&lt;br /&gt;
Make note of the hostname, as we will use it afterwards.&lt;br /&gt;
&lt;br /&gt;
== Setup avahi2dns ==&lt;br /&gt;
&lt;br /&gt;
Name resolution is implemented by musl, and it only supports DNS, so we have to map the avahi results to a regular DNS server. This is done by avahi2dns.&lt;br /&gt;
&lt;br /&gt;
{{cmd|git clone https://github.com/LouisBrunner/avahi2dns&lt;br /&gt;
cd avahi2dns&lt;br /&gt;
go build&lt;br /&gt;
doas cp avahi2dns /usr/bin&lt;br /&gt;
doas cp openrc/avahi2dns /etc/init.d}}&lt;br /&gt;
&lt;br /&gt;
since we will want a full DNS server running at port 53, we need to configure avahi2dns to use another port. Do that by creating {{path|/etc/conf.d/avahi2dns}} containing:&lt;br /&gt;
&lt;br /&gt;
  command_args=&amp;quot;-p 5354&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Enable and start avahi2dns with&lt;br /&gt;
&lt;br /&gt;
{{cmd|doas rc-update add avahi-daemon&lt;br /&gt;
doas rc-service avahi-daemon start}}&lt;br /&gt;
&lt;br /&gt;
It should now be possible to use DNS to query the address of the printer.&lt;br /&gt;
&lt;br /&gt;
{{cmd|drill -p 5354 @127.0.0.1 &amp;lt;printer_name&amp;gt;.local}}&lt;br /&gt;
&lt;br /&gt;
Where printer_name is the hostname given by avahi-browse.&lt;br /&gt;
&lt;br /&gt;
== Setup DNS resolver ==&lt;br /&gt;
&lt;br /&gt;
We now need to setup a DNS resolver that will forward request of .local domain to avahi2dns and handle other requests normally. There is more than one way to do it, but we document an option that is probably most convenient for a laptop: using the DHCP provided server for the regular DNS requests. We will use unbound as the server and resolvconf to inform unbound about the DHCP results.&lt;br /&gt;
&lt;br /&gt;
Install the programs:&lt;br /&gt;
&lt;br /&gt;
{{cmd|doas apk add {{pkg|openresolv}} {{pkg|unbound}}}}&lt;br /&gt;
&lt;br /&gt;
Create {{path|/etc/resolvconf.conf}}:&lt;br /&gt;
&lt;br /&gt;
  name_servers=127.0.0.1&lt;br /&gt;
  unbound_conf=/etc/unbound-resolvconf.conf&lt;br /&gt;
&lt;br /&gt;
This tells resolveconf to use a local nameserver and pass the DHCP provided DNS server to unbound&lt;br /&gt;
&lt;br /&gt;
Create {{path|/etc/unbound/unbound.conf}}:&lt;br /&gt;
&lt;br /&gt;
  forward-zone:&lt;br /&gt;
        name: &amp;quot;local&amp;quot;&lt;br /&gt;
        forward-addr: 127.0.0.1@5354&lt;br /&gt;
  include: &amp;quot;/etc/unbound-resolvconf.conf&amp;quot;&lt;br /&gt;
  server:&lt;br /&gt;
        do-not-query-localhost: no&lt;br /&gt;
        domain-insecure: &amp;quot;local&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This reads the information provided by resolvconf, but forwards .local requests to avahi2dns. We also need to disable dnssec for .local and tell unbound that it is OK to query localhost.&lt;br /&gt;
&lt;br /&gt;
Enable and start unbound&lt;br /&gt;
&lt;br /&gt;
{{cmd|doas rc-update add unbound&lt;br /&gt;
doas rc-service unbound start}}&lt;br /&gt;
&lt;br /&gt;
== Setup DHCP client ==&lt;br /&gt;
&lt;br /&gt;
How send the DHCP provided DNS to resolvconf depends on the DHCP client being used.&lt;br /&gt;
&lt;br /&gt;
=== udhcpc ===&lt;br /&gt;
&lt;br /&gt;
This is the DHCP client in busybox, and will work for both wired and wireless interfaces. &lt;br /&gt;
&lt;br /&gt;
Create {{path|/etc/udhcpc/udhcpc.conf}}:&lt;br /&gt;
&lt;br /&gt;
  RESOLV_CONF=&amp;quot;/etc/udhcpc-resolv.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Create {{path|/etc/udhcpc/post-bound/resolvconf}}:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/sh&lt;br /&gt;
  cat /etc/udhcpc-resolv.conf | resolvconf -a $interface&lt;br /&gt;
&lt;br /&gt;
An inconvenience of this setup is that udhcpc will not reconfigure the interface when connecting to other wifi networks. For that to happen one has to run&lt;br /&gt;
&lt;br /&gt;
{{cmd|iwctl station wlan0 connect &amp;lt;network_name&amp;gt;&lt;br /&gt;
doas kill -USR2 $(cat  /run/udhcpc.wlan0.pid)&lt;br /&gt;
doas kill -USR1 $(cat  /run/udhcpc.wlan0.pid)}}&lt;br /&gt;
&lt;br /&gt;
=== iwd ===&lt;br /&gt;
&lt;br /&gt;
To avoid having to manually reconfigure the wifi interface, we can configure iwd to use DHCP internally and forward DNS server info to resolveconf. To do that create {{path|/etc/iwd/main.conf}}:&lt;br /&gt;
&lt;br /&gt;
  [General]&lt;br /&gt;
  EnableNetworkConfiguration=True&lt;br /&gt;
&lt;br /&gt;
  [Network]&lt;br /&gt;
  NameResolvingService=resolvconf&lt;br /&gt;
&lt;br /&gt;
== Test the setup ==&lt;br /&gt;
&lt;br /&gt;
You should now be able to query for both the printer address and regular addresses with&lt;br /&gt;
&lt;br /&gt;
{{cmd|drill @127.0.0.1 &amp;lt;printer_name&amp;gt;.local&lt;br /&gt;
drill @127.0.0.1 alpinelinux.org}}&lt;br /&gt;
&lt;br /&gt;
Your {{path|/etc/resolv.conf}} should also contain&lt;br /&gt;
&lt;br /&gt;
  nameserver 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Printer discovery should now be working.&lt;/div&gt;</summary>
		<author><name>Espindola</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=MDNS&amp;diff=26003</id>
		<title>MDNS</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=MDNS&amp;diff=26003"/>
		<updated>2023-12-25T11:17:58Z</updated>

		<summary type="html">&lt;p&gt;Espindola: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://en.wikipedia.org/wiki/Multicast_DNS Multicast DNS] is a protocol that is normally used for the discovery of printers. It is implemented by Avahi, but more setup is needed for the regular name resolution to see the results.&lt;br /&gt;
&lt;br /&gt;
== Setup avahi ==&lt;br /&gt;
&lt;br /&gt;
Install, enable and start avahi with:&lt;br /&gt;
&lt;br /&gt;
{{cmd|doas apk add {{pkg|avahi}}&lt;br /&gt;
doas rc-update add avahi-daemon&lt;br /&gt;
doas rc-service avahi-daemon start}}&lt;br /&gt;
&lt;br /&gt;
It should now be possible to browse results. To look for a printer, use:&lt;br /&gt;
&lt;br /&gt;
{{cmd|doas apk add {{pkg|avahi-tools}}&lt;br /&gt;
avahi-browse --resolve --terminate  _ipp._tcp}}&lt;br /&gt;
&lt;br /&gt;
Make note of the hostname, as we will use it afterwards.&lt;br /&gt;
&lt;br /&gt;
== Setup avahi2dns ==&lt;br /&gt;
&lt;br /&gt;
Name resolution is implemented by musl, and it only supports DNS, so we have to map the avahi results to a regular DNS server. This is done by avahi2dns.&lt;br /&gt;
&lt;br /&gt;
{{cmd|git clone https://github.com/LouisBrunner/avahi2dns&lt;br /&gt;
cd avahi2dns&lt;br /&gt;
go build&lt;br /&gt;
doas cp avahi2dns /usr/bin&lt;br /&gt;
doas cp openrc/avahi2dns /etc/init.d}}&lt;br /&gt;
&lt;br /&gt;
since we will want a full DNS server running at port 53, we need to configure avahi2dns to use another port. Do that by creating {{path|/etc/conf.d/avahi2dns}} containing:&lt;br /&gt;
&lt;br /&gt;
  command_args=&amp;quot;-p 5354&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Enable and start avahi2dns with&lt;br /&gt;
&lt;br /&gt;
{{cmd|doas rc-update add avahi-daemon&lt;br /&gt;
doas rc-service avahi-daemon start}}&lt;br /&gt;
&lt;br /&gt;
It should now be possible to use DNS to query the address of the printer.&lt;br /&gt;
&lt;br /&gt;
{{cmd|drill -p 5354 @127.0.0.1 &amp;lt;printer_name&amp;gt;.local}}&lt;br /&gt;
&lt;br /&gt;
Where printer_name is the hostname given by avahi-browse.&lt;br /&gt;
&lt;br /&gt;
We now need to setup a DNS resolver that will forward request of .local domain to avahi2dns and handle other requests normally. There is more than one way to do it, but we document an option that is probably most convenient for a laptop: using the DHCP provided server for the regular DNS requests. We will use unbound as the server and resolvconf and iwd to inform unbound about the DHCP results.&lt;br /&gt;
&lt;br /&gt;
Install the programs:&lt;br /&gt;
&lt;br /&gt;
{{cmd|doas apk add {{pkg|openresolv}} {{pkg|unbound}} {{pkg|iwd}}}}&lt;br /&gt;
&lt;br /&gt;
Create {{path|/etc/resolvconf.conf}}:&lt;br /&gt;
&lt;br /&gt;
  name_servers=127.0.0.1&lt;br /&gt;
  unbound_conf=/etc/unbound-resolvconf.conf&lt;br /&gt;
&lt;br /&gt;
This tells resolveconf to use a local nameserver and pass the DHCP provided DNS server to unbound&lt;br /&gt;
&lt;br /&gt;
Create {{path|/etc/unbound/unbound.conf}}:&lt;br /&gt;
&lt;br /&gt;
  forward-zone:&lt;br /&gt;
        name: &amp;quot;local&amp;quot;&lt;br /&gt;
        forward-addr: 127.0.0.1@5354&lt;br /&gt;
  include: &amp;quot;/etc/unbound-resolvconf.conf&amp;quot;&lt;br /&gt;
  server:&lt;br /&gt;
        do-not-query-localhost: no&lt;br /&gt;
        domain-insecure: &amp;quot;local&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This reads the information provided by resolvconf, but forwards .local requests to avahi2dns. We also need to disable dnssec for .local and tell unbound that it is OK to query localhost.&lt;br /&gt;
&lt;br /&gt;
And the last config charge is to have iwd forward DNS server info to resolveconf. To do that create {{path|/etc/iwd/main.conf}}:&lt;br /&gt;
&lt;br /&gt;
  [Network]&lt;br /&gt;
  NameResolvingService=resolvconf&lt;br /&gt;
&lt;br /&gt;
Enable and start unbound&lt;br /&gt;
&lt;br /&gt;
{{cmd|doas rc-update add unbound&lt;br /&gt;
doas rc-service unbound start}}&lt;br /&gt;
&lt;br /&gt;
Reconnect to your wifi. You should now be able to query for both the printer address and regular addresses with&lt;br /&gt;
&lt;br /&gt;
{{cmd|drill @127.0.0.1 &amp;lt;printer_name&amp;gt;.local&lt;br /&gt;
drill @127.0.0.1 alpinelinux.org}}&lt;br /&gt;
&lt;br /&gt;
Your {{path|/etc/resolv.conf}} should also contain&lt;br /&gt;
&lt;br /&gt;
  nameserver 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Printer discovery should now be working.&lt;/div&gt;</summary>
		<author><name>Espindola</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=MDNS&amp;diff=25877</id>
		<title>MDNS</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=MDNS&amp;diff=25877"/>
		<updated>2023-12-17T20:31:50Z</updated>

		<summary type="html">&lt;p&gt;Espindola: Created page with &amp;quot;[https://en.wikipedia.org/wiki/Multicast_DNS Multicast DNS] is a protocol that is normally used for the discovery of printers. It is implemented by Avahi, but more setup is needed for the regular name resolution to see the results.  == Setup avahi ==  Install, enable and start avahi with:   sudo apk add avahi  sudo rc-update add avahi-daemon  sudo rc-service avahi-daemon start  It should now be possible to browse results. To look for a printer, use:   sudo apk add avahi-...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://en.wikipedia.org/wiki/Multicast_DNS Multicast DNS] is a protocol that is normally used for the discovery of printers. It is implemented by Avahi, but more setup is needed for the regular name resolution to see the results.&lt;br /&gt;
&lt;br /&gt;
== Setup avahi ==&lt;br /&gt;
&lt;br /&gt;
Install, enable and start avahi with:&lt;br /&gt;
&lt;br /&gt;
 sudo apk add avahi&lt;br /&gt;
 sudo rc-update add avahi-daemon&lt;br /&gt;
 sudo rc-service avahi-daemon start&lt;br /&gt;
&lt;br /&gt;
It should now be possible to browse results. To look for a printer, use:&lt;br /&gt;
&lt;br /&gt;
 sudo apk add avahi-tools&lt;br /&gt;
 avahi-browse --resolve --terminate  _ipp._tcp&lt;br /&gt;
&lt;br /&gt;
Make note of the hostname, as we will use it afterwards.&lt;br /&gt;
&lt;br /&gt;
== Setup avahi2dns ==&lt;br /&gt;
&lt;br /&gt;
Name resolution is implemented by musl, and it only supports dns, so we have to map the avahi results to a regular dns server. This is done by avahi2dns.&lt;br /&gt;
&lt;br /&gt;
  git clone https://github.com/LouisBrunner/avahi2dns&lt;br /&gt;
  cd avahi2dns&lt;br /&gt;
  go build&lt;br /&gt;
  sudo cp avahi2dns /usr/bin&lt;br /&gt;
  sudo cp openrc/avahi2dns /etc/init.d&lt;br /&gt;
&lt;br /&gt;
since we will want a full dns server running at port 53, we need to configure avahi2dns to use another port. Do that by creating /etc/conf.d/avahi2dns containing&lt;br /&gt;
&lt;br /&gt;
  command_args=&amp;quot;-p 5354&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Enable and start avahi2dns with&lt;br /&gt;
&lt;br /&gt;
 sudo rc-update add avahi-daemon&lt;br /&gt;
 sudo rc-service avahi-daemon start&lt;br /&gt;
&lt;br /&gt;
It should now be possible to use dns to query the address of the printer.&lt;br /&gt;
&lt;br /&gt;
  drill -p 5354 @127.0.0.1 &amp;lt;printer_name&amp;gt;.local&lt;br /&gt;
&lt;br /&gt;
Where printer_name is the hostname given by avahi-browse.&lt;br /&gt;
&lt;br /&gt;
We now need to setup a dns resolver that will forward request of .local domain to avahi2dns and handle other requests normally. There is more than one way to do it, but we document an option that is probably most convenient for a laptop: using the dhcp provided server for the regular dns requests. We will use unbound as the server and resolvconf and iwd to inform unbound about the dhcp results.&lt;br /&gt;
&lt;br /&gt;
Install the programs:&lt;br /&gt;
&lt;br /&gt;
  apk add openresolv unbound iwd&lt;br /&gt;
&lt;br /&gt;
Create /etc/resolvconf.conf:&lt;br /&gt;
&lt;br /&gt;
  name_servers=127.0.0.1&lt;br /&gt;
  unbound_conf=/etc/unbound-resolvconf.conf&lt;br /&gt;
&lt;br /&gt;
This tells resolveconf to use a local nameserver and pass the dhcp provided dns server to unbound&lt;br /&gt;
&lt;br /&gt;
Create /etc/unbound/unbound.conf:&lt;br /&gt;
&lt;br /&gt;
  forward-zone:&lt;br /&gt;
        name: &amp;quot;local&amp;quot;&lt;br /&gt;
        forward-addr: 127.0.0.1@5354&lt;br /&gt;
  include: &amp;quot;/etc/unbound-resolvconf.conf&amp;quot;&lt;br /&gt;
  server:&lt;br /&gt;
        do-not-query-localhost: no&lt;br /&gt;
        domain-insecure: &amp;quot;local&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This reads the information provided by resolvconf, but forwards .local requests to avahi2dns. We also need to disable dnssec for .local and tell unbound that it is OK to query localhost.&lt;br /&gt;
&lt;br /&gt;
And the last config charge is to have iwd forward dns server info to resolveconf. To do that create /etc/iwd/main.conf:&lt;br /&gt;
&lt;br /&gt;
  [Network]&lt;br /&gt;
  NameResolvingService=resolvconf&lt;br /&gt;
&lt;br /&gt;
Enable and start unbound&lt;br /&gt;
&lt;br /&gt;
  sudo rc-update add unbound&lt;br /&gt;
  sudo rc-service unbound&lt;br /&gt;
&lt;br /&gt;
Reconnect to your wifi. You should now be able to query for both the printer address and regular addresses with&lt;br /&gt;
&lt;br /&gt;
  drill @127.0.0.1 &amp;lt;printer_name&amp;gt;.local&lt;br /&gt;
  drill @127.0.0.1 alpinelinux.org&lt;br /&gt;
&lt;br /&gt;
Your /etc/resolv.conf should also contain&lt;br /&gt;
&lt;br /&gt;
  nameserver 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
So printer discovery should now be working.&lt;/div&gt;</summary>
		<author><name>Espindola</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=23046</id>
		<title>Sway</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=23046"/>
		<updated>2023-03-11T11:33:19Z</updated>

		<summary type="html">&lt;p&gt;Espindola: Use the recommended way of starting wdg-desktop-portal-wlr.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://swaywm.org Sway] is a tiling [[Wayland]] compositor. It&#039;s a drop-in replacement for the i3 window manager.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
eudev:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apk add eudev&lt;br /&gt;
# setup-devd udev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Graphics drivers:&lt;br /&gt;
&lt;br /&gt;
* [[Intel Video]]&lt;br /&gt;
* [[Radeon Video]]&lt;br /&gt;
* [[Nvidia Video]]&lt;br /&gt;
Add user to the input and video groups:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# adduser $USER input&lt;br /&gt;
# adduser $USER video&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install some TTF fonts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apk add ttf-dejavu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seatd daemon:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apk add seatd&lt;br /&gt;
# rc-update add seatd&lt;br /&gt;
# rc-service seatd start&lt;br /&gt;
# adduser $USER seat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install sway:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apk add sway sway-doc&lt;br /&gt;
# apk add                \ # Install optional dependencies:&lt;br /&gt;
    xwayland             \ # recommended for compatibility reasons&lt;br /&gt;
    foot                 \ # default terminal emulator. Modify $term in config for a different one.&lt;br /&gt;
    bemenu               \ # wayland menu&lt;br /&gt;
    swaylock swaylockd   \ # lockscreen tool&lt;br /&gt;
    swaybg               \ # wallpaper daemon&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configure [[Wayland#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]].&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
For inter-program communication and functionality such as screensharing, install and enable dbus and PipeWire, see [[PipeWire]] and set &amp;lt;code&amp;gt;SWAYSOCK&amp;lt;/code&amp;gt; environmental variable to the value exported by &amp;lt;code&amp;gt;sway&amp;lt;/code&amp;gt;. In order to ensure that Pipewire and related services inherit the right environment variables, it is recommended to start these services via a process that is a direct descendant of sway itself.&lt;br /&gt;
&lt;br /&gt;
Launch Sway with a D-Bus server available, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dbus-run-session -- sway #prepend with exec in your login shell init script&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
An example config is provided at &amp;lt;code&amp;gt;/etc/sway/config&amp;lt;/code&amp;gt;. Copy it to &amp;lt;code&amp;gt;~/.config/sway/config&amp;lt;/code&amp;gt; and read through it to learn the default keybindings.&lt;br /&gt;
Sway configuration is mostly backwards-compatible with that of [[I3wm|i3]] and if you are looking for a solution for a specific issue, you may also try checking if it hasn&#039;t been provided for i3WM.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream wiki].&lt;br /&gt;
&lt;br /&gt;
=== Firefox screensharing ===&lt;br /&gt;
&lt;br /&gt;
For some programs, additional configuration is needed to launch them natively under Wayland and to support special features such as screen sharing.&lt;br /&gt;
&lt;br /&gt;
To launch Firefox natively under Wayland and to enable support for screensharing, you need:&lt;br /&gt;
&lt;br /&gt;
* Install and configure [[PipeWire]]&lt;br /&gt;
* Install xdg-desktop-portal and xdg-desktop-portal-wlr package&lt;br /&gt;
* Install wofi for screen selection&lt;br /&gt;
* Launch pipewire on sway startup:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec /usr/libexec/pipewire-launcher&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* xdg-desktop-portal will start xdg-desktop-portal-wlr when needed, but needs a few environment variables. Add to the sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Export the following variables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export MOZ_ENABLE_WAYLAND=&amp;quot;1&amp;quot;&lt;br /&gt;
export XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
export QT_QPA_PLATFORM=&amp;quot;wayland-egl&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flatpaks ===&lt;br /&gt;
&lt;br /&gt;
Due to their sandboxing, flatpaks require the use of a portal frontend (xdg-desktop-portal) and backends (such as xdg-desktop-portal-wlr, xdg-desktop-gtk, xdg-desktop-portal-gnome) that implement the methods. When in doubt, install multiple backends. For more information on backends, see [https://github.com/flatpak/xdg-desktop-portal/#using-portals flatpak&#039;s page on the subject]. In addition to the steps under the &amp;quot;Firefox Screensharing&amp;quot; section, it may also be necessary to launch additional backends in your Sway config file. Otherwise, you may run into GDBus errors as your flatpak fails to interface with the portal. This can cause issues such as with opening your file directories from a flatpak application.&lt;br /&gt;
&lt;br /&gt;
After installing different backends, you might need to add the relevant backends to your sway config file similarly to in the &amp;quot;Firefox Screensharing&amp;quot; section above. For example, an autostart section of your sway config file may include:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gtk&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-wlr&lt;br /&gt;
exec /usr/libexec/xdg-desktop-portal-gnome&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is only needed if they are not started automatically via other means.&lt;br /&gt;
&lt;br /&gt;
=== Scaling for high resolution screens ===&lt;br /&gt;
&lt;br /&gt;
Without further configuration, program interfaces might be too small to use on high resolution screens.&lt;br /&gt;
&lt;br /&gt;
==== Via sway ====&lt;br /&gt;
&lt;br /&gt;
Sway supports the per-display configuration of&lt;br /&gt;
&lt;br /&gt;
* fractional (e.g., 1.5x), and&lt;br /&gt;
* integer scaling (e.g., 2x) &lt;br /&gt;
&lt;br /&gt;
However, fractional scaling is discouraged due to both the performance impact and the blurry output it produces. In this case, where 1x scaling is too small and 2x scaling is too large, program-specific GTK/QT based scaling is recommended.  See below.&lt;br /&gt;
&lt;br /&gt;
To enable Sway scaling, the user can first preview different scaling factors with &amp;lt;code&amp;gt;wdisplays&amp;lt;/code&amp;gt; package.  Note the output name (eDP-1, LVDS-1) and try apply scaling factors such as 1 and 2.  To make changes permanent, add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
output &amp;lt;name&amp;gt; scale &amp;lt;factor&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to ~/.config/sway/config.&lt;br /&gt;
&lt;br /&gt;
==== Via GTK/Qt ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# for GTK-based programs such as firefox and emacs:&lt;br /&gt;
export GDK_DPI_SCALE=2&lt;br /&gt;
&lt;br /&gt;
# for QT-based programs&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI=&amp;quot;physical&amp;quot;&lt;br /&gt;
# or if still too small, use a custom DPI&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI=192 # 2x scaling&lt;br /&gt;
export QT_QPA_PLATFORM=&amp;quot;wayland-egl&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Make clipboard content persistent ===&lt;br /&gt;
By default the clipboard content does not persist after terminating the program: you copy some text from Firefox and then exit Firefox, the copied text is also lost.&lt;br /&gt;
&lt;br /&gt;
Install clipman from test repo and add the following to sway config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec wl-paste --type text/plain --watch clipman store --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
bindsym $mod+h exec clipman pick --tool wofi --histpath=&amp;quot;~/.local/state/clipman-primary.json&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Firefox picture-in-picture mode/floating windows ===&lt;br /&gt;
Add this to your sway config file (modify the numeric values to suit your needs and your display):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for_window [app_id=&amp;quot;firefox&amp;quot; title=&amp;quot;^Picture-in-Picture$&amp;quot;] floating enable, move position 877 450, sticky enable, border none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Screenshots ===&lt;br /&gt;
A simple tool that works well under Wayland is Grimshot. Example keybindings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bindsym Print exec grimshot copy area&lt;br /&gt;
bindsym Shift+Print exec grimshot copy screen&lt;br /&gt;
bindsym Control+Print exec grimshot save area ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
bindsym Control+Shift+Print exec grimshot save screen ~/Pictures/$(date +%d-%m-%Y-%H-%M-%S).png&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway the sway wiki&#039;s article] for a list of screenshot tools.&lt;br /&gt;
&lt;br /&gt;
=== Start with NumLock enabled ===&lt;br /&gt;
Add this to your sway config file:&lt;br /&gt;
&amp;lt;code&amp;gt;input type:keyboard xkb_numlock enabled&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Change cursor theme and size ===&lt;br /&gt;
Add to your sway config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seat seat0 xcursor_theme my_cursor_theme my_cursor_size&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can inspect their values with &amp;lt;code&amp;gt;echo $XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;echo $XCURSOR_THEME&amp;lt;/code&amp;gt;. If reloading your config does not result in change, try logging out and in.&lt;br /&gt;
{{Note|Wayland uses client-side cursors. It is possible that applications do not evaluate the values of &amp;lt;code&amp;gt;$XCURSOR_SIZE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$XCURSOR_THEME&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
=== Start as a service ===&lt;br /&gt;
Although this is not necessary, you may write an init script like the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{/etc/init.d/sway|&lt;br /&gt;
#!/sbin/openrc-run&lt;br /&gt;
&lt;br /&gt;
description=&amp;quot;Sway Compositor&amp;quot;&lt;br /&gt;
&lt;br /&gt;
command=&amp;quot;/usr/bin/sway&amp;quot;&lt;br /&gt;
command_args=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
pidfile=&amp;quot;/run/sway.pid&amp;quot;&lt;br /&gt;
&lt;br /&gt;
start_stop_daemon_args=&amp;quot;--background --pidfile ${pidfile}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
depend() {&lt;br /&gt;
  need localmount&lt;br /&gt;
  after elogind&lt;br /&gt;
  use seatd dbus&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then as a root run &amp;lt;code&amp;gt;chmod +x /etc/init.d/seat&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rc-update add sway default&amp;lt;/code&amp;gt;. Make sure you have elogind installed or specify another service, like your display/login manager after which the sway service will run.&lt;br /&gt;
&lt;br /&gt;
=== Custom keyboard layout ===&lt;br /&gt;
&lt;br /&gt;
Since wayland does not support setxkbmap, you will also need to add similar content to your &#039;&#039;/usr/share/X11/xkb/rules/evdev.xml&#039;&#039;, after &amp;lt;code&amp;gt;&amp;lt;/modelList&amp;gt;&amp;lt;/code&amp;gt; and after &amp;lt;code&amp;gt;&amp;lt;layoutList&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;layout&amp;gt;&lt;br /&gt;
      &amp;lt;configItem&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;[the name of your layout, same as the name of the file in /usr/share/X11/xkb/symbols]&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;shortDescription&amp;gt;[usually just two letters]&amp;lt;/shortDescription&amp;gt;&lt;br /&gt;
        &amp;lt;description&amp;gt;[description of your layout]&amp;lt;/description&amp;gt;&lt;br /&gt;
        &amp;lt;countryList&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;US&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
          &amp;lt;iso3166Id&amp;gt;NO&amp;lt;/iso3166Id&amp;gt;&lt;br /&gt;
        &amp;lt;/countryList&amp;gt;&lt;br /&gt;
        &amp;lt;languageList&amp;gt;&lt;br /&gt;
          &amp;lt;iso639Id&amp;gt;eng&amp;lt;/iso639Id&amp;gt;&lt;br /&gt;
        &amp;lt;/languageList&amp;gt;&lt;br /&gt;
      &amp;lt;/configItem&amp;gt;&lt;br /&gt;
    &amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;!--[other layouts]--&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, to enable for all keyboards, navigate to the input section of &#039;&#039;~/.config/sway/config&#039;&#039; and modify it to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
input * {&lt;br /&gt;
  xkb_layout &amp;quot;my_layout&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have enabled &amp;lt;code&amp;gt;xkb_numlock&amp;lt;/code&amp;gt;, include this setting inside those braces as well.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
If you encounter any issues, try running &amp;lt;code&amp;gt;sway -Vc /etc/sway/config&amp;lt;/code&amp;gt;. It will run sway with the default config file and set the output to be more verbose. It is generally a good idea to track your config files with git (when and if at all you use a remote repository for them, keep it private for security reasons). &lt;br /&gt;
&lt;br /&gt;
=== Firefox (Flatpak) and/or GTK apps ===&lt;br /&gt;
==== Disappearing cursor ====&lt;br /&gt;
You may need to get an icon pack and possibly a theme from [https://www.pling.com/browse?cat=107&amp;amp;ord=latest Pling store] and set &amp;lt;code&amp;gt;GTK_THEME&amp;lt;/code&amp;gt; environmental variable. Alternatively you can install a theme      for all users (search [https://pkgs.alpinelinux.org/ Alpine Linux Packages] for &#039;&#039;*-icon-theme&#039;&#039;) using &amp;lt;code&amp;gt;apk add&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Missing file picker/cannot download ====&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;about:config&#039;&#039; and set &amp;lt;code&amp;gt;widget.use-xdg-desktop-portal.file-picker&amp;lt;/code&amp;gt; to 0.&lt;br /&gt;
&lt;br /&gt;
=== Failing to start under certain graphics cards/multiple wlroots stacked windows spawning upon start ===&lt;br /&gt;
As of Dec 31 2022, [https://developer.nvidia.com/docs/drive/drive-os/latest/linux/sdk/common/topics/window_system_stub/Gnome-WaylandDesktopShellSupport136.html Nvidia still doesn&#039;t fully support Wayland]. Therefore, the possible solutions are as outlined in the link, or setting your WLR_BACKENDS environmental variables to &amp;lt;code&amp;gt;drm,libinput&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;x11&amp;lt;/code&amp;gt; (add libinput here as well if you cannot use your mouse and keyboard after starting Sway). The latter also works for AMD/ATI cards (&#039;&#039;&#039;make sure to install libinput first&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
=== Sway socket not detected ===&lt;br /&gt;
&lt;br /&gt;
See [[Sway#Installation|Installation]] for instructions on how to set this environmental variable. This issue may occur with terminal multiplexers, such as [[Tmux terminal multiplexer|tmux]]&lt;br /&gt;
&lt;br /&gt;
=== Steam games launched via Proton crash before creating a window ===&lt;br /&gt;
&lt;br /&gt;
Instead of just using the in-Steam menu to install and select a Proton version, try installing the flatpak community build for Proton onto your system. There are several versions, depending on your desired stability, and the experimental version available in Flathub is called &amp;quot;com.valvesoftware.Steam.CompatibilityTool.Proton-Exp&amp;quot;. After you install your chosen version, go into Steam to specify compatibility tool for a game as usual. The installed community build will now be an option. Select that and try launching the game again.&lt;br /&gt;
[[Category:Desktop]]&lt;/div&gt;</summary>
		<author><name>Espindola</name></author>
	</entry>
</feed>