FryGuy Posted October 28, 2019 Share Posted October 28, 2019 (edited) Looking at customizing bash colors. I'm not sure how to get it to stick. I have a .bashrc with; PS1="\[\033[0;31m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]root\[\033[01;33m\]@\[\033[01;96m\]\h'; else echo '\[\033[0;39m\]\u\[\033[01;33m\]@\[\033[01;96m\]\h'; fi)\[\033[0;31m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;31m\]]\n\[\033[0;31m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]\[\e[01;33m\]\\$\[\e[0m\]" This is from https://github.com/flipsidecreations/dotfiles I just love the look of this. This works if i then type "bash" after login but not at login. Not sure if it will survive a boot being in the home dir. Any guidance will be apreciated. Edited October 28, 2019 by FryGuy Quote Link to comment
FryGuy Posted October 29, 2019 Author Share Posted October 29, 2019 I added the .bash* files in the /root with the bash_aliases, .bash_exports, .bash_profile, .bash_wrappers, .bashrc files from https://github.com/flipsidecreations/dotfiles with my changes. This is working now on first login with my non-root user. Not the behaviour i expected. I figured that bash would get its config from the logged in users home dir. Not sure if this will surrive a reboot yet. Quote Link to comment
itimpi Posted October 29, 2019 Share Posted October 29, 2019 (edited) If you want any such change to survive a reboot then you need to make a copy of the file(s) on the flash drive and add an entry to the ‘config/go’ file on the flash drive to copy it into position (and potentially set correct permissions) as part of the system start up process. Since Unraid does not support traditional users in the Linux sense not sure what you have done to allow you to log in with a non-root user. Edited October 29, 2019 by itimpi Quote Link to comment
FryGuy Posted October 29, 2019 Author Share Posted October 29, 2019 6 hours ago, itimpi said: If you want any such change to survive a reboot then you need to make a copy of the file(s) on the flash drive and add an entry to the ‘config/go’ file on the flash drive to copy it into position (and potentially set correct permissions) as part of the system start up process. Since Unraid does not support traditional users in the Linux sense not sure what you have done to allow you to log in with a non-root user. I worded that wrong, non-root user as in not root user name, however. I used the "Users" under "Settings" and the user isnt part of the root or adm when I check groups, so thats non-root? config/go file I'll try that out. thnak you. First time poking around under the hood. Is there any detailed system documentaion? (not user documentation) Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.