glibg10b/ltt-linux-challenge-issues

Alternative solution for the apt command on Manjaro issue

Closed this issue · 3 comments

Instead of creating a warning for every package manager out there, Perhaps a welcome message in the terminal would be a better solution? its just a matter of editing the ~/.bashrc script, and add an echo command at the beginning of the script:

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

echo "Welcome to Manjaro GNOME 21.1.6."
echo -e "To install a package, type \033[1;32m\"sudo pacman -Syu <package name>\"\033[1m"
\""

The end result should be able to get the point across. Opening a new terminal window shows the following:
Screenshot from 2021-12-05 15-26-45

If this is the case, as a power user, I wouldn't want it running every time I open a shell (you could touch a file somewhere to hide it).

On the other hand, if I were a new user, I'd want that run every time. Plus, a power user could easily remove it.

On the other other hand, a new user shouldn't ever need to use the command line.

This is not the way I would do this. The terminal shouldn't vomit instructions about how to do everything on every startup. What should exist is a package noob-friendly-stuff or something, in Manjaro's repos or just system-locally-installed by default, which creates a /bin/apt which has some nooby help for new users.

I created a pacman-noob-tutorial script for this purpose and was going to put this on the AUR before realizing no one who knows what the AUR is needs this script.

The problem with a bashrc message is that, even if it wasn't annoying, a user ignoring stuff and just pasting commmands still won't be able to tell what is wrong. Also, we shouldn't use bashrc aliases for this like Garuda Linux does, because (a) you're packaging stuff into user's $HOME which should be avoided if ever possible, and (b) you're not able to create aliases for sudo commands which almost all package manager commands will be.

I know my script needs a lot of work, parts of it just suck, but I think it is a much better solution at least than the one proposed here.

@magnus-ISU The Ubuntu TTY message:
external-content duckduckgo
...is much longer than this. Besides, the message can tell you how to remove it for subsequent invocations