<?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=Rooyca</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=Rooyca"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Rooyca"/>
	<updated>2026-05-06T03:55:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Dwm&amp;diff=30772</id>
		<title>Dwm</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Dwm&amp;diff=30772"/>
		<updated>2025-08-23T01:57:07Z</updated>

		<summary type="html">&lt;p&gt;Rooyca: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:dwm}}[https://dwm.suckless.org/ dwm] is an extremely fast, small, and dynamic window manager for X. It manages windows in tiled, monocle and floating layouts. This page provides instructions for installing dwm both from binary packages and from source along with dependencies. &lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
{{:Include:Desktop prerequisites}}&lt;br /&gt;
* [[Alpine_setup_scripts#setup-xorg-base|Install Xorg]]&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
The {{pkg|dbus-x11}} package is needed for the dbus system as it enables Firefox running in dwm to open in a tile.The packages {{pkg|adwaita-icon-theme}} and {{pkg|font-dejavu}} are optional, but recommended for a nicer looking firefox. Install them before proceeding: {{Cmd|# apk add {{pkg|dbus-x11}} {{pkg|adwaita-icon-theme}} {{pkg|font-dejavu}} {{pkg|firefox-esr}}}}&lt;br /&gt;
&lt;br /&gt;
=== Installing binary packages  ===&lt;br /&gt;
&lt;br /&gt;
Alpine Linux provides  binary packages for {{Pkg|dwm}} (dynamic window manager), {{Pkg|dmenu}} (dynamic menu) and {{Pkg|st}} (simple terminal). This allows new users to experience dwm quickly without compiling the source code. To install the binary packages, issue the command:{{Cmd|# apk add dwm dmenu st}}&lt;br /&gt;
&lt;br /&gt;
Proceed to [[#Starting dwm|Starting dwm]] section to start using dwm with default settings. If you are new to dwm, refer to the [https://dwm.suckless.org/tutorial/ official dwm tutorial].&lt;br /&gt;
&lt;br /&gt;
To customize dwm, refer [[#Installing from source|Installing from source]]. &lt;br /&gt;
&lt;br /&gt;
=== Installing from source  ===&lt;br /&gt;
&lt;br /&gt;
To customize dwm, the source code written in &#039;&#039;&#039;c&#039;&#039;&#039; language must be edited, compiled and installed everytime for the changes to take effect, which usuaully takes less than a minute. &lt;br /&gt;
&lt;br /&gt;
If you have installed the [[#Installing binary packages|binary packages]], remove them first before proceeding:{{Codeline| # apk del dwm dmenu st}}&lt;br /&gt;
&lt;br /&gt;
Install the necessary packages to compile dwm: {{cmd|# apk add {{pkg|git}} {{pkg|make}} {{pkg|gcc}} {{pkg|g++}} {{pkg|libx11-dev}} {{pkg|libxft-dev}} {{pkg|libxinerama-dev}} {{pkg|ncurses}} }}&lt;br /&gt;
&lt;br /&gt;
The following instructions downloads the sources for {{ic|dwm}}, {{ic|dmenu}} and {{ic|st}} in {{Path|/usr/src/suckless}}, compiles the source(make) and installs the binaries in {{Path|/usr/local/bin}}. If you do not want to keep the sources, use {{Path|/tmp}} for downloading the sources.&lt;br /&gt;
&lt;br /&gt;
# Create a directory {{Path|/usr/src/suckless}} using the command: {{Cmd|# mkdir -p /usr/src/suckless}}&lt;br /&gt;
# Change to the {{Path|/usr/src/suckless directory}}:{{cmd|$ cd /usr/src/suckless}}&lt;br /&gt;
# Download the {{ic|dwm}} sources: {{cmd|# git clone https://git.suckless.org/dwm}}&lt;br /&gt;
# Once downloaded, go to the dwm directory:{{cmd|# cd dwm }} &lt;br /&gt;
# To install dwm, issue the command: {{cmd|# make clean install}}&lt;br /&gt;
# Next, go up one directory level {{cmd|# cd ..}}&lt;br /&gt;
# Download and install {{ic|dmenu}} launcher: {{cmd|&amp;lt;nowiki&amp;gt;# git clone https://git.suckless.org/dmenu&lt;br /&gt;
# cd dmenu&lt;br /&gt;
# make clean install&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
# Finally, go up one more directory level: {{cmd|# cd ..}}&lt;br /&gt;
# Download and install {{ic|st}} terminal: {{cmd|&amp;lt;nowiki&amp;gt;# git clone https://git.suckless.org/st&lt;br /&gt;
# cd st&lt;br /&gt;
# make clean install&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
The configuration of dwm and other suckless tools are done by editing the {{Path|config.h}} file. If not already done, complete [[#Installing from source|Installing from source]] before proceeding. &lt;br /&gt;
&lt;br /&gt;
The {{ic|make}} command will create {{Path|config.h}} file from {{Path|config.def.h}}. If the file {{Path|config.h}} already exists, {{ic|make}} won&#039;t overwrite it and instead use it. Based on above instructions, for customizing dwm, edit the file {{Path|/usr/src/suckless/dwm/config.h}}. &lt;br /&gt;
&lt;br /&gt;
All changes related to keybindings, colors, fonts, patches, etc. are to be made to the {{Path|config.h}} file and (re)compile the source code by issuing the command {{Codeline|# make clean install}}.&lt;br /&gt;
&lt;br /&gt;
=== Starting dwm === &lt;br /&gt;
&lt;br /&gt;
Create or edit {{Path|~/.xinitrc}} with at least the following: {{cat|~/.xinitrc|#!/bin/sh&lt;br /&gt;
# Start D-Bus session&lt;br /&gt;
if [ -z &amp;quot;$DBUS_SESSION_BUS_ADDRESS&amp;quot; ]; then&lt;br /&gt;
    eval $(dbus-launch --sh-syntax --exit-with-session)&lt;br /&gt;
fi&lt;br /&gt;
exec dwm}}&lt;br /&gt;
&lt;br /&gt;
To prevent X from attempting to launch {{ic|dwm}} every time your shell is called with the login flag, make launching `startx` conditional by creating or editing {{Path|.profile}} as follows:{{cat|~/.profile|if [ -z $DISPLAY ] &amp;amp;&amp;amp; [ $(tty) {{=}} /dev/tty1 ]; then&lt;br /&gt;
    startx&lt;br /&gt;
fi&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Log out or reboot. dwm will run the next time you log in. &lt;br /&gt;
&lt;br /&gt;
Press {{Key|Alt}}+{{Key|p}} to launch {{ic|dmenu}}. Type firefox then press {{key|enter}}. Firefox will load and run in tile 9.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== unable to connect to X server: Connection refused ===&lt;br /&gt;
&lt;br /&gt;
If you receive above error message on hitting &amp;quot;startx&amp;quot; with {{Path|Xorg.0.log}} showing errors like {{Cmd|&lt;br /&gt;
Xorg.(EE) Failed to load module &amp;quot;driver_name&amp;quot;&lt;br /&gt;
Fatal server error:&lt;br /&gt;
no screens found}}&lt;br /&gt;
The issue might be due to the user not in the &#039;&#039;&#039;video&#039;&#039;&#039; group. [[Setting_up_a_new_user#Group_management|Adding &#039;&#039;&#039;video&#039;&#039;&#039; group]] for the user will solve the issue.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://dwm.suckless.org/tutorial/ official dwm tutorial]&lt;br /&gt;
* [https://git.sr.ht/~bt/alpine-suck-installer Alpine Suck] Desktop installer for Alpine Linux based on the suckless philosophy&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Dwm Gentoo wiki page on dwm]&lt;br /&gt;
* [https://wiki.archlinux.org/title/Dwm Archwiki page on dwm]&lt;br /&gt;
* [[Raspberry Pi 3 - Browser Client]] - A guide which omits dwm, but uses similar steps to install firefox in a diskless install on ARM. dwm is not used on the RPI3, due to tmpfs limitations.&lt;br /&gt;
&lt;br /&gt;
[[Category:Window Managers]]&lt;/div&gt;</summary>
		<author><name>Rooyca</name></author>
	</entry>
</feed>