0

I was following some direction for emacs and jshint install from here: Stanford startup course link

I initially ran into some trouble after launching emacs, where I began switching between tabs but I couldn't understand what was happening (I was "stuck" in one tab and couldn't get out of it). So I opened up a new Terminal window and connected back to the EC2 instance on AWS.

All of a sudden, instead of text being all yellow, the username@ip (e.g. ubuntu@XX.XXX.XXX) is showing up in purple, while the rest of the text is still yellow.

I have no idea if this is related, but after this, when I tried:

install npm install -g jshint

it gave me a bunch of error messages.

I've tried

sudo chown -R $(whoami) ~/.npm

in an attempt to change the ownership status of the npm folder but still I get the same errors.

When I open a new Terminal window, the color of text is yellow like normal but as soon as I connect to the EC2 instance, the [ubuntu@xx.xxx.xxx:~]$ becomes purple/blue again.

Can someone please help?

cat ~/.profile
# ~/.profile: executed by the command interpreter for login shells.                                                                                                      
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.                                                                                                                                                                
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
        . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi
r8bj3k
  • 11
  • 4
  • after login, could you please paste the file content here for reference `cat ~/.profile`, `cat ~/.bashrc`, `cat ~/.bash_profile` – BMW Dec 28 '14 at 09:46
  • I posted cat ~/.profile but cat~/.bashrc and ~/.bash_profile prints a bunch of things and they look pretty much identical to each other? – r8bj3k Dec 28 '14 at 11:27
  • ok, there is no color setting in .profile, what's the output of `~/.bashrc`? – BMW Dec 28 '14 at 12:00
  • 1
    *"it gave me a bunch of error messages."* ... okay, and what did they say? – Michael - sqlbot Dec 28 '14 at 13:37
  • I've been able to get rid of the errors for install npm (using sudo). It seems that the course lecturer also experiences the color change but he doesn't explain. I suppose this is just normal part of behavior, somehow related to either emacs or something that else he instructed us to install. – r8bj3k Dec 29 '14 at 03:43
  • Possible duplicate of [change bash terminal output color while running Ruby script](https://stackoverflow.com/questions/15974716/change-bash-terminal-output-color-while-running-ruby-script) – Paul Sweatte Aug 09 '17 at 16:33

0 Answers0