summaryrefslogtreecommitdiff
path: root/www/posts/arch/2020-08-17/installing-st-dmenu-dwm-in-arch-linux/index.html
blob: 32929edfbe51b2dbee6ba02718e70bc3b3d156cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>Installing ST, DMENU and DWM in Arch Linux</title>
        <link rel="shortcut icon" href="/images/favicon.png">
        <link rel="stylesheet" href="/css/site.css">
        <link href="/posts/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts"/>
        <link href="/posts/arch/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Arch"/>
        <link href="/posts/gemini/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Gemini"/>
        <link href="/posts/jigsaw/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Jigsaw"/>
        <link href="/posts/laravel/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Laravel"/>
        <link href="/posts/linux/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Linux"/>
        <link href="/posts/markdown/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Markdown"/>
        <link href="/posts/netlify/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Netlify"/>
        <link href="/posts/nextcloud/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Nextcloud"/>
        <link href="/posts/php/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About PHP"/>
    </head>
    <body>
        <section><h1>Installing ST, DMENU and DWM in Arch Linux</h1><blockquote>Mon 17th August 2020 By David T. Sadler.</blockquote><p>Continuing my Arch Linux installation I now have a user account for daily use. However this only provides me with a terminal. What I would like is a traditional multi-window desktop environment which will require me to install two things. A window system of some sort and a layout manager. For this installation I'm going with Xorg and dwm. For those that are not aware dwm is dynamic window manager for Xorg that has been developed by Suckless. Since by default dwm expects st to be installed as the system's terminal and also makes use dmenu to allow you to launch applications I will installed both of them in addition to dwm.</p><h2>Install Dependencies</h2><p>Firt off I need to install the dependencies required by st, dmenu and dwm. Since this is Arch Linux I use pacman to do this.</p><pre><code class="shell">$ sudo pacman -S base-devel git libx11 libxft xorg-server xorg-xinit terminus-font</code></pre><ul><li>base-devel Since I will be installing from source this package contains various tools to compile software.</li><li>git Is needed to get the source code from the suckless git repositories.</li><li>libx11 and libxft Dependanices required by dwm oherwise it will fail when trying to compile it.</li><li>xorg-server Is the display server that provides the windows that dwm will manage.</li><li>xorg-xinit Allows us to start the display server.</li><li>terminus-font Dwm is configured to use a monospaced font and since I installed a barebones system I need to install such a font now.</li></ul><h2>Download Git Repositories</h2><p>The source code for the software is avialable from the Suckless git repositories so I simply clone them.</p><pre><code class="shell">$ mkdir -p ~/.local/src

$ git clone git://git.suckless.org/st ~/.local/src/st
$ git clone git://git.suckless.org/dmenu ~/.local/src/dmenu
$ git clone git://git.suckless.org/dwm ~/.local/src/dwm</code></pre><h2>Install ST</h2><p>I install st by first moving to the directory created when cloning the repository.</p><pre><code class="shell">$ cd ~/.local/src/st</code></pre><p>Then its as simple as compiling and instaling the software with the below commands.</p><pre><code class="shell">$ make clean
$ sudo make install</code></pre><h2>Configure and Install DMENU</h2><p>Again move to the directory created earlier.</p><pre><code class="shell">$ cd ~/.local/src/dmenu</code></pre><p>Before compiling a small edit needs to be made to the file config.mk.</p><pre><code class="shell">$ nvim config.mk</code></pre><p>Since I have not installed Xinerama on this system I need to comment out any flags that reference this otherwise dmenu will fail during the compiling.</p><pre><code class="vim"># XINERAMALIBS  = -lXinerama
# XINERAMAFLAGS = -DXINERAMA</code></pre><p>Again compiling and installing is done with the below commands.</p><pre><code class="shell">$ make clean
$ sudo make install</code></pre><h2>Configure and Install DWM</h2><p>For the final time move to the directory created earlier.</p><pre><code class="shell">$ cd ~/.local/src/dwm</code></pre><p>As with dmenu the same edit needs to be made to the file config.mk.</p><pre><code class="shell">$ nvim config.mk</code></pre><pre><code class="vim"># XINERAMALIBS  = -lXinerama
# XINERAMAFLAGS = -DXINERAMA</code></pre><p>Compile and install as usual.</p><pre><code class="shell">$ make clean
$ sudo make install</code></pre><h2>Starting DWM</h2><p>Since I have installed xorg-xinit I need to create a .xinitrc in my home folder.</p><pre><code class="shell">$ nvim ~/.xinitrc</code></pre><p>The contents of this file is just.</p><pre><code class="vim">exec dwm</code></pre><p>I can now start xorg and dwm with the below command.</p><pre><code class="shell">$ startx</code></pre><h3>Links</h3><a href="/posts/arch/2020-05-25/installing-arch-linux-on-a-x220-thinkpad/">Installing Arch Linux on a Thinkpad X220.</a><a href="https://dwm.suckless.org/">Dynamic Window Manager (DWM).</a><a href="https://suckless.org/">Suckless Software.</a><a href="https://st.suckless.org/">Simple Terminal.</a><a href="https://tools.suckless.org/dmenu/">DMenu.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a></section>
        <script defer src="/js/highlight.min.js"></script>
        <script defer src="/js/site.js"></script>
    </body>
</html>