Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am looking to see if there is a way to implement the solarized them through just a .bashrc file. Would it be possible to do so? Has anyone tried this before?

I guess I would start by modifying something similar to this:

 PS1='${debian_chroot:+($debian_chroot)}\[\033[01;35m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
share|improve this question

2 Answers 2

As a general practice, I try to keep this level of configuration in my Terminal Emulator. At most, I only use 2-3 Terminal Emulators (Terminal.app on my Mac, Gnome-terminal on my Linux machine, maybe something in PuTTY), so there are only 2-3 configurations to worry about.

Bashisms, and especially bash-colorisms have many tiny differences from OS to OS, Bash version to bash version and user to user (Are you going to use the same .bashrc for yourself and for root? On all systems? Probably not.) If you manage many systems, this solution becomes unscalable.

There will be many little tweaks to get this working on all of the hosts that you use, and it's difficult to keep .bashrc/.bash_profile in sync on all of those systems. Although "Get Settled in Quickly with movein.sh" can help you here.

Also see Colorizing your terminal and shell environment? on http://unix.stackexchange.com.

share|improve this answer

This is a color scheme, so your question doesn't really make sense. An application can use the color scheme to select which colors to display: I see terminal emulators for each platform are already covered, so using those would work. And I also see that there's support for most coding applications that use colored syntax highlighting: vim, emacs, Xcode, Visual Studio among others.

Setting colors in a bashrc doesn't make sense. Your example is selecting colors out of a palette to colorify parts of the bash prompt. The solarized theme is the color palette; you can do what you want with it after it's configured.

If you'd like to set up the palette in gnome-terminal or Eterm, nothing's stopping you from doing so. But you can't set a palette in your bashrc.

share|improve this answer
1  
i connect to various servers, some are coloured and some not. I was presumed this was due to the .bashrc config, however this assumption may be wrong. I use various different servers, applications and OSs. I was wanting to make a .bashrc file for my dev server only. –  Ross Jul 21 '11 at 21:49
    
When you have a PS1 setting that's colorized, it's done with ANSI escape codes. You can use your terminal to specify what, say, a bold green should be displayed as. Within bash, you're limited to the options at that link –  Michael Lowman Jul 22 '11 at 0:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.