summaryrefslogtreecommitdiff
path: root/src/posts/arch/2020-08-17/installing-st-dmenu-dwm-in-arch-linux/index.gmi
blob: 4f7386d3af1859993b842fa96f5a3b9082ebe574 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# Installing ST, DMENU and DWM in Arch Linux

> Mon 17th August 2020 By David T. Sadler.

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.

## Install Dependencies

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.

```shell
$ sudo pacman -S base-devel git libx11 libxft xorg-server xorg-xinit terminus-font
```

* base-devel Since I will be installing from source this package contains various tools to compile software.
* git Is needed to get the source code from the suckless git repositories.
* libx11 and libxft Dependanices required by dwm oherwise it will fail when trying to compile it.
* xorg-server Is the display server that provides the windows that dwm will manage.
* xorg-xinit Allows us to start the display server.
* 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.

## Download Git Repositories

The source code for the software is avialable from the Suckless git repositories so I simply clone them.

```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
```

## Install ST

I install st by first moving to the directory created when cloning the repository.

```shell
$ cd ~/.local/src/st
```

Then its as simple as compiling and instaling the software with the below commands.

```shell
$ make clean
$ sudo make install
```

## Configure and Install DMENU

Again move to the directory created earlier.

```shell
$ cd ~/.local/src/dmenu
```

Before compiling a small edit needs to be made to the file config.mk.

```shell
$ nvim config.mk
```

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.

```vim
# XINERAMALIBS  = -lXinerama
# XINERAMAFLAGS = -DXINERAMA
```

Again compiling and installing is done with the below commands.

```shell
$ make clean
$ sudo make install
```

## Configure and Install DWM

For the final time move to the directory created earlier.

```shell
$ cd ~/.local/src/dwm
```

As with dmenu the same edit needs to be made to the file config.mk.

```shell
$ nvim config.mk
```

```vim
# XINERAMALIBS  = -lXinerama
# XINERAMAFLAGS = -DXINERAMA
```

Compile and install as usual.

```shell
$ make clean
$ sudo make install
```

## Starting DWM

Since I have installed xorg-xinit I need to create a .xinitrc in my home folder.

```shell
$ nvim ~/.xinitrc
```

The contents of this file is just.

```vim
exec dwm
```

I can now start xorg and dwm with the below command.

```shell
$ startx
```

### Links

=> /posts/arch/2020-05-25/installing-arch-linux-on-a-x220-thinkpad/ Installing Arch Linux on a Thinkpad X220.
=> https://dwm.suckless.org/ Dynamic Window Manager (DWM).
=> https://suckless.org/ Suckless Software.
=> https://st.suckless.org/ Simple Terminal.
=> https://tools.suckless.org/dmenu/ DMenu.

=> /posts/arch/ Arch - Read More Posts.

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.

=> mailto:david@davidtsadler.com Email david@davidtsadler.com

=> 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.

Copyright © 2021 David T. Sadler.

=> / Return to Homepage.