Skip to content

u/LiveLM

In this archive from Aug 2016 to May 2023

2
posts
116
comments
2
media
1.5k
score

I don't get it either.
The system maintenance page on the wiki clearly tells you to read the Arch website before updating, yet something import like this still isn't there.

Read before upgrading the system
Before upgrading, users are expected to visit the Arch Linux home page to check the latest news, or alternatively subscribe to the RSS feed or the arch-announce mailing list.

21 points

Sure!
Just keep in mind that:
This script is very simple. All it does is run some commands, pipe some values to files and sed some stuff. Has lots of hardcoded things and has no safeguards (aka running it twice, or interrupting it while running it will break things!). If you decide to run this, do so in a VM. I'm not experienced in bash. This script does some things in very weird, janky, dumb and possibly unsafe manner. You can probably come up with something a thousand times more robust than this.

Here's the script.

Notes
Create user:
Runs 'passwd' which asks for your password interactively. Felt safer than just putting it directly in the script.

Sudo:
Sets sudo to never timeout while waiting for a password. Very handy.
Editing the sudoers file without Visudo is a terrible idea, but I figured that if something went wrong I could use the root account to fix it, right? ¯\_(ツ)_/¯

Disabling makepkg package compression:
While package compression works fine on my main computer, it makes installing some packages like Zoom very slow on my low-end laptop. I figured I didn't need it enabled on the Main Rig and the tradeoff wasn't worth it on the other machine so I just disabled it altogether. YMMV.

Setting up yay:
Makepkg can't be run as root, so I had to use Sudo to log into my newly created user to then run Makepkg to install yay. Janky.

Limiting Journald log size:
The laptop was running low on space on the boot disk, so while looking through things to clear I found out about the Systemd journal.
It's limited to 4GB, and while that's not too big, I was strapped for space. On top of that, while looking through the logs, I realized Systemd was storing logs that were many months old. Very useful for servers but pretty useless for me.
I've limited my logs to 200MB here but Systemd also allows you to limit them by age, which is the smarter thing to do.

Pacman cache cleanup hook:
Small hook to clean the pacman cache., created to address the low space of the laptop I mentioned. You can just install pacman-cleanup-hook from the AUR but I like to create my own to use different settings.

Setting up aliases:
Just pipes a bunch of aliases I use onto .bashrc. There are better ways to do this but I like having the aliases embedded inside this script.

Disabling KWallet:
Small KDE annoyance disabled with a config file so I don't have to download the config app. The .config folder is created and then chmodded as the regular user because if you don't, only root will be able to write there, breaking pretty much all the apps.

Hope you find something useful in this heap of spaghetti.

2 points

While the installation process itself is fairly simple and straightforward, what to do afterwards often isn't. I keep forgetting which services to activate

Yeah, me too. I make tweaks and completely forget they're there until I get a clean install and start missing them.
I ended up making a 'Post Install' bash script. Basically I just set install Arch (the regular way, I don't want to mess with automated installs), boot my system and run the script. It then installs the packages I want, does my tweaks sets up my user, etc.

1 points

The Steam sales were great for me!
Picked up The Talos Principle and Alien: Isolation.
Also picked up The Silent Age, for like a buck. Having played the first chapter of the game on my phone, it was too good of a deal to pass up

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.