aboutsummaryrefslogtreecommitdiff
path: root/blog/2022-12-23-alpine-desktop.org
diff options
context:
space:
mode:
authorChristian Cleberg <hello@cleberg.net>2023-12-02 23:27:35 -0600
committerChristian Cleberg <hello@cleberg.net>2023-12-02 23:27:35 -0600
commit3d4da5ac6000a4871c5caa80d1e61f2782da3069 (patch)
tree29f36b50823d22f4c7df0a3db3ede83192ae649f /blog/2022-12-23-alpine-desktop.org
parentdcf0186e16b6ac8f0e00a3aeb9734421ce548177 (diff)
downloadcleberg.net-3d4da5ac6000a4871c5caa80d1e61f2782da3069.tar.gz
cleberg.net-3d4da5ac6000a4871c5caa80d1e61f2782da3069.tar.bz2
cleberg.net-3d4da5ac6000a4871c5caa80d1e61f2782da3069.zip
feat: finish converting md to org
Diffstat (limited to 'blog/2022-12-23-alpine-desktop.org')
-rw-r--r--blog/2022-12-23-alpine-desktop.org266
1 files changed, 141 insertions, 125 deletions
diff --git a/blog/2022-12-23-alpine-desktop.org b/blog/2022-12-23-alpine-desktop.org
index 66a5938..8967da7 100644
--- a/blog/2022-12-23-alpine-desktop.org
+++ b/blog/2022-12-23-alpine-desktop.org
@@ -1,89 +1,95 @@
-+++
-date = 2022-12-23
-title = "Alpine Linux as a Desktop OS"
-description = "Documenting my steps to a useable Alpine Linux desktop experience."
-+++
-
-## Isn't Alpine Linux for Servers?
-
-This is a question I see a lot when people are presented with an example of
-Alpine Linux running as a desktop OS.
-
-While Alpine is small, fast, and minimal, that doesn't stop it from functioning
-at a productive level for desktop users.
-
-This post is documentation of how I installed and modified Alpine Linux to
-become my daily desktop OS.
-
-## Installation
-
-Note that I cover the installation of Alpine Linux in my other post, so I
-won't repeat it here: [Alpine Linux: My New Server OS](/blog/alpine-linux/).
-
-Basically, get a bootable USB or whatever you prefer with Alpine on it, boot the
-ISO, and run the setup script.
-
-```sh
+#+title: Alpine Linux as a Desktop OS
+#+date: 2022-12-23
+
+** Isn't Alpine Linux for Servers?
+:PROPERTIES:
+:CUSTOM_ID: isnt-alpine-linux-for-servers
+:END:
+This is a question I see a lot when people are presented with an example
+of Alpine Linux running as a desktop OS.
+
+While Alpine is small, fast, and minimal, that doesn't stop it from
+functioning at a productive level for desktop users.
+
+This post is documentation of how I installed and modified Alpine Linux
+to become my daily desktop OS.
+
+** Installation
+:PROPERTIES:
+:CUSTOM_ID: installation
+:END:
+Note that I cover the installation of Alpine Linux in my other post, so
+I won't repeat it here: [[/blog/alpine-linux/][Alpine Linux: My New
+Server OS]].
+
+Basically, get a bootable USB or whatever you prefer with Alpine on it,
+boot the ISO, and run the setup script.
+
+#+begin_src sh
setup-alpine
-```
+#+end_src
-Once you have gone through all the options and installer finishes without
-errors, reboot.
+Once you have gone through all the options and installer finishes
+without errors, reboot.
-```sh
+#+begin_src sh
reboot
-```
-
-## Initial Setup
-
-Once Alpine is installed and the machine has rebooted, login is as root
-initially or `su` to root once you log in as your user.
-From here, you should start by updating and upgrading the system in case the
-ISO was not fully up-to-date.
-
-```sh
+#+end_src
+
+** Initial Setup
+:PROPERTIES:
+:CUSTOM_ID: initial-setup
+:END:
+Once Alpine is installed and the machine has rebooted, login is as root
+initially or =su= to root once you log in as your user. From here, you
+should start by updating and upgrading the system in case the ISO was
+not fully up-to-date.
+
+#+begin_src sh
# Update and upgrade system
apk -U update && apk -U upgrade
# Add an editor so we can enable the community repository
apk add nano
-```
+#+end_src
-You need to uncomment the `community` repository for your version of Alpine
-Linux.
+You need to uncomment the =community= repository for your version of
+Alpine Linux.
-For v3.17, the `repositories` file should look like this:
+For v3.17, the =repositories= file should look like this:
-```sh
+#+begin_src sh
nano /etc/apk/repositories
-```
+#+end_src
-```conf
+#+begin_src conf
#/media/sda/apks
http://mirrors.gigenet.com/alpinelinux/v3.17/main
http://mirrors.gigenet.com/alpinelinux/v3.17/community
#http://mirrors.gigenet.com/alpinelinux/edge/main
#http://mirrors.gigenet.com/alpinelinux/edge/community
#http://mirrors.gigenet.com/alpinelinux/edge/testing
-```
+#+end_src
-```sh
+#+begin_src sh
# Add the rest of your packages
apk add linux-firmware iwd doas git curl wget
# Add yourself to the wheel group so you can use the doas command
adduser $USER wheel
-```
-
-## Window Manager (Desktop)
+#+end_src
-The [Sway installation guide](https://wiki.alpinelinux.org/wiki/Sway) has
-everything you need to get Sway working on Alpine.
+** Window Manager (Desktop)
+:PROPERTIES:
+:CUSTOM_ID: window-manager-desktop
+:END:
+The [[https://wiki.alpinelinux.org/wiki/Sway][Sway installation guide]]
+has everything you need to get Sway working on Alpine.
-However, I'll include a brief list of the commands I ran and their purpose for
-posterity here.
+However, I'll include a brief list of the commands I ran and their
+purpose for posterity here.
-```sh
+#+begin_src sh
# Add eudev and set it up
apk add eudev
setup-devd udev
@@ -120,21 +126,21 @@ apk add \ # Install optional dependencies:
swaylock swaylockd \ # lockscreen tool
swaybg \ # wallpaper daemon
swayidle # idle management (DPMS) daemon
-```
+#+end_src
-Once you have the packages installed and set-up, you need to export the
-`XDG_RUNTIME_DIR` upon login. To do this, edit your `.profile` file.
+Once you have the packages installed and set-up, you need to export the
+=XDG_RUNTIME_DIR= upon login. To do this, edit your =.profile= file.
-If you use another shell, such as `zsh`, you need to edit that shell's profile
-(e.g., `~/.zprofile`)!
+If you use another shell, such as =zsh=, you need to edit that shell's
+profile (e.g., =~/.zprofile=)!
-```sh
+#+begin_src sh
nano ~/.profile
-```
+#+end_src
Within the file, paste this:
-```sh
+#+begin_src sh
if test -z "${XDG_RUNTIME_DIR}"; then
export XDG_RUNTIME_DIR=/tmp/$(id -u)-runtime-dir
if ! test -d "${XDG_RUNTIME_DIR}"; then
@@ -142,19 +148,22 @@ if test -z "${XDG_RUNTIME_DIR}"; then
chmod 0700 "${XDG_RUNTIME_DIR}"
fi
fi
-```
+#+end_src
Once that's complete, you can launch Sway manually.
-```sh
+#+begin_src sh
dbus-run-session -- sway
-```
-
-## Personal Touches
+#+end_src
-I also added the following packages, per my personal preferences and situation.
+** Personal Touches
+:PROPERTIES:
+:CUSTOM_ID: personal-touches
+:END:
+I also added the following packages, per my personal preferences and
+situation.
-```sh
+#+begin_src sh
doas apk add brightnessctl \ # Brightness controller
zsh \ # Shell
firefox \ # Browser
@@ -164,91 +173,98 @@ doas apk add brightnessctl \ # Brightness controller
neomutt \ # CLI email client
thunderbird \ # GUI email client
gnupg # GPG key manager
-```
-
-From here, I use my Syncthing storage to pull all the configuration files I
-stored from prior desktops, such as [my
-dotfiles](https://git.sr.ht/~cmc/dotfiles).
-
-## Resolving Issues
-
-### WiFi Issues
-
-I initially tried to set up my Wi-Fi the standard way with `iwd`, but it didn't
-work.
-
-Here is what I initially tried (I did all of this as `root`):
-
-```sh
+#+end_src
+
+From here, I use my Syncthing storage to pull all the configuration
+files I stored from prior desktops, such as
+[[https://git.sr.ht/~cmc/dotfiles][my dotfiles]].
+
+** Resolving Issues
+:PROPERTIES:
+:CUSTOM_ID: resolving-issues
+:END:
+*** WiFi Issues
+:PROPERTIES:
+:CUSTOM_ID: wifi-issues
+:END:
+I initially tried to set up my Wi-Fi the standard way with =iwd=, but it
+didn't work.
+
+Here is what I initially tried (I did all of this as =root=):
+
+#+begin_src sh
apk add iwd
rc-service iwd start
iwctl station wlan0 connect <SSID> # This will prompt for the password
rc-update add iwd boot && rc-update add dbus boot
-```
+#+end_src
-Then, I added the Wi-Fi entry to the bottom of the networking interface file:
+Then, I added the Wi-Fi entry to the bottom of the networking interface
+file:
-```sh
+#+begin_src sh
nano /etc/network/interfaces
-```
+#+end_src
-```conf
+#+begin_src conf
auto wlan0
iface wlan0 inet dhcp
-```
+#+end_src
Finally, restart the networking service:
-```sh
+#+begin_src sh
rc-service networking restart
-```
+#+end_src
-My Wi-Fi interface would receive an IP address from the router, but it could
-not ping anything in the network.
-To solve the Wi-Fi issues, I originally upgraded to Alpine's `edge`
-repositories, which was unnecessary.
+My Wi-Fi interface would receive an IP address from the router, but it
+could not ping anything in the network. To solve the Wi-Fi issues, I
+originally upgraded to Alpine's =edge= repositories, which was
+unnecessary.
-Really, the solution was to enable the `NameResolvingService=resolvconf` in
-`/etc/iwd/main.conf`.
+Really, the solution was to enable the =NameResolvingService=resolvconf=
+in =/etc/iwd/main.conf=.
-```sh
+#+begin_src sh
doas nano /etc/iwd/main.conf
-```
+#+end_src
-```conf
+#+begin_src conf
[Network]
NameResolvingService=resolvconf
-```
+#+end_src
Once I finished this process, my Wi-Fi is working flawlessly.
-### Sound Issues
-
-Same as with the Wi-Fi, I had no sound and could not control the mute/unmute or
-volume buttons on my laptop.
+*** Sound Issues
+:PROPERTIES:
+:CUSTOM_ID: sound-issues
+:END:
+Same as with the Wi-Fi, I had no sound and could not control the
+mute/unmute or volume buttons on my laptop.
-To resolve this, I installed
-[pipewire](https://wiki.alpinelinux.org/wiki/PipeWire).
+To resolve this, I installed
+[[https://wiki.alpinelinux.org/wiki/PipeWire][pipewire]].
-```sh
+#+begin_src sh
# Add your user to the following groups
addgroup $USER audio
addgroup $USER video
# Install pipewire and other useful packages
apk add pipewire wireplumber pipewire-pulse pipewire-jack pipewire-alsa
-```
+#+end_src
-Finally, I needed to add `/usr/libexec/pipewire-launcher` to my
-`.config/sway/config` file so that Pipewire would run every time I launched
-sway.
+Finally, I needed to add =/usr/libexec/pipewire-launcher= to my
+=.config/sway/config= file so that Pipewire would run every time I
+launched sway.
-```sh
+#+begin_src sh
nano ~/.config/sway/config
-```
+#+end_src
-```conf
+#+begin_src conf
# Run pipewire audio server
exec /usr/libexec/pipewire-launcher
@@ -257,10 +273,10 @@ bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle
-```
+#+end_src
-Note that I do not use bluetooth or screen sharing, so I won't cover those
-options in this post.
+Note that I do not use bluetooth or screen sharing, so I won't cover
+those options in this post.
-Other than these issues, I have a working Alpine desktop. No other complaints
-thus far!
+Other than these issues, I have a working Alpine desktop. No other
+complaints thus far!