Go back

Notes on my Linux system

2025-12-14 14:26 - 2025-12-14 19:28 (a463cb9), 4 min read
#linux

Table of Contents

Recently, I became again a daily Linux user. Using Arch Linux, btw. I was a macOS user for about 3 years, which was a good OS by the way, but I missed a lot of features which was so much easier to do on the new environment, like tiling window managers, easier workflow setup for autostart programs and a better way to manage my config using declarativeness.

This blog post here, we’ll be more about things which was useful for me somehow, and I need to record to myself for the future, if I want to come back here, in case of a distrohopping or something else. I hope it can be useful for you too.

Autorunning xinit and applying DBUS autostart

I’m using X11 (yes, not using Wayland, yet).So I did the most simple setup I could to start my i3 on a given display. For that, I added on my .zprofile:

if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then
  exec startx
fi

Then, every time I logged and my shell starts, the .zprofile will be triggered, which will run the exec startx, since both variables conditionals are true.

And, on my ~/.xinitrc, I had to start the D-Bus manually, which is required to have some things working, like the PAM/gnome-keyring and the dunst (for libnotify/notification-daemon).

For that, what I did was:

source /etc/X11/xinit/xinitrc.d/50-systemd-user.sh
 
exec dbus-launch --sh-syntax --exit-with-session i3

Autostart with Desktop Entries

Right now, I’m using the ~/.config/autostart from X11 with desktop entries to handle the autostart of some of my programs, like Redshift, for example. For example:

[Desktop Entry]
Version=1.0
Name=Redshift
_GenericName=Color temperature adjustment
_Comment=Color temperature adjustment tool
Exec=redshift
Icon=redshift
Terminal=false
Type=Application
Categories=Utility;

Adding this desktop entry, every time you start your X11 workflow, these programs will be executed. If I want to test it before, I can run this command below:

dex --autostart

Creating Autostart Systemd Services on User Land

I do have some docker containers which I’m running on my PC while on autostart. Kind of self-hosted, while I’m fixing some issues with my homelab. TIL, I can create a service on user land with systemd on the folder: ~/.config/systemd/user.

That was what I did, I’m running miniflux when I log in into my user. That’s the service file as an example:

[Unit]
Description=Miniflux docker compose flow
After=network-online.target docker.service
Wants=network-online.target
 
[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/path/to/my/miniflux/folder
ExecStart=/usr/bin/docker compose up -d
ExecStop=/usr/bin/docker compose down
TimeoutStartSec=0
 
[Install]
WantedBy=default.target

Automatically appending i3 layout + opening programs

I’d like to have some programs opening automatically when I log in into my user. And I’d like to specifically route it to a given workspace + with a specific layout.

I learned that i3 provides something for that: the i3-save-tree + append_layout config. Then, on my ~/.config/i3/config file, I did this:

assign [class="obsidian"] workspace 10
assign [class="Todoist"]  workspace 10
assign [class="Anki"]     workspace 10
 
exec --no-startup-id ~/.config/i3/start-ws10.sh

I’m assigning a rule to enforce that all windows with the class being obsidian, Todoist or Anki, will be routed directly into the workspace 10. After that, I’ll be running the script for start the programs on that workspace:

#!/bin/sh
i3-msg "workspace 10; append_layout ~/.config/i3/layouts/saved-tree.json" # that was saved by i3-save-tree
sleep 1
gtk-launch anki
gtk-launch obsidian
gtk-launch todoist
 
i3-msg "workspace 1";
i3-msg "exec ghostty";
i3-msg "exec firefox";

Fixing issues with Realtek 8852AE, my 802.11AX device

I had some issues with my Wi-Fi, we’re it sometimes started disconnecting while I was on a meeting, it was specifically happening while on meetings or video-calls, so basically looking a bit into Arch Linux forum, I saw that it could be some issue with an inconsistency with Wi-Fi 7. So what I found is that I could disable the power save mode on the device and it would work as expected.

Then, I created a file called /etc/modprobe.d/70-rtw89.conf, with the following content:

options rtw89_pci disable_aspm_l1=y disable_aspm_l1ss=y
options rtw89pci disable_aspm_l1=y disable_aspm_l1ss=y
options rtw89_core disable_ps_mode=y
options rtw89core disable_ps_mode=y

After that, I just need to reboot my PC. No more issues with my Wi-Fi networking.

On Declarativeness Config

Something which isn’t good on my config right now, it’s the way I’m doing the store of it. I really miss the fact that with Nix specifically, I do have some way to easily reproduce the same environment, and do not lose mostly of the configurations of all binaries and stuffs which I do have on my computer, like rofi, i3, my Desktop Entries, systemd services, etc.

I’m not happy with the way I’m handling it right now (without Nix), so I’ll be changing it in the next days or when I stop procrastinating it.