Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

New install of Fedora 28... terminal missing customization variables?

Hi -I would like someone to explain how things works in terms of initializing the (interactive) terminal session with variables like PS1 and PROMPT_COMMAND.

I installed basic Fedora 28 with Gnome, did a few modifications (dash to dock, add shortcut for <ctr>+<alt>+<t>, etc.) and I notice that unlike my other system, the terminal for my main user ID just says "Bash>" in plain white letters. The Title Bar just says "terminal".

When I started out, I the prompt was behaving similarly for "root" sessions in terms of color, but the title bar would switch to the more conventional <user>@<host>:<cwd>.

I started by looking at /etc/bashrc, which directed me to make a custom.sh file in the /etc/profiles.d directory... which I did using a simple conditional script to set PS1 to one thing for UID not equal to 0, and another thing for UID is zero (root). Turns out things behaved kinda kooky, like if I want a red prompt after sudo su, I had to put that in /etc/profiles.d/custom.sh under the "user is NOT equal to root" section. Meanwhile the color for the current session user had to be set in ~/.bashrc

So (1) how does this work, and (2) where is the stuff that is changing the title bar when I sudo su?

I have things in a usable state presently, but still there is fancy color formatting for output of things like "ls" when I am elevated to root by sudo su that do not display when I am just plunking along in a non-elevated status. So how would I get those fancy color schemes for my regular users as well?