content/blog/2022-12-17-st.org

0b2895a90c7751ce06e4b26d4db41005ea2f40a9
cleberg.net/content/blog/2022-12-17-st.org rendered · source · history · blame · raw

93 lines · 2654 bytes

 1#+date:        <2022-12-17 Sat 00:00:00>
 2#+title:       Building and Installing the Simple Terminal (st) on Fedora Workstation
 3#+description: Comprehensive instructions to obtain source code, compile, apply patches, and install the Simple Terminal application on Fedora Linux systems.
 4#+slug:        st
 5#+filetags:    :st:terminal:fedora:
 6
 7* st
 8
 9[[https://st.suckless.org][st]] standards for Simple Terminal, a simple
10terminal implementation for X made by the
11[[https://suckless.org][suckless]] team.
12
13This post walks through the dependencies needed and process to build and
14install =st= on Fedora Workstation.
15
16** Obtain Files
17
18To start, obtain the source files for =st= via =git clone=.
19
20#+begin_src sh
21mkdir ~/suckless && cd ~/suckless
22git clone https://git.suckless.org/st && cd st
23#+end_src
24
25** Dependencies
26
27Once you have the files and are in the =st= directory, ensure the
28following packages are installed.
29
30#+begin_src sh
31sudo dnf update && sudo dnf upgrade
32sudo dnf install gcc patch libX11-devel libXft-devel
33#+end_src
34
35** Building
36
37Before building, ensure that you read the README file.
38
39#+begin_src sh
40cat README
41#+end_src
42
43Once you've read the instructions, open the =config.mk= file and ensure
44it matches your setup. If you're not sure, leave the default options
45within the file.
46
47Finally, you can build =st= with the following command. Ensure you run
48as root (e.g., =sudo=) or else you may not end up with a usable
49application file.
50
51#+begin_src sh
52sudo make clean install
53#+end_src
54
55** Customization (Patches)
56
57Note that customizing =st= requires you to modify the source files or to
58download one of the [[https://st.suckless.org/patches/][available
59patches]] for suckless.org.
60
61If you've already installed =st= and want to customize or install a
62patch, start by uninstalling the current program.
63
64#+begin_src sh
65cd ~/suckless/st
66sudo make uninstall
67#+end_src
68
69Next, grab the =<path>.diff= file from the page of the patch you chose.
70For example, I will be using the
71[[https://st.suckless.org/patches/defaultfontsize/][defaultfontsize]]
72patch in the below example.
73
74#+begin_src sh
75wget https://st.suckless.org/patches/defaultfontsize/st-defaultfontsize-20210225-4ef0cbd.diff
76#+end_src
77
78Once the file is downloaded inside the =st= folder, apply the patch and
79re-install the program. You may need to install the =patch= command if
80you don't have it installed already (you should have installed it
81above).
82
83#+begin_src sh
84patch -i st-defaultfontsize-20210225-4ef0cbd.diff
85sudo make clean install
86#+end_src
87
88Once installed, you can use the default font size patch to launch =st=
89with any font size you wish:
90
91#+begin_src sh
92st -z 16
93#+end_src