<?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=Faust</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=Faust"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Faust"/>
	<updated>2026-04-29T20:57:37Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Mako&amp;diff=30196</id>
		<title>Mako</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Mako&amp;diff=30196"/>
		<updated>2025-06-04T20:11:06Z</updated>

		<summary type="html">&lt;p&gt;Faust: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:mako}}&lt;br /&gt;
[https://github.com/emersion/mako mako] is a lightweight notification daemon for [[Wayland]].&lt;br /&gt;
&lt;br /&gt;
== Prerequisites == &lt;br /&gt;
&lt;br /&gt;
* Mako requires [[D-Bus]] service.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Install the {{pkg|mako}} package as per command: {{cmd|# apk add mako}}&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
To configure mako as [[OpenRC#User services|User service in OpenRC]], an executable file {{Path|~/.config/rc/init.d/mako}} has to be created with the following content {{Cat|~/.config/rc/init.d/mako|&amp;lt;nowiki&amp;gt;#!/sbin/openrc-run&lt;br /&gt;
&lt;br /&gt;
description=&amp;quot;org.freedesktop.Notifications&amp;quot;&lt;br /&gt;
&lt;br /&gt;
command=&amp;quot;/usr/bin/mako&amp;quot;&lt;br /&gt;
&lt;br /&gt;
supervisor=supervise-daemon&lt;br /&gt;
error_logger=&amp;quot;logger -t &#039;${RC_SVCNAME}&#039; -p daemon.error&amp;quot;&lt;br /&gt;
&lt;br /&gt;
depends() {&lt;br /&gt;
	use dbus&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Follow the steps outlined in [[OpenRC#User services|User service in OpenRC]], if not already done. Finally, add the service for mako as follows: {{Cmd|$ rc-update add --user mako gui}}&lt;br /&gt;
&lt;br /&gt;
The working of mako service can be tested by issuing the command {{ic|$ notify-send &amp;quot;Test for mako User service&amp;quot;}}. Install the {{pkg|libnotify}} package, if the command {{ic|notify-send}} is not available.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting == &lt;br /&gt;
&lt;br /&gt;
=== org.freedesktop.DBus.Error.NoReply ===&lt;br /&gt;
&lt;br /&gt;
{{ic|GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying}}&lt;br /&gt;
&lt;br /&gt;
To resolve the above error, if you are using &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt; wrapper to launch sway, set D-Bus variables by adding the following line to sway [[Sway#Sway config file|config]] file:&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
=== Failed to acquire service name ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Pre&amp;gt;daemon.err mako: Failed to acquire service name: File exists&lt;br /&gt;
daemon.err mako: Is a notification daemon already running?&amp;lt;/Pre&amp;gt;&lt;br /&gt;
{{Todo|The above message appears in {{Path|/var/log/messages}} randomly, but no cause is found yet. Please update here, if reason and resolution is found. Earlier attempts at naming the mako service executable file as {{ic|org.freedesktop.Notifications}} did not make any difference.}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [https://github.com/emersion/mako/wiki mako wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:System Administration]]&lt;/div&gt;</summary>
		<author><name>Faust</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Mako&amp;diff=30195</id>
		<title>Mako</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Mako&amp;diff=30195"/>
		<updated>2025-06-04T20:10:50Z</updated>

		<summary type="html">&lt;p&gt;Faust: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:mako}}&lt;br /&gt;
[https://github.com/emersion/mako mako] is a lightweight notification daemon for [[Wayland]].&lt;br /&gt;
&lt;br /&gt;
== Prerequisites == &lt;br /&gt;
&lt;br /&gt;
* Mako requires [[D-Bus]] service.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Install the {{pkg|mako}} package as per command: {{cmd|# apk add mako}}&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
To configure mako as [[OpenRC#User services|User service in OpenRC]], an executable file {{Path|~.config/rc/init.d/mako}} has to be created with the following content {{Cat|~/.config/rc/init.d/mako|&amp;lt;nowiki&amp;gt;#!/sbin/openrc-run&lt;br /&gt;
&lt;br /&gt;
description=&amp;quot;org.freedesktop.Notifications&amp;quot;&lt;br /&gt;
&lt;br /&gt;
command=&amp;quot;/usr/bin/mako&amp;quot;&lt;br /&gt;
&lt;br /&gt;
supervisor=supervise-daemon&lt;br /&gt;
error_logger=&amp;quot;logger -t &#039;${RC_SVCNAME}&#039; -p daemon.error&amp;quot;&lt;br /&gt;
&lt;br /&gt;
depends() {&lt;br /&gt;
	use dbus&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Follow the steps outlined in [[OpenRC#User services|User service in OpenRC]], if not already done. Finally, add the service for mako as follows: {{Cmd|$ rc-update add --user mako gui}}&lt;br /&gt;
&lt;br /&gt;
The working of mako service can be tested by issuing the command {{ic|$ notify-send &amp;quot;Test for mako User service&amp;quot;}}. Install the {{pkg|libnotify}} package, if the command {{ic|notify-send}} is not available.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting == &lt;br /&gt;
&lt;br /&gt;
=== org.freedesktop.DBus.Error.NoReply ===&lt;br /&gt;
&lt;br /&gt;
{{ic|GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying}}&lt;br /&gt;
&lt;br /&gt;
To resolve the above error, if you are using &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt; wrapper to launch sway, set D-Bus variables by adding the following line to sway [[Sway#Sway config file|config]] file:&lt;br /&gt;
 exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway&lt;br /&gt;
&lt;br /&gt;
=== Failed to acquire service name ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Pre&amp;gt;daemon.err mako: Failed to acquire service name: File exists&lt;br /&gt;
daemon.err mako: Is a notification daemon already running?&amp;lt;/Pre&amp;gt;&lt;br /&gt;
{{Todo|The above message appears in {{Path|/var/log/messages}} randomly, but no cause is found yet. Please update here, if reason and resolution is found. Earlier attempts at naming the mako service executable file as {{ic|org.freedesktop.Notifications}} did not make any difference.}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [https://github.com/emersion/mako/wiki mako wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:System Administration]]&lt;/div&gt;</summary>
		<author><name>Faust</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=MySQL&amp;diff=29234</id>
		<title>MySQL</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=MySQL&amp;diff=29234"/>
		<updated>2025-03-11T22:05:20Z</updated>

		<summary type="html">&lt;p&gt;Faust: rephrase and update GH stars&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;MySQL is the most popular relational database server in free software for two simple reasons (which are not the best technical reasons):&lt;br /&gt;
# It&#039;s simple and very easy to use&lt;br /&gt;
# It is very similar to SQLSERVER and is also used in other systems&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the world of Linux Alpine there is a software that provides it&#039;&#039;&#039;, it is [[MariaDB]], here we have a brief of info about compatibility and differences, but in short there&#039;s no great differences, if you have doubts check [[MySQL#MariaDB vs MySQL|MariaDB vs MySQL section here]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In the wiki there are two approaches for its use&#039;&#039;&#039;, the professional one (for servers and deploys) and the [[MariaDB|fast and simple]] usage (for developers and/or enthusiasts):&lt;br /&gt;
&lt;br /&gt;
= MariaDB - fast and simple use =&lt;br /&gt;
&lt;br /&gt;
{{:MariaDB}}&lt;br /&gt;
&lt;br /&gt;
= MySQL (MariaDB) - Production usage =&lt;br /&gt;
&lt;br /&gt;
[https://mariadb.org/ MariaDB] is a community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL. It is notable for being led by the original developers of MySQL, who forked it due to concerns over its acquisition by Oracle.&lt;br /&gt;
&lt;br /&gt;
This page assumed that you have a general knowledge about MariaDB, so if you are new to MySQL first take a look at the [[MariaDB|MariaDB wiki page]] for information about how are packaged for alpine linux.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Alpine Linux has dummy counterparts packages for those that are not close to that change from &#039;&#039;mysql&#039;&#039; to &#039;&#039;mariadb&#039;&#039; naming packages, please check the [[MariaDB|MariaDB wiki page]] for more information.&lt;br /&gt;
&lt;br /&gt;
Take in consideration that the user &amp;lt;code&amp;gt;mysql&amp;lt;/code&amp;gt; was created during instalation of packages, in the initialization section two users will be created in database init: &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mysql&amp;lt;/code&amp;gt;, and in that point only if are in their respective system accounts, will be able to connect to the database service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
apk add mysql mysql-client&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That will install the most used ones.. &amp;lt;code&amp;gt;mariadb-cient&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mariadb-server&amp;lt;/code&amp;gt;, rest of packages are brief described here for more information, here are listed in orden of relevance for production server&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! MySQL name package !! Since Alpine: !! Brief usage !! Related package&lt;br /&gt;
|-&lt;br /&gt;
| mysql || v2 || it&#039;s a dummy package to easy install of mariadb || mariadb&lt;br /&gt;
|-&lt;br /&gt;
| mysql-client || v2 || it&#039;s a dummy package to easy install of commands tools || mariadb-client&lt;br /&gt;
|-&lt;br /&gt;
| mariadb || v2 || server equivalent to mysql-server || mariadb-common&lt;br /&gt;
|-&lt;br /&gt;
| mariadb-client || v2 || connection command line and tools || mariadb-common&lt;br /&gt;
|-&lt;br /&gt;
| mariadb-doc || v3.0 || manpages are there! || man man-pages&lt;br /&gt;
|-&lt;br /&gt;
| mariadb-connector-odbc || edge || coding or making OS level connections, to any DB without libs install || .&lt;br /&gt;
|-&lt;br /&gt;
| mariadb-connector-c || v3.8 || coding connection on C sources || mariadb-connector-c-dev&lt;br /&gt;
|-&lt;br /&gt;
| mariadb-backup || v3.8 || to external backup devices, not widely used, in past was inside mariadb package || .&lt;br /&gt;
|-&lt;br /&gt;
| mariadb-server-utils || v3.8 || server commands not widely used, in past was inside mariadb package || .&lt;br /&gt;
|-&lt;br /&gt;
| mariadb-dev || v3.1 || Need for compilations depends on source code || .&lt;br /&gt;
|-&lt;br /&gt;
| mariadb-test || v3.3 || testing suite from MariaDB tools || .&lt;br /&gt;
|-&lt;br /&gt;
| mariadb-mytop || v3.9 || data performance monitoring || .&lt;br /&gt;
|-&lt;br /&gt;
| mariadb-plugin-rocksdb || v3.9 || plain key-value event relational for data || .&lt;br /&gt;
|-&lt;br /&gt;
| mariadb-static || v3.8 || static libs for static non depends linking in builds || .&lt;br /&gt;
|-&lt;br /&gt;
| mariadb-embedded || v3.9 || the libmysqld identical interface as the C client || mariadb-embedded-dev&lt;br /&gt;
|-&lt;br /&gt;
| mariadb-embedded-dev || v3.9 ||  use the normal mysql.h and link with libmysqld instead of libmysqlclient || mariadb-dev&lt;br /&gt;
|-&lt;br /&gt;
| mariadb-openrc || v3.8 || separate scripts, in past was embebed on server package || .&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
&lt;br /&gt;
The alpine package of MySQL/MariaDB are like normal tarball of MySQL one, admins must be know what they want.. there&#039;s no automatic window-like here.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;datadir&#039;&#039; are located to &amp;lt;code&amp;gt;/var/lib/mysql&amp;lt;/code&amp;gt; must be owned by the mysql user and group. You can modify this behavior but must edit the service file at &amp;lt;code&amp;gt;/etc/init.d&amp;lt;/code&amp;gt; directory. Also, you need to set &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;datadir=&amp;lt;YOUR_DATADIR&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; under section &amp;lt;code&amp;gt;[mysqld]&amp;lt;/code&amp;gt; at the config file.&lt;br /&gt;
&lt;br /&gt;
# Initialize the main mysql database, and the data dir as standardized to &amp;lt;code&amp;gt;/var/lib/mysql&amp;lt;/code&amp;gt; by the rc script&lt;br /&gt;
# Then initialize the service, root account and socket connection are enabled without password at this point&lt;br /&gt;
# Setup the root account by asignes a proper password, this are purely paranoid. due next step already do that!&lt;br /&gt;
# Setup and init the installation by running the &amp;lt;code&amp;gt;mysql_secure_installation&amp;lt;/code&amp;gt;&lt;br /&gt;
# Setup permissions for manage others users and databases&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
mysql_install_db --user=mysql --datadir=/var/lib/mysql&lt;br /&gt;
&lt;br /&gt;
rc-service mariadb start&lt;br /&gt;
&lt;br /&gt;
mysqladmin -u root password toor&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, all are initializated to proceed with configuration, now can be done using the &amp;lt;code&amp;gt;&lt;br /&gt;
mysql_secure_installation&amp;lt;/code&amp;gt; script at the next section:&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
In order to finish setup into &#039;&#039;&#039;MariaDB&#039;&#039;&#039; now provide &#039;&#039;&#039;this script called &amp;lt;code&amp;gt;mysql_secure_instalation&amp;lt;/code&amp;gt; that also are present as &amp;lt;code&amp;gt;mariadb-secure-installation&amp;lt;/code&amp;gt;&#039;&#039;&#039;, too. This script provides minimal and security setup to the database, and here are the questions made explained:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Enter current password for root (enter for none):&#039;&#039;&#039; this are if you previously setup as we done in previous section a root password, just provide it and press enter, &#039;&#039;&#039;must be provided due we already set previously&#039;&#039;&#039; and from now, this sript will access to the engine and alter many setting on the database. Correct respond are &amp;lt;code&amp;gt;OK, successfully used password, moving on...&amp;lt;/code&amp;gt;&lt;br /&gt;
#  &#039;&#039;&#039;Switch to unix_socket authentication [Y/n]&#039;&#039;&#039; Setting the root password or using the unix_socket ensures that only admins can log into engine database. Since mysql 5.6 and mariadb 10.2 a new auth mechanish are set, by socket authentiaction, when system user are same as mysql/mariadb user, in this case, no password are need. In production servers this are not the case and must be disabled, &#039;&#039;&#039;so answer NO&#039;&#039;&#039;, and response will be &amp;lt;code&amp;gt;... skipping.&amp;lt;/code&amp;gt;&lt;br /&gt;
# &#039;&#039;&#039;Change the root password? [Y/n]&#039;&#039;&#039; this answer are here only if the first one are just enter, or if can provide a better passowrd if no unix socket are set. Just press &amp;quot;n&amp;quot; only if you provided a good password, otherwise just &lt;br /&gt;
# &#039;&#039;&#039;Remove anonymous users? [Y/n]&#039;&#039;&#039; this permits remove the anonymous user created to log using socket authentication, only working on unix-like system. In any case, &#039;&#039;&#039;production system must remove it, so answer Y&#039;&#039;&#039; and proper respond must be  &amp;lt;code&amp;gt;... Success!&amp;lt;/code&amp;gt;.&lt;br /&gt;
# &#039;&#039;&#039;Disallow root login remotely? [Y/n]&#039;&#039;&#039; Normally, root should only be allowed to connect from &#039;localhost&#039;. This ensures that someone cannot guess at the root password from the network. For sure answer Y&#039;&#039;&#039; and proper respond must be  &amp;lt;code&amp;gt;... Success!&amp;lt;/code&amp;gt;.&lt;br /&gt;
# &#039;&#039;&#039;Remove test database and access to it? [Y/n]&#039;&#039;&#039; By default, MariaDB comes with a database named &#039;test&#039; that anyone can access. This is also intended only for testing, and should be removed, so answer Y&#039;&#039;&#039; and proper respond must be  &amp;lt;code&amp;gt;... Success!&amp;lt;/code&amp;gt;.&lt;br /&gt;
# &#039;&#039;&#039;Reload privilege tables now? [Y/n]&#039;&#039;&#039; Reloading the privilege tables will ensure that all changes made so far will take effect immediately, so answer Y&#039;&#039;&#039; and proper respond must be  &amp;lt;code&amp;gt;... Success!&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
After reponse all the questions.. restart the service with &amp;lt;code&amp;gt;rc-service mariadb restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuration files ===&lt;br /&gt;
&lt;br /&gt;
Due today were influenced by systemd standardization, the famous &amp;lt;nowiki&amp;gt;my.cnf&amp;lt;/nowiki&amp;gt; are not more the main config file for the server engine. Now only few variables are defined there and all the settings are provided by independent files into the &amp;lt;code&amp;gt;/etc/my.cnf.d/&amp;lt;/code&amp;gt; directory, user own config files are under &amp;lt;code&amp;gt;~/.my.cnf&amp;lt;/code&amp;gt; config file of each home dir, and are read after global ones; so then we have:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Config file !! Path and name !! Versions of Alpine !! Contents to configure&lt;br /&gt;
|-&lt;br /&gt;
| my.cnf || &amp;lt;nowiki&amp;gt;/etc/mysql/my.cnf&amp;lt;/nowiki&amp;gt; || v2 to v3.8 || All the directives, Global config file&lt;br /&gt;
|-&lt;br /&gt;
| mariadb-server.cnf || /etc/my.cnf.d/mariadb-server.cnf || since 3.9 || First Global config file, main directives&lt;br /&gt;
|-&lt;br /&gt;
| .my.cnf || &amp;lt;nowiki&amp;gt;$HOME&amp;lt;/nowiki&amp;gt; || all || user name only config directives&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Production settings ===&lt;br /&gt;
&lt;br /&gt;
These setting are only recommended for some server settings, there are the recommendation for high production settings:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Config setting !! Default !! Recommended !! Explanation&lt;br /&gt;
|-&lt;br /&gt;
| main ram || 2G || 8G - 16G || MariaDB/MySQL can run with 512M or 1G of ram, high production must use minimun of 4G or more.&lt;br /&gt;
|-&lt;br /&gt;
| data dir disk type || any || SSD || MariaDB/MySQL must run with faster SSD if high request will be produced.&lt;br /&gt;
|-&lt;br /&gt;
| collation_server || utf8_unicode_ci || utf8mb4_unicode_ci || With 8mb4 some characters are able to use more than a single byte.&lt;br /&gt;
|-&lt;br /&gt;
| character_set_client || iso8859-1 || utf8 or utf8mb4 || Important due are standard, for left to right use 8mb4 flavor&lt;br /&gt;
|-&lt;br /&gt;
| max_connections || 151 || 100 || total_connections = total_processes * (total_threads + script_servers + 1)&lt;br /&gt;
|-&lt;br /&gt;
| max_heap_table_size || 16M || 32M || allocate more memory to memory tables, for memory storage engines&lt;br /&gt;
|-&lt;br /&gt;
| tmp_table_size || 16M || 32M || It allows the sub queries to remain more in memory, making them faster&lt;br /&gt;
|-&lt;br /&gt;
| join_buffer_size || 32M || 64M || It allows the join queries to remain more in memory rather in temp files&lt;br /&gt;
|-&lt;br /&gt;
| innodb_file_format || unset || Barracuda || will allow longer indexes for important most used tables&lt;br /&gt;
|-&lt;br /&gt;
| innodb_large_prefix || unset || 1 || Must set if Barracuda file format are choosen&lt;br /&gt;
|-&lt;br /&gt;
| innodb_buffer_pool_size || 128M || 456M || hold as much tables and indexes in system memory as is possible&lt;br /&gt;
|-&lt;br /&gt;
| innodb_read_io_threads || 16 || 32 || On high I/O systems, a value greater than 1 may allow the disk I/O to be more sequential&lt;br /&gt;
|-&lt;br /&gt;
| innodb_write_io_threads || 16 || 32 || Only if you have SSD storage for the data MySQL/MariaDB database and temp files&lt;br /&gt;
|-&lt;br /&gt;
| innodb_buffer_pool_instances || 1 || 2 or 4 || Only for older MySQL/MariaDB engines,&lt;br /&gt;
|-&lt;br /&gt;
| innodb_io_capacity || 200 || 1200 - 2600 || Only if you have SSD storage for the data MySQL/MariaDB database and temp files&lt;br /&gt;
|-&lt;br /&gt;
| innodb_io_capacity_max || 200 || 2400 - 5200 || Only if you have SSD storage for the data MySQL/MariaDB database and temp files&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you have SSD disks, use the recommended suggestion, otherwise, use minimum suggested. If you have physical hard drives, use 2000 * the number of active drives in the array. If using NVMe or PCIe Flash, much larger numbers as high as 200000 can be used, but those lasted storage devices will be a short life of course.&lt;br /&gt;
&lt;br /&gt;
Newer system Alpine packages can set in independent files in any case those commands always works and where are not apply just will ignore the output:&lt;br /&gt;
&lt;br /&gt;
* On older Alpine system must set config files for MAX ALLOWED PACKETS to minimun proper amount:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sed -i &amp;quot;s|.*max_allowed_packet\s*=.*|max_allowed_packet = 100M|g&amp;quot; /etc/mysql/my.cnf&lt;br /&gt;
sed -i &amp;quot;s|.*max_allowed_packet\s*=.*|max_allowed_packet = 100M|g&amp;quot; /etc/my.cnf.d/mariadb-server.cnf&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Only allow local connections on cases where there&#039;s only one server or no expected to connect from others:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sed -i &amp;quot;s|.*bind-address\s*=.*|bind-address=127.0.0.1|g&amp;quot; /etc/mysql/my.cnf&lt;br /&gt;
sed -i &amp;quot;s|.*bind-address\s*=.*|bind-address=127.0.0.1|g&amp;quot; /etc/my.cnf.d/mariadb-server.cnf&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If are not in domain controller, dont search for hostnames to improve performance responses (ideal for local only servers):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sed -i &amp;quot;s|.*skip-networking.*|skip-networking|g&amp;quot; /etc/mysql/my.cnf&lt;br /&gt;
sed -i &amp;quot;s|.*skip-networking.*|skip-networking|g&amp;quot; /etc/my.cnf.d/mariadb-server.cnf&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Set default charset to UTF8MB4, in newer versions (since Alpine v3.9), just added a new file to added thus customization, but older versions (below Alpine v3.8)of the package does not have a charset section, so you must added manually to the main configuration in each respective section:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cat &amp;gt; /etc/my.cnf.d/mariadb-server-default-charset.cnf &amp;lt;&amp;lt; EOF&lt;br /&gt;
[client]&lt;br /&gt;
default-character-set = utf8mb4&lt;br /&gt;
&lt;br /&gt;
[mysqld]&lt;br /&gt;
collation_server = utf8mb4_unicode_ci&lt;br /&gt;
character_set_server = utf8mb4&lt;br /&gt;
&lt;br /&gt;
[mysql]&lt;br /&gt;
default-character-set = utf8mb4&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Updating or comming from upgrading ==&lt;br /&gt;
&lt;br /&gt;
Mayor Upgrades beetween Alpine linux version are so easy as change the repository version, but the MySQL/MariaDB  engine need some extra steps when this are performed:&lt;br /&gt;
&lt;br /&gt;
Upgrade databases on major releases&lt;br /&gt;
Upon a major version release of mariadb (for example mariadb-10.1.10-1 to mariadb-10.1.18-1), it is wise to upgrade databases:&lt;br /&gt;
&lt;br /&gt;
# keep the old database (mysql sheme) structure of the engine daemon, currently this are not more the case, today this not make sense anymore&lt;br /&gt;
# upgrade the MariaDB/MySQL packages, of course with must be done if the upgrade process to mayor alpine version does not!&lt;br /&gt;
# run the &amp;lt;code&amp;gt;mysql_upgrade -u root -p&amp;lt;/code&amp;gt; script, providing the password or root, (from the new package version) against the old still-running database (mysql sheme). This will produce some error messages; however, the upgrade will succeed.&lt;br /&gt;
# Restart the service&lt;br /&gt;
&lt;br /&gt;
If are unable to run &#039;&#039;mysql_upgrade&#039;&#039; because MySQL cannot start try run MySQL in safemode with &amp;lt;code&amp;gt;mysqld_safe --datadir=/var/lib/mysql/&amp;lt;/code&amp;gt; command and then run the &amp;lt;code&amp;gt;mysql_upgrade -u root -p&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
= Relevant important notes =&lt;br /&gt;
&lt;br /&gt;
== File system notes about the databases managed ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Btrfs Notes&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If the database (in &amp;lt;code&amp;gt;/var/lib/mysql&amp;lt;/code&amp;gt;) resides on a [[Btrfs|btrfs]] file system, you should consider disabling &#039;&#039;&#039;Copy-on-Write&#039;&#039;&#039; for the directory before creating any database (schemes), after initialization you can enabled again. But .. on every database creation (scheme creation), you must disabled again, to avoid corrupted data.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ZFS Bock sizes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
ZFS, unlike most other file systems, has a variable record size, or what is commonly referred to as a block size. By default, the recordsize on ZFS is 128KiB, which means it will dynamically allocate blocks of any size from 512B to 128KiB depending on the size of file being written. Most RDBMSes work in 8KiB-sized blocks by default. Although the block size is tunable for MySQL/MariaDB use an 8KiB block size by default.&lt;br /&gt;
&lt;br /&gt;
It is usually desirable to tune ZFS instead to accommodate the databases, using a command such as &amp;lt;code&amp;gt;zfs set recordsize=8K /var/lib/mysql&amp;lt;/code&amp;gt; (or change /var/lib/mysql to the mount point where /var/lib/mysql resides) and in the interest of saving memory, it is best to simply disable ZFS&#039;s caching of the database&#039;s file data and let the database do its own job  with &amp;lt;code&amp;gt;zfs set primarycache=metadata /var/lib/mysql&amp;lt;/code&amp;gt; (or change /var/lib/mysql to the mount point where /var/lib/mysql resides).&lt;br /&gt;
&lt;br /&gt;
But beware, these kinds of tuning parameters are only if RDBMSes are setup in dedicated partitions, if your root and of course database are all in one partition, dont do that. Separate ones.&lt;br /&gt;
&lt;br /&gt;
== Restore root password ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
rc-service mysql stop&lt;br /&gt;
&lt;br /&gt;
kill  `cat /run/mysqld/mysqld.pid`&lt;br /&gt;
&lt;br /&gt;
/usr/bin/mysqld --datadir=/var/lib/mysql --pid-file=/run/mysqld/mysqld.pid --skip-grant-tables --skip-networking &amp;amp;&lt;br /&gt;
&lt;br /&gt;
mysql -e &amp;quot;ALTER USER &#039;root&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;MyNewPass&#039;;FLUSH PRIVILEGES;ALTER USER &#039;root&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;MyNewPass&#039;;FLUSH PRIVILEGES;set password = password(&#039;MyNewPass&#039;);&amp;quot;&lt;br /&gt;
&lt;br /&gt;
kill  `cat /run/mysqld/mysqld.pid`&lt;br /&gt;
&lt;br /&gt;
rc-service mariadb restart&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* [[MariaDB|MariaDB wiki page]]&lt;br /&gt;
* [[Production LAMP system: Lighttpd + PHP + MySQL]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Newbie]]&lt;br /&gt;
[[Category:Server]]&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Security]]&lt;br /&gt;
[[Category:Production]]&lt;br /&gt;
&lt;br /&gt;
= MariaDB vs MySQL =&lt;br /&gt;
&lt;br /&gt;
It is more a matter of compatibility than of performance and characteristics (with the arrival of MySQL v8) .. and it depends on whether there is a purely business and support approach &amp;quot;zero concern&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
MySQL, being from Oracle, establishes limits if a license is not purchased, MariaDB has a large connection pool, more than 200,000 connections, while MySQL has a smaller connection pool if it is not licensed.&lt;br /&gt;
&lt;br /&gt;
However, MariaDB does not support data masking and dynamic column while MySQL supports it, also MariaDB although it has 12 new storage engines while MySQL has less these are very new and MySQL&#039;s are widely known and tested.&lt;br /&gt;
&lt;br /&gt;
In terms of performance, MariaDB is only a little faster than MySQL, this is because MySQL implements more business features, but this is only noticeable using these many features.&lt;br /&gt;
&lt;br /&gt;
Which is more optimal this is not clear .. in general MySQL should be less, and MariaDB faster, there is a third option which is Percona which is the same MySQL service but with special aggressive optimization patches for servers. Percona mysql code must be compiled in Alpine linux.&lt;br /&gt;
&lt;br /&gt;
== Comparison table ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Characteristic !! MariaDB !! MySQL&lt;br /&gt;
|-&lt;br /&gt;
| Storage Engines || up to 12 but many in development stage || less but well tested&lt;br /&gt;
|-&lt;br /&gt;
| Performance || just a little faster || less, there is almost no difference&lt;br /&gt;
|-&lt;br /&gt;
| Initial version  || 2009 (5.3) || 1995 (3.0)&lt;br /&gt;
|-&lt;br /&gt;
| Data masking || no || yes&lt;br /&gt;
|-&lt;br /&gt;
| dynamic columns || no || yes&lt;br /&gt;
|-&lt;br /&gt;
| Monitoring || SQLyog || MySQLworkbench&lt;br /&gt;
|-&lt;br /&gt;
| Routing || MariaDB MaxScale || Mysql Router&lt;br /&gt;
|-&lt;br /&gt;
| Analytics || MariaDB ColumnStore || not have&lt;br /&gt;
|-&lt;br /&gt;
| Git starred times (github)|| [https://github.com/MariaDB/server around 5.9k] || [https://github.com/mysql/mysql-server around 11.2k]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For more info check a review here: http://qgqlochekone.blogspot.com/2020/04/mariadb-mysql-and-mysqlworkbench.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Newbie]]&lt;br /&gt;
[[Category:Server]]&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Faust</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Include:Setup_your_system_and_account_for_building_packages&amp;diff=25357</id>
		<title>Include:Setup your system and account for building packages</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Include:Setup_your_system_and_account_for_building_packages&amp;diff=25357"/>
		<updated>2023-09-29T11:08:24Z</updated>

		<summary type="html">&lt;p&gt;Faust: Explain how to share abuild signing keys between computers.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The {{Pkg|alpine-sdk}} is a metapackage that pulls in the most essential packages used to build new packages. Also install and configure a way to elevate privileges, such as sudo or doas, and an editor, such as vi, nano, micro.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# apk add alpine-sdk}}&lt;br /&gt;
&lt;br /&gt;
This would be a good time to [[Setting_up_a_new_user|create a normal user account for you to work in]]. To make life easier later, it&#039;s a good idea to add this user to the wheel group; operations that require superuser privileges can now be done with sudo or doas.&lt;br /&gt;
&lt;br /&gt;
The [[Aports_tree|aports tree]] is in git so before we clone it, let&#039;s configure git.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ git config --global user.name &amp;quot;Your Full Name&amp;quot;&lt;br /&gt;
$ git config --global user.email &amp;quot;your@email.address&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
Read carefully [[Development using git]] to grasp basic Git operations and how to configure for sending email patches.&lt;br /&gt;
&lt;br /&gt;
Now we can clone the [[Aports_tree|aports tree]]. &lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ git clone https://gitlab.alpinelinux.org/alpine/aports}}&lt;br /&gt;
&lt;br /&gt;
Before we start creating or modifying [[APKBUILD_Reference|APKBUILD]] files, we need to setup abuild for our system and user. Edit the file {{Path|/etc/abuild.conf}} to your requirements.&lt;br /&gt;
&lt;br /&gt;
Most of the defaults can be left alone, unless you are developing for a custom platform, in which case the comments in the file should guide you. The one field to edit is PACKAGER, so that you can get credit (or blame) for packages you create.&lt;br /&gt;
&lt;br /&gt;
To use &#039;abuild -r&#039; command to install dependency packages automatically.&lt;br /&gt;
{{Cmd|# addgroup &amp;lt;yourusername&amp;gt; abuild}}&lt;br /&gt;
&lt;br /&gt;
We also need to prepare the location where the build process caches files when they are downloaded. By default this is {{Path|/var/cache/distfiles/}}. To create this directory and ensure that it is writeable, enter the following commands:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# mkdir -p /var/cache/distfiles}}&lt;br /&gt;
{{Cmd|# chmod a+w /var/cache/distfiles}}&lt;br /&gt;
&lt;br /&gt;
As an alternative to the second command, you can add yourself to the abuild group:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# chgrp abuild /var/cache/distfiles}}&lt;br /&gt;
{{Cmd|# chmod g+w /var/cache/distfiles}}&lt;br /&gt;
&lt;br /&gt;
{{Note|Remember to logout and login again for the group change to have effect.}}&lt;br /&gt;
&lt;br /&gt;
The last step is to configure the security keys with the [[Abuild-keygen|abuild-keygen]] script for [[Abuild|abuild]] with the command:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# abuild-keygen -a -i}}&lt;br /&gt;
&lt;br /&gt;
If you want to share the generated keys between multiple computers ({{Path|~/.abuild}}), you will have to manually copy the generated public key into {{Path|/etc/apk/keys}} for the signing process of generated packages to work, example:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# cp /home/user/.abuild/user@domain.tld-12345abc.rsa.pub /etc/apk/keys}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Faust</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Flatpak&amp;diff=25258</id>
		<title>Flatpak</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Flatpak&amp;diff=25258"/>
		<updated>2023-09-22T08:54:46Z</updated>

		<summary type="html">&lt;p&gt;Faust: /* Troubleshooting */ add documentation for sandbox override&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Draft|More documentation and testing is needed, but everything currently here should be safe to follow.}}&lt;br /&gt;
&lt;br /&gt;
Flatpak is a technology for building and distributing applications with the goal of having a universal package format for all Linux distributons, it is similar to [https://en.wikipedia.org/wiki/Snap_(software) Snap], &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setup / Installation ==&lt;br /&gt;
&lt;br /&gt;
=== Runtime dependencies ===&lt;br /&gt;
&lt;br /&gt;
* {{Pkg|dbus}}&lt;br /&gt;
* {{Pkg|xdg-desktop-portal}}&lt;br /&gt;
* an implementation of &amp;lt;code&amp;gt;xdg-desktop-portal&amp;lt;/code&amp;gt;, e.g. {{Pkg|xdg-desktop-portal-gtk}}&lt;br /&gt;
&lt;br /&gt;
{{Note|If you are running a window manager from {{Path|.xinitrc}}, make sure you are running a &amp;lt;code&amp;gt;dbus&amp;lt;/code&amp;gt; session explicitly, i.e.:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# exec dbus-launch --exit-with-session your_favourite_wm}}}}&lt;br /&gt;
&lt;br /&gt;
=== Installing Flatpak Itself ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;From: https://flatpak.org/setup/Alpine/&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{Note|To install Flatpak you will need to enable the  Community repository, See: [[Repositories#Managing_repositories|Repositories - Managing repositories]]}}&lt;br /&gt;
&lt;br /&gt;
To install Flatpak run:&lt;br /&gt;
&lt;br /&gt;
{{cmd|# apk add {{Pkg|flatpak}}}}&lt;br /&gt;
&lt;br /&gt;
Next you need to add a repository, for this guide we will use the recommended repository, [https://flathub.org Flathub].&lt;br /&gt;
&lt;br /&gt;
{{cmd|$ flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo}}&lt;br /&gt;
&lt;br /&gt;
Now reboot to complete setup&lt;br /&gt;
&lt;br /&gt;
{{Note|graphical installation of Flatpak apps may not be possible with Alpine.}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
To get all of the available options to use with the &#039;&#039;&#039;flatpak&#039;&#039;&#039; command run: &#039;&#039;&#039;flatpak --help&#039;&#039;&#039; or &#039;&#039;&#039;flatpak -h&#039;&#039;&#039;,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Search ===&lt;br /&gt;
&lt;br /&gt;
To search for applications run &#039;&#039;&#039;flatpak search &amp;lt;appplicationname&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Example:&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; flatpak search chromium&lt;br /&gt;
&lt;br /&gt;
Name                   Description                                                        Application ID                        Version       Branch  Remotes&lt;br /&gt;
Chromium Web Browser   The web browser from Chromium project                              org.chromium.Chromium                 96.0.4664.93  stable  flathub&lt;br /&gt;
Chromium B.S.U.        Fast paced, arcade-style, top-scrolling space shooter              net.sourceforge.chromium-bsu          0.9.16.1      stable  flathub&lt;br /&gt;
ungoogled-chromium     A lightweight approach to removing Google web service dependency   com.github.Eloston.UngoogledChromium  96.0.4664.45  stable  flathub&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install ===&lt;br /&gt;
&lt;br /&gt;
To install a package run &#039;&#039;&#039;flatpak install &amp;lt;applicationname&amp;gt;&#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; flatpak install com.github.Eloston.UngoogledChromium&lt;br /&gt;
&lt;br /&gt;
Looking for matches…&lt;br /&gt;
&lt;br /&gt;
com.github.Eloston.UngoogledChromium permissions:&lt;br /&gt;
    ipc             network                 cups                   pulseaudio               wayland                       x11&lt;br /&gt;
    devices         file access [1]         dbus access [2]        bus ownership [3]        system dbus access [4]&lt;br /&gt;
&lt;br /&gt;
    [1] /run/.heim_org.h5l.kcm-socket, home, xdg-run/pipewire-0&lt;br /&gt;
    [2] org.freedesktop.FileManager1, org.freedesktop.Notifications, org.freedesktop.secrets, org.gnome.SessionManager&lt;br /&gt;
    [3] org.mpris.MediaPlayer2.chromium.*&lt;br /&gt;
    [4] org.freedesktop.Avahi, org.freedesktop.UPower&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        ID                                                      Branch             Op            Remote             Download&lt;br /&gt;
 1.     com.github.Eloston.UngoogledChromium.Codecs             stable             i             flathub              &amp;lt; 1.1 MB&lt;br /&gt;
 2.     com.github.Eloston.UngoogledChromium.Locale             stable             i             flathub            &amp;lt; 112.8 kB&lt;br /&gt;
 3.     com.github.Eloston.UngoogledChromium                    stable             i             flathub            &amp;lt; 119.0 MB&lt;br /&gt;
&lt;br /&gt;
Proceed with these changes to the system installation? [Y/n]:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or if you dont know or dont want to type the exact package name:&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; flatpak install chromium&lt;br /&gt;
&lt;br /&gt;
Looking for matches…&lt;br /&gt;
Similar refs found for ‘chromium’ in remote ‘flathub’ (system):&lt;br /&gt;
&lt;br /&gt;
   1) app/net.sourceforge.chromium-bsu/x86_64/stable&lt;br /&gt;
   2) runtime/com.github.Eloston.UngoogledChromium.Codecs/x86_64/stable&lt;br /&gt;
   3) runtime/org.chromium.Chromium.Codecs/x86_64/stable&lt;br /&gt;
   4) app/org.chromium.Chromium/x86_64/stable&lt;br /&gt;
   5) app/com.github.Eloston.UngoogledChromium/x86_64/stable&lt;br /&gt;
&lt;br /&gt;
Which do you want to use (0 to abort)? [0-5]:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove ===&lt;br /&gt;
&lt;br /&gt;
To remove a package run: &#039;&#039;&#039;flatpak remove &amp;lt;applicationname&amp;gt;&#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; flatpak remove com.github.Eloston.UngoogledChromium&lt;br /&gt;
&lt;br /&gt;
        ID                                                     Branch           Op&lt;br /&gt;
 1.     com.github.Eloston.UngoogledChromium                   stable           r&lt;br /&gt;
 2.     com.github.Eloston.UngoogledChromium.Codecs            stable           r&lt;br /&gt;
 3.     com.github.Eloston.UngoogledChromium.Locale            stable           r&lt;br /&gt;
&lt;br /&gt;
Proceed with these changes to the system installation? [Y/n]:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
or if you dont know or dont want to type the exact package name:&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; flatpak remove chromium&lt;br /&gt;
&lt;br /&gt;
Similar installed refs found for ‘chromium’:&lt;br /&gt;
&lt;br /&gt;
   1) app/com.github.Eloston.UngoogledChromium/x86_64/stable (system)&lt;br /&gt;
   2) runtime/com.github.Eloston.UngoogledChromium.Codecs/x86_64/stable (system)&lt;br /&gt;
   3) All of the above&lt;br /&gt;
&lt;br /&gt;
Which do you want to use (0 to abort)? [0-3]:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Developers ==&lt;br /&gt;
&lt;br /&gt;
* [https://docs.flatpak.org/en/latest/available-runtimes.html Flatpak - available runtimes]&lt;br /&gt;
&lt;br /&gt;
These are all hosted on [https://flathub.org/ Flathub.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Permission errors ===&lt;br /&gt;
&lt;br /&gt;
If you receive errors about permissions then you may need to add your user to the &#039;&#039;&#039;flatpak&#039;&#039;&#039; group.&lt;br /&gt;
&lt;br /&gt;
{{Note|You need to log out and log back in or reboot for the group change(s) to take effect}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Fixing audio issues ===&lt;br /&gt;
&lt;br /&gt;
If you have a minimal setup and don&#039;t have access to audio devices you will need to set the XDG_RUNTIME_DIR variable. Save the following script in {{Path|/etc/profile.d/xdg_runtime_dir.sh}} and re-login to have it set up properly.&lt;br /&gt;
&lt;br /&gt;
 if test -z &amp;quot;${XDG_RUNTIME_DIR}&amp;quot;; then&lt;br /&gt;
   export XDG_RUNTIME_DIR=/tmp/$(id -u)&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
When you launch a Flatpak you will need to start pulseaudio as well:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ pulseaudio --start &amp;amp;&amp;amp; flatpak run com.example.Example}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Unable to upload files ===&lt;br /&gt;
&lt;br /&gt;
If you are unable to upload files from the host, this maybe due to [https://docs.flatpak.org/en/latest/sandbox-permissions.html Flatpak sanbox] and you may have to manually add the authorization.&lt;br /&gt;
&lt;br /&gt;
This can be done with the following commands:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;$ flatpak override ApplicationID --filesystem=/home/user/Downloads&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Where &#039;&#039;ApplicationID&#039;&#039; is given by:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ flatpak list}}&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;$ flatpak override org.signal.Signal --filesystem=/home/user/Downloads&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [https://flatpak.org/ Flatpak]&lt;br /&gt;
* [https://flathub.org/ Flathub]&lt;br /&gt;
* [https://winepak.github.io/ Winepak]&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]]&lt;br /&gt;
[[Category: Desktop]]&lt;/div&gt;</summary>
		<author><name>Faust</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=KVM&amp;diff=24412</id>
		<title>KVM</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=KVM&amp;diff=24412"/>
		<updated>2023-08-23T14:01:18Z</updated>

		<summary type="html">&lt;p&gt;Faust: /* Networking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://www.linux-kvm.org/page/Main_Page KVM] is an free and open source virtualization solution in a kernel module. Although it is often simply referred to as KVM, the actual hypervisor is [https://www.qemu.org QEMU]. QEMU runs from user-space, but can integrate with KVM, providing better performance by leveraging the hardware from kernel-space. QEMU can virtualize x86, PowerPC, and S390 guests, amongst others. [https://libvirt.org Libvirt] is a management framework that integrates with QEMU/KVM, [[LXC]], [[Xen_Dom0|Xen]] and others.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
The following commands provide &#039;&#039;&#039;libvirt&#039;&#039;&#039; as well as &#039;&#039;&#039;QEMU with emulation for x86_64&#039;&#039;&#039; and &#039;&#039;&#039;qemu-img&#039;&#039;&#039;, a necessary component for using various disk formats such as qcow2. Without qemu-img, only raw disks are available. It can also convert images between several formats like vhdx and vmdk. It also provides the metapackage &#039;&#039;&#039;qemu-modules&#039;&#039;&#039;, which provides subpackages needed for special features. In versions of Alpine before 3.13.0 these features were covered by &#039;&#039;&#039;QEMU with emulation for x86_64&#039;&#039;&#039;.&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;# apk add libvirt-daemon qemu-img qemu-system-x86_64 qemu-modules openrc&lt;br /&gt;
# rc-update add libvirtd&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Networking ==&lt;br /&gt;
By default, libvirt uses NAT for VM connectivity. If you want to use the default configuration, you need to load the tun module.&lt;br /&gt;
{{Cmd|# modprobe tun}}&lt;br /&gt;
&lt;br /&gt;
Add tun to autostart: &lt;br /&gt;
{{Cmd|# echo &amp;quot;tun&amp;quot; &amp;gt;&amp;gt; /etc/modules-load.d/tun.conf}}&lt;br /&gt;
&lt;br /&gt;
To make the tun module load on boot, use this command:&lt;br /&gt;
{{Cmd|# cat /etc/modules {{!}} grep tun {{!}}{{!}} echo tun &amp;gt;&amp;gt; /etc/modules}}&lt;br /&gt;
&lt;br /&gt;
If you prefer bridging a guest over your Ethernet interface, you need to make a [[Bridge#Configuration_file|bridge]].&lt;br /&gt;
&lt;br /&gt;
It&#039;s quite common to use bridges with KVM environments. But when IPv6 is used, Alpine will assign itself a link-local address as well as an SLAAC address in case there&#039;s a router sending Router Advertisements. You don&#039;t want this because you don&#039;t want to have the KVM host an IP address in every network it serves to guests. Unfortunately IPv6 can not just be disabled for the bridge via a sysctl configuration file, because the bridge might not be up when the sysctl config is applied during boot. What works is to put a post-up hook into the /etc/network/interfaces file like this:&lt;br /&gt;
 auto brlan&lt;br /&gt;
 iface brlan inet manual&lt;br /&gt;
        bridge-ports eth1.5&lt;br /&gt;
        bridge-stp 0&lt;br /&gt;
        post-up ip -6 a flush dev brlan; sysctl -w net.ipv6.conf.brlan.disable_ipv6=1&lt;br /&gt;
&lt;br /&gt;
== Management ==&lt;br /&gt;
For non-root management, you will need to add your user to the libvirt group.&lt;br /&gt;
{{Cmd|# addgroup user libvirt}}&lt;br /&gt;
&lt;br /&gt;
You can use libvirt&#039;s virsh at the CLI. It can execute commands as well as run as an interactive shell. Read its manual page and/or use the &amp;quot;help&amp;quot; command for more info. Some basic commands are:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;virsh help&lt;br /&gt;
virsh list --all&lt;br /&gt;
virsh start $domain&lt;br /&gt;
virsh shutdown $domain&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The libvirt project provides a GUI for managing hosts, called virt-manager. It handles local systems as well as remote ones via SSH.&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;# apk add dbus polkit virt-manager font-terminus&lt;br /&gt;
# rc-update add dbus&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
In order to use libvirtd to remotely control KVM over ssh PolicyKit needs a .pkla informing it that this is allowed.&lt;br /&gt;
Write the following file to /etc/polkit-1/localauthority/50-local.d/50-libvirt-ssh-remote-access-policy.pkla&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;[Remote libvirt SSH access]&lt;br /&gt;
 Identity=unix-group:libvirt&lt;br /&gt;
 Action=org.libvirt.unix.manage&lt;br /&gt;
 ResultAny=yes&lt;br /&gt;
 ResultInactive=yes&lt;br /&gt;
 ResultActive=yes&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Guest lifecycle management ==&lt;br /&gt;
The libvirt-guests service (available from Alpine 3.13.5) allows running guests to be automatically suspended or shut down when the host is shut down or rebooted.&lt;br /&gt;
&lt;br /&gt;
The service is configured in /etc/conf.d/libvirt-guests. Enable the service with {{Cmd|# rc-update add libvirt-guests}}&lt;br /&gt;
&lt;br /&gt;
== vfio ==&lt;br /&gt;
&lt;br /&gt;
VFIO is more flexible way to do PCI passthrough. Let&#039;s suppose you want to use following ethernet card as PCI device in a VM.&lt;br /&gt;
&lt;br /&gt;
 # lspci | grep 02:00.0&lt;br /&gt;
 02:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)&lt;br /&gt;
 # lspci -n -s 02:00.0&lt;br /&gt;
 02:00.0 0200: 8086:10c9 (rev 01)&lt;br /&gt;
&lt;br /&gt;
First, create &#039;&#039;/etc/mkinitfs/features.d/vfio.modules&#039;&#039; with the following content, so mkinitfs includes the VFIO modules in the initramfs.&lt;br /&gt;
&lt;br /&gt;
 kernel/drivers/vfio/vfio.ko.*&lt;br /&gt;
 kernel/drivers/vfio/vfio_virqfd.ko.*&lt;br /&gt;
 kernel/drivers/vfio/vfio_iommu_type1.ko.*&lt;br /&gt;
 kernel/drivers/vfio/pci/vfio-pci.ko.*&lt;br /&gt;
&lt;br /&gt;
Add &#039;&#039;vfio&#039;&#039; the the list of features in &#039;&#039;/etc/mkinitfs/mkinitfs.conf&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Modify following file to instruct &#039;&#039;mkinitfs&#039;&#039; to load following module with the options and rebuild kernel ramdisk.&lt;br /&gt;
&lt;br /&gt;
 # cat /etc/modprobe.d/vfio.conf &amp;lt;&amp;lt;EOF&lt;br /&gt;
 options vfio-pci ids=8086:10c9&lt;br /&gt;
 options vfio_iommu_type1 allow_unsafe_interrupts=1&lt;br /&gt;
 softdep igb pre: vfio-pci&lt;br /&gt;
 EOF&lt;br /&gt;
 # mkinitfs&lt;br /&gt;
&lt;br /&gt;
Now we need to edit the &amp;quot;default_kernel_opts&amp;quot; and &amp;quot;modules&amp;quot; sections in the update-extlinux.conf file. Edit the &amp;quot;default_kernel_opts&amp;quot; to include &#039;&#039;intel_iommu=o iommu=pt&#039;&#039; for Intel platform (AMD uses &#039;&#039;amd_iommu=on&#039;&#039;), and add the VFIO modules to the &amp;quot;modules&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
  # grep &#039;^default_kernel_opts\|^modules&#039; /etc/update-extlinux.conf&lt;br /&gt;
  default_kernel_opts=&amp;quot;quiet rootfstype=ext4 intel_iommu=on iommu=pt&amp;quot;&lt;br /&gt;
  modules=sd-mod,usb-storage,ext4,raid1,vfio,vfio-pci,vfio_iommu_type1,vfio_virqfd&lt;br /&gt;
&lt;br /&gt;
For syslinux/extlinux, run:&lt;br /&gt;
&lt;br /&gt;
  # update-extlinux&lt;br /&gt;
&lt;br /&gt;
For GRUB (which [https://git.alpinelinux.org/aports/tree/main/grub/alpine-mkconfig.patch#n9 now also uses] the update-extlinux.conf if present), run:&lt;br /&gt;
&lt;br /&gt;
  # grub-mkconfig -o /boot/grub/grub.cfg&lt;br /&gt;
&lt;br /&gt;
Reboot and check dmesg.&lt;br /&gt;
&lt;br /&gt;
 # grep -i -e DMAR -e IOMMU /var/log/dmesg&lt;br /&gt;
 [    0.343795] DMAR: Host address width 36&lt;br /&gt;
 [    0.343797] DMAR: DRHD base: 0x000000fed90000 flags: 0x1&lt;br /&gt;
 [    0.343804] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap c90780106f0462 ecap f020e3&lt;br /&gt;
 [    0.343806] DMAR: RMRR base: 0x000000000ed000 end: 0x000000000effff&lt;br /&gt;
 [    0.343807] DMAR: RMRR base: 0x000000bf7ed000 end: 0x000000bf7fffff&lt;br /&gt;
 [    0.553830] iommu: Default domain type: Passthrough (set via kernel command line)&lt;br /&gt;
 [    0.902477] DMAR: No ATSR found&lt;br /&gt;
 [    0.902563] DMAR: dmar0: Using Queued invalidation&lt;br /&gt;
 ...&lt;br /&gt;
 [    0.903256] pci 0000:02:00.0: Adding to iommu group 12&lt;br /&gt;
 ...&lt;br /&gt;
 [    0.903768] DMAR: Intel(R) Virtualization Technology for Directed I/O&lt;br /&gt;
&lt;br /&gt;
If you do not run libvirt VMs under &#039;&#039;root&#039;&#039; (&#039;&#039;egrep &#039;^#*user&#039; /etc/libvirt/qemu.conf&#039;&#039;), then you must have correct permission on &#039;&#039;/dev/vfio/&amp;lt;iommu_group&amp;gt;&#039;&#039;, eg. &#039;&#039;/dev/vfio/12&#039;&#039;. You have to tune &#039;&#039;/etc/mdev.conf&#039;&#039; or UDEV rules. Also note that if there are multiple PCI devices in the same iommu group, you always have to add all of them to the VM otherwise you&#039;ll get an error message like &amp;quot;Please ensure all devices within the iommu_group are bound to their vfio bus driver&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # virsh dumpxml vm01 | xmllint --xpath &#039;//*/hostdev&#039; -&lt;br /&gt;
 &amp;lt;hostdev mode=&amp;quot;subsystem&amp;quot; type=&amp;quot;pci&amp;quot; managed=&amp;quot;yes&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;driver name=&amp;quot;vfio&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;source&amp;gt;&lt;br /&gt;
         &amp;lt;address domain=&amp;quot;0x0000&amp;quot; bus=&amp;quot;0x02&amp;quot; slot=&amp;quot;0x00&amp;quot; function=&amp;quot;0x0&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
       &amp;lt;alias name=&amp;quot;hostdev0&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;address type=&amp;quot;pci&amp;quot; domain=&amp;quot;0x0000&amp;quot; bus=&amp;quot;0x00&amp;quot; slot=&amp;quot;0x06&amp;quot; function=&amp;quot;0x0&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/hostdev&amp;gt;&lt;br /&gt;
 &amp;lt;hostdev mode=&amp;quot;subsystem&amp;quot; type=&amp;quot;pci&amp;quot; managed=&amp;quot;yes&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;driver name=&amp;quot;vfio&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;source&amp;gt;&lt;br /&gt;
         &amp;lt;address domain=&amp;quot;0x0000&amp;quot; bus=&amp;quot;0x02&amp;quot; slot=&amp;quot;0x00&amp;quot; function=&amp;quot;0x1&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
       &amp;lt;alias name=&amp;quot;hostdev1&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;address type=&amp;quot;pci&amp;quot; domain=&amp;quot;0x0000&amp;quot; bus=&amp;quot;0x00&amp;quot; slot=&amp;quot;0x08&amp;quot; function=&amp;quot;0x0&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/hostdev&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you directly use QEMU without libvirt and are trying to pass a GPU to your VM, you may get a &amp;quot;VFIO_MAP_DMA failed: Out of memory&amp;quot; error, when starting the VM as a non-root user. One way to fix it is to install the  &#039;&#039;shadow&#039;&#039; package, and increase the amount of memory the user can lock via the  &#039;&#039;/etc/security/limits.conf&#039;&#039; file:&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;# apk add shadow&lt;br /&gt;
# echo &amp;quot;youruser soft memlock RAMamount \&lt;br /&gt;
youruser hard memlock RAMamount&amp;quot; &amp;gt;&amp;gt; /etc/security/limits.conf&lt;br /&gt;
# reboot&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Replace &amp;quot;youruser&amp;quot; with the user you wish to run the VM as, and &amp;quot;RAMamount&amp;quot; with how much RAM your VM will need (in KB). The exact amount may throw the same error in the end, so you probably want to increase this value by a few dozen MB (typically +40).&lt;br /&gt;
&lt;br /&gt;
A lot of info on the [https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF Archwiki article for PCI passthrough via OVMF].&lt;br /&gt;
&lt;br /&gt;
[[Category:Virtualization]]&lt;/div&gt;</summary>
		<author><name>Faust</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Configure_a_Wireguard_interface_(wg)&amp;diff=24409</id>
		<title>Talk:Configure a Wireguard interface (wg)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Configure_a_Wireguard_interface_(wg)&amp;diff=24409"/>
		<updated>2023-08-22T17:03:40Z</updated>

		<summary type="html">&lt;p&gt;Faust: /* Bringing up an interface using ifupdown-ng */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bringing up an interface using wg-tools ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Then load the module&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 modprobe wireguard&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Add it to &amp;lt;code&amp;gt;/etc/modules&amp;lt;/code&amp;gt; to automatically load it on boot.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This does not seem to be necessary (any more)?&lt;br /&gt;
&lt;br /&gt;
[[User:Anianz|Anianz]] ([[User talk:Anianz|talk]])&lt;br /&gt;
&lt;br /&gt;
I can confirm that this was not necessary on 3.18 ([[User:faust|faust]]).&lt;br /&gt;
&lt;br /&gt;
== Bringing up an interface using ifupdown-ng ==&lt;br /&gt;
&lt;br /&gt;
The netifrc package is perfect for mounting the wg0 interface at boot in the specific case of using the plain wg command ( https://wiki.gentoo.org/wiki/Wireguard#netifrc ), but only available for the edge branch.&lt;br /&gt;
&lt;br /&gt;
What is the right approach for loading the configuration file and mount the wg0 network interface, at startup in the stable branch?&lt;br /&gt;
&lt;br /&gt;
Konki&lt;br /&gt;
&lt;br /&gt;
Hi!&lt;br /&gt;
I am not sure if this is the &amp;quot;right&amp;quot; approach but I find it quite simple and clean, just add `post-up` and `post-down` commands in your `/etc/network/interfaces` file, see bellow:&lt;br /&gt;
&lt;br /&gt;
  ❯ cat /etc/network/interfaces &lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  auto eth0&lt;br /&gt;
  iface eth0 inet static&lt;br /&gt;
    address 192.168.10.52&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 192.168.10.254&lt;br /&gt;
    post-up wg-quick up /etc/wireguard/wg0.conf&lt;br /&gt;
    post-down wg-quick down /etc/wireguard/wg0.conf&lt;br /&gt;
&lt;br /&gt;
--[[User:Faust|Faust]] ([[User talk:Faust|talk]]) 17:03, 22 August 2023 (UTC)&lt;/div&gt;</summary>
		<author><name>Faust</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Configure_a_Wireguard_interface_(wg)&amp;diff=24408</id>
		<title>Talk:Configure a Wireguard interface (wg)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Configure_a_Wireguard_interface_(wg)&amp;diff=24408"/>
		<updated>2023-08-22T17:00:46Z</updated>

		<summary type="html">&lt;p&gt;Faust: /* Bringing up an interface using ifupdown-ng */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bringing up an interface using wg-tools ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Then load the module&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 modprobe wireguard&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Add it to &amp;lt;code&amp;gt;/etc/modules&amp;lt;/code&amp;gt; to automatically load it on boot.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This does not seem to be necessary (any more)?&lt;br /&gt;
&lt;br /&gt;
[[User:Anianz|Anianz]] ([[User talk:Anianz|talk]])&lt;br /&gt;
&lt;br /&gt;
I can confirm that this was not necessary on 3.18 ([[User:faust|faust]]).&lt;br /&gt;
&lt;br /&gt;
== Bringing up an interface using ifupdown-ng ==&lt;br /&gt;
&lt;br /&gt;
The netifrc package is perfect for mounting the wg0 interface at boot in the specific case of using the plain wg command ( https://wiki.gentoo.org/wiki/Wireguard#netifrc ), but only available for the edge branch.&lt;br /&gt;
&lt;br /&gt;
What is the right approach for loading the configuration file and mount the wg0 network interface, at startup in the stable branch?&lt;br /&gt;
&lt;br /&gt;
Konki&lt;br /&gt;
&lt;br /&gt;
Hi, I am not sure if this is the &amp;quot;right&amp;quot; approach but I find it quite simple and clean, just add in `post-up` and `post-down` commands in your `/etc/network/interfaces` file, see bellow:&lt;br /&gt;
&lt;br /&gt;
  ❯ cat /etc/network/interfaces &lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
  auto eth0&lt;br /&gt;
  iface eth0 inet static&lt;br /&gt;
	  address 192.168.10.52&lt;br /&gt;
	  netmask 255.255.255.0&lt;br /&gt;
	  gateway 192.168.10.254&lt;br /&gt;
      post-up wg-quick up /etc/wireguard/wg0.conf&lt;br /&gt;
      post-down wg-quick down /etc/wireguard/wg0.conf&lt;/div&gt;</summary>
		<author><name>Faust</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Configure_a_Wireguard_interface_(wg)&amp;diff=24407</id>
		<title>Talk:Configure a Wireguard interface (wg)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Configure_a_Wireguard_interface_(wg)&amp;diff=24407"/>
		<updated>2023-08-22T16:45:41Z</updated>

		<summary type="html">&lt;p&gt;Faust: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bringing up an interface using wg-tools ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Then load the module&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 modprobe wireguard&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Add it to &amp;lt;code&amp;gt;/etc/modules&amp;lt;/code&amp;gt; to automatically load it on boot.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This does not seem to be necessary (any more)?&lt;br /&gt;
&lt;br /&gt;
[[User:Anianz|Anianz]] ([[User talk:Anianz|talk]])&lt;br /&gt;
&lt;br /&gt;
I can confirm that this was not necessary on 3.18 ([[User:faust|faust]]).&lt;br /&gt;
&lt;br /&gt;
== Bringing up an interface using ifupdown-ng ==&lt;br /&gt;
&lt;br /&gt;
The netifrc package is perfect for mounting the wg0 interface at boot in the specific case of using the plain wg command ( https://wiki.gentoo.org/wiki/Wireguard#netifrc ), but only available for the edge branch.&lt;br /&gt;
&lt;br /&gt;
What is the right approach for loading the configuration file and mount the wg0 network interface, at startup in the stable branch?&lt;br /&gt;
&lt;br /&gt;
Konki&lt;/div&gt;</summary>
		<author><name>Faust</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Configure_a_Wireguard_interface_(wg)&amp;diff=24406</id>
		<title>Talk:Configure a Wireguard interface (wg)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Configure_a_Wireguard_interface_(wg)&amp;diff=24406"/>
		<updated>2023-08-22T16:45:17Z</updated>

		<summary type="html">&lt;p&gt;Faust: /* Bringing up an interface using wg-tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bringing up an interface using wg-tools ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Then load the module&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 modprobe wireguard&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Add it to &amp;lt;code&amp;gt;/etc/modules&amp;lt;/code&amp;gt; to automatically load it on boot.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This does not seem to be necessary (any more)?&lt;br /&gt;
&lt;br /&gt;
[[User:Anianz|Anianz]] ([[User talk:Anianz|talk]])&lt;br /&gt;
&lt;br /&gt;
I can confirm that this was not necessary on 3.18.&lt;br /&gt;
&lt;br /&gt;
== Bringing up an interface using ifupdown-ng ==&lt;br /&gt;
&lt;br /&gt;
The netifrc package is perfect for mounting the wg0 interface at boot in the specific case of using the plain wg command ( https://wiki.gentoo.org/wiki/Wireguard#netifrc ), but only available for the edge branch.&lt;br /&gt;
&lt;br /&gt;
What is the right approach for loading the configuration file and mount the wg0 network interface, at startup in the stable branch?&lt;br /&gt;
&lt;br /&gt;
Konki&lt;/div&gt;</summary>
		<author><name>Faust</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=24379</id>
		<title>Sway</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=24379"/>
		<updated>2023-08-21T08:25:20Z</updated>

		<summary type="html">&lt;p&gt;Faust: wrong copy/paste...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://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;
{{Cmd|# setup-devd udev}}&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;
{{Cmd|# adduser $USER input&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; adduser $USER video&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install some TTF fonts:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# apk add font-dejavu}}&lt;br /&gt;
&lt;br /&gt;
seatd daemon:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# apk add seatd&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; rc-update add seatd&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; rc-service seatd start&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; adduser $USER seat&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Install sway:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# apk add sway sway-doc&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;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;
}}&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 [[D-Bus]] 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;
{{Cmd|dbus-run-session -- sway #prepend with exec in your login shell init script}}&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. Unless &amp;lt;code&amp;gt;dbus-daemon&amp;lt;/code&amp;gt; is a descendant of the &amp;lt;code&amp;gt;sway&amp;lt;/code&amp;gt; process, 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;
{{Cmd|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;
}}&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-portal-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;
{{Cmd|# for GTK-based programs such as firefox and emacs:&lt;br /&gt;
export GDK_DPI_SCALE{{=}}2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; for QT-based programs&lt;br /&gt;
export QT_WAYLAND_FORCE_DPI{{=}}&amp;quot;physical&amp;quot;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;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;
}}&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;
&lt;br /&gt;
{{Cat|/etc/init.d/sway|#!/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;
}}&lt;br /&gt;
&lt;br /&gt;
Then run&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# chmod +x /etc/init.d/sway}}&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# rc-update add sway default}}&lt;br /&gt;
&lt;br /&gt;
Make sure you have {{Pkg|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;
&lt;br /&gt;
[[Category:Desktop]]&lt;br /&gt;
[[Category:Window Managers]]&lt;/div&gt;</summary>
		<author><name>Faust</name></author>
	</entry>
</feed>