You are not logged in.
Pages: 1
i have been running an arch web server in virtualbox and i have it set to only use runlevel 3, no gui at all. i set colors in my ~/.bashrc file according to the wiki and i dont get the color. i have it setup for a different color if i connect via SSH which shows normally. i have the lines set correctly and have them even in another real arch install but no luck on this VM. any ideas why this would be happening?
Last edited by newarch2011 (2011-10-30 01:10:25)
Offline
can you show your ~/.bashrc?
Offline
Here is the code from the machine in question. I do have another machine with the same thing, just different colors, and it works fine though the second machine does use LXDE.
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
txtclr='\e[0m'
txtblue='\e[0;34m'
txtbblue='\e[0;94m'
HISTCONTROL=ignoreboth
alias ls='ls --color=auto'
if [ -n "$SSH_CLIENT" ]; then
PS1="\[$txtblue\][\u@\h \W]\$ \[$txtclr\]"
else
PS1="\[$txtbblue\][\u@\h \W]\$ \[$txtclr\]"
fiLast edited by newarch2011 (2011-10-30 15:28:58)
Offline
Try adding the following to ~/.bash_profile:
[[ -f "$HOME/.bashrc ]] && . "$HOME/.bashrc"From deep in the very long manual (I don't blame you for not reading it).
When bash is invoked as an interactive login shell, or as a non-interactive
shell with the --login option, it first reads and executes commands from
the file /etc/profile, if that file exists. After reading that file, it
looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order,
and reads and executes commands from the first one that exists and is read‐
able. The --noprofile option may be used when the shell is started to
inhibit this behavior.
When an interactive shell that is not a login shell is started, bash reads
and executes commands from ~/.bashrc, if that file exists. This may be
inhibited by using the --norc option. The --rcfile file option will force
bash to read and execute commands from file instead of ~/.bashrc.
Offline
Try adding the following to ~/.bash_profile:
[[ -f "$HOME/.bashrc ]] && . "$HOME/.bashrc"From deep in the very long manual (I don't blame you for not reading it).
When bash is invoked as an interactive login shell, or as a non-interactive
shell with the --login option, it first reads and executes commands from
the file /etc/profile, if that file exists. After reading that file, it
looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order,
and reads and executes commands from the first one that exists and is read‐
able. The --noprofile option may be used when the shell is started to
inhibit this behavior.When an interactive shell that is not a login shell is started, bash reads
and executes commands from ~/.bashrc, if that file exists. This may be
inhibited by using the --norc option. The --rcfile file option will force
bash to read and execute commands from file instead of ~/.bashrc.
I am not understanding what that manual is stating. Am I not using an interactive shell?
Offline
After searching a bit more, it appears that ssh shells are also login shells so something is probably sourcing your ~/.bashrc and my answer doesn't apply. In response to your last post, you are using an interactive login shell. Bash only sources ~/.bashrc for non-login interactive shells (second quote).
Offline
add
echo something
to the end of your ~/.bashrc and see whether it is really echoed or not, so that you'll be sure that ~/.bashrc is or is not executed
Offline
Put the following in ~/.bash_profile: source ~/.bashrc
Offline
Pages: 1