this post was submitted on 24 Dec 2024
323 points (96.3% liked)

Programmer Humor

19879 readers
300 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
323
submitted 1 week ago* (last edited 1 week ago) by [email protected] to c/programmer_humor
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 56 points 1 week ago (3 children)

Weird that it doesn't work. The usual way to run scripts on startup is through systemd units though. That has the added benefits of automatically logging all output and letting you control it through commands like systemctl enable <unit name>. It's a really neat system, and I highly recommend learning it if you see yourself doing this kind of automation more often.

[–] [email protected] 18 points 1 week ago (2 children)

You can also get cron to do it.

[–] [email protected] 9 points 1 week ago (1 children)

I miss the days of just sticking it in /etc/rc.local

[–] [email protected] 1 points 1 week ago

Hey everyone, get a load of this fool drinking from an I ♥️ SYSV mug! Ha!

hides Lennart Pottering dartboard while everybody's distracted

[–] ulterno 1 points 1 week ago (1 children)

I do that when I want it running with root privileges.
In case of user privileges though, the autostart is a better idea.

[–] dbx12 2 points 1 week ago (1 children)

You was m can use user units too if you want them scoped to your user.

[–] ulterno 0 points 1 week ago

Yeah, I forgot to tell the full thing.
In case of User Privs and GUI. That is much easier to do by just adding it to Autostart.

[–] [email protected] 1 points 1 week ago

The usual way to run scripts on startup is through systemd units though.

Even worse than via some utility of your window manager