<?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=Whitelynx</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=Whitelynx"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Whitelynx"/>
	<updated>2026-04-27T08:12:24Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Dwm&amp;diff=16768</id>
		<title>Dwm</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Dwm&amp;diff=16768"/>
		<updated>2020-01-09T19:29:52Z</updated>

		<summary type="html">&lt;p&gt;Whitelynx: Spelling, formatting, and clarity fixes.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
&lt;br /&gt;
[https://dwm.suckless.org/ dwm] is a dynamic window manager for X. It manages windows in tiled, monocle and floating layouts.&lt;br /&gt;
&lt;br /&gt;
This guide covers:&lt;br /&gt;
&lt;br /&gt;
* Creating  a user account that can run as sudo &lt;br /&gt;
* Installing dependencies for the [https://suckless.org suckless] tools and installing firefox &lt;br /&gt;
* Installing from source dwm (dynamic window manager), dmenu (dynamic menu), st (simple terminal)&lt;br /&gt;
* Configuring the new profile to run dwm at login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a new user account ==&lt;br /&gt;
After the install of alpine you get the root account. We want to use a new user account that is not root but will have sudo permissions. &lt;br /&gt;
{{cmd|# adduser myname}}&lt;br /&gt;
Where &#039;&#039;&#039;myname&#039;&#039;&#039; is the username you want to use.&lt;br /&gt;
&lt;br /&gt;
Install sudo so we can add &#039;&#039;&#039;myname&#039;&#039;&#039; to sudoers.&lt;br /&gt;
{{cmd|# apk add sudo}}&lt;br /&gt;
&lt;br /&gt;
Edit the sudoers file by running:&lt;br /&gt;
{{cmd|# visudo}}&lt;br /&gt;
{{Note|Only edit the sudoers file using &#039;&#039;&#039;visudo&#039;&#039;&#039;}}&lt;br /&gt;
Add your user account so you can have sudoers. Make your change below root. The relevant section should look like this:&lt;br /&gt;
{{cat|/etc/sudoers.tmp|&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
##&lt;br /&gt;
## User privilege specification&lt;br /&gt;
##&lt;br /&gt;
root ALL=(ALL) ALL&lt;br /&gt;
myname ALL=(ALL) ALL&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Switch to the new account &lt;br /&gt;
{{cmd|# su myname}}&lt;br /&gt;
&lt;br /&gt;
== Installing Xorg ==&lt;br /&gt;
Run the following command to install X.org.&lt;br /&gt;
{{cmd|# sudo setup-xorg-base}}&lt;br /&gt;
&lt;br /&gt;
== Configuring the community repositories ==&lt;br /&gt;
We need to do this so we can install Firefox. Edit the file with this command:&lt;br /&gt;
{{cmd|# sudo vi /etc/apk/repositories}}&lt;br /&gt;
Uncomment the community line by removing the &#039;&#039;&#039;#&#039;&#039;&#039; then save the file and exit. &lt;br /&gt;
It should look something like this: &lt;br /&gt;
{{cat|/etc/apk/repositories|&lt;br /&gt;
#/media/cdrom/apks&lt;br /&gt;
http://linorg.usp.br/AlpineLinux/v3.9/main&lt;br /&gt;
http://linorg.usp.br/AlpineLinux/v3.9/community&lt;br /&gt;
#http://linorg.usp.br/AlpineLinux/edge/main&lt;br /&gt;
#http://linorg.usp.br/AlpineLinux/edge/community&lt;br /&gt;
#http://linorg.usp.br/AlpineLinux/edge/testing}} &lt;br /&gt;
Next let the package manager know we made this change: &lt;br /&gt;
{{cmd|# sudo apk update}}&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
{{Note|&lt;br /&gt;
&#039;&#039;&#039;git make gcc g++ libx11-dev libxft-dev libxinerama-dev ncurses&#039;&#039;&#039; are needed to install suckless tools from source.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;dbus-x11&#039;&#039;&#039; is needed for the dbus system (when we run firefox in dwm we want it to open in a tile)&lt;br /&gt;
&lt;br /&gt;
The last three &#039;&#039;&#039;adwaita-gtk2-theme adwaita-icon-theme ttf-dejavu&#039;&#039;&#039; are optional but I recommend them so you can have a nicer looking firefox. }}&lt;br /&gt;
&lt;br /&gt;
The command to install the dependencies:&lt;br /&gt;
{{cmd|# sudo apk add git make gcc g++ libx11-dev libxft-dev libxinerama-dev ncurses dbus-x11 firefox-esr adwaita-gtk2-theme adwaita-icon-theme ttf-dejavu}}&lt;br /&gt;
&lt;br /&gt;
== Installing suckless tools dwm, dmenu, and st from source ==&lt;br /&gt;
Go to this directory {{cmd| # cd /tmp}} this is where we will download the source code.&lt;br /&gt;
{{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, run:&lt;br /&gt;
{{cmd|# sudo make clean install}}&lt;br /&gt;
Next, leave this directory {{cmd|# cd ..}} so we can install dmenu:&lt;br /&gt;
{{cmd|# git clone https://git.suckless.org/dmenu}}&lt;br /&gt;
{{cmd|# cd dmenu}}&lt;br /&gt;
{{cmd|# sudo make clean install}}&lt;br /&gt;
Finally, leave this directory {{cmd|# cd ..}} so we can install st:&lt;br /&gt;
{{cmd|# git clone https://git.suckless.org/st}}&lt;br /&gt;
{{cmd|# cd st}}&lt;br /&gt;
{{cmd|# sudo make clean install}}&lt;br /&gt;
== Setting up your profile ==&lt;br /&gt;
Go to your home directory:&lt;br /&gt;
{{cmd|# cd /home/myname}} Where &#039;&#039;&#039;myname&#039;&#039;&#039; is your username.&lt;br /&gt;
Create .xinitrc:&lt;br /&gt;
{{cmd|# vi .xinitrc}}&lt;br /&gt;
Add this line:&lt;br /&gt;
{{cat|~/.xinitrc|&lt;br /&gt;
exec dwm}}&lt;br /&gt;
Save the file and exit vi.&lt;br /&gt;
&lt;br /&gt;
Next, create .profile.:&lt;br /&gt;
{{cmd|# vi .profile}}&lt;br /&gt;
Add this line:&lt;br /&gt;
{{cat|~/.profile|&lt;br /&gt;
startx}}&lt;br /&gt;
&lt;br /&gt;
{{Note|If you install additional programs that call your `$SHELL` with the POSIX `-l` login flag, you&#039;ll need to make launching `startx` conditional, otherwise X will attempt to launch every time your shell is called with the login flag.&lt;br /&gt;
{{cat|~/.profile|&lt;br /&gt;
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;
|gotchas}}&lt;br /&gt;
&lt;br /&gt;
Exit to log out of the system or reboot and when you log in dwm will run. &lt;br /&gt;
Press alt+p to launch dmenu and start typing firefox. Press enter to run firefox, it will load in tile 9.&lt;br /&gt;
&lt;br /&gt;
= =&lt;br /&gt;
* https://pkgs.alpinelinux.org/contents?file=dwm&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Dwm &amp;quot;dwm is only a single binary, and its source code is intended to never exceed 2000 SLOC. dwm is customized through editing its source code&amp;quot;]&lt;br /&gt;
* [[Awesome]]&lt;br /&gt;
&lt;br /&gt;
[[category:Desktop]]&lt;/div&gt;</summary>
		<author><name>Whitelynx</name></author>
	</entry>
</feed>