this post was submitted on 24 Mar 2025
17 points (90.5% liked)
Linux
52777 readers
644 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
The
&
is an indicator to most shells to run this command in "the background". Try and run( sleep 10; echo hi ) &
- you'll see you get your shell prompt back, where you can run more commands, but 10 second later you'll see that 'hi' come through. 'blocking' is the default behavior, if you don't add the&
you're still going get the hi in ten seconds, but you don't get a prompt because your shell's execution is blocked until your command is done.The doc here is indicating that you havea choice between
autostart_blocking.sh
andautostart.sh
, the latter of which would be run with a&
. They could have expressed this better.As for why your script didn't work, I'd try executing it in a terminal to see what error message comes up.
i see, so the file names are:
autostart_blocking.sh
andautostart.sh
I dont need to create a weird file name like:
autostart.sh &
But, whichever command I put in
autostart.sh
will run as if I run in terminal with the&
sign. E.g:dunst &
to run in the background.Well, only if it's one single command, if you have multiple commands inside of the script, they will still run sequentially (the next command will only run after the previous one completely closes) unless you add
&
to them as well.The difference is that dwm itself will not have to wait for the
autostart.sh
to complete before launching itself (thanks to it being run in the background with&
)However,
autostart_blocking.sh
(which isn't run with a&
) will stop dwm from fully launching until the script completes.. I guess this is useful if you need certain things to be set up before dwm actually starts.. but it would potentially add a delay on dwm startup.