You are not logged in.

#1 2007-07-09 21:51:33

Intrepidus
Member
Registered: 2007-02-08
Posts: 54

Arch as a server? And colored terminal

Two questions, 1 important, 1 cosmetic and not-so-important.

The first, is Arch a good distro to build a server off of? Compared to say, Fedora? I'm not a terrible fan of FC, so I'm looking around. I've personally used Gentoo and had a good experience with it as a server, but got sick of the wait in compiling (using a lot of slower machines, 450mhz to 800mhz). Arch seems promising, and is going to be my next internal server (a rails production server).

Second, cosmetic question, after a fresh install of Arch, is there any way to get some basic colors into the terminal? So plain. Not important, but would be nice.

Offline

#2 2007-07-09 23:00:31

ProzacR
Member
Registered: 2007-04-29
Posts: 272

Re: Arch as a server? And colored terminal

Arch is good for servers. With Arch instaliation you can have exactly what you need in this way saving disk space and your time.

And about second i know this command:
setterm -fore yellow -bold on -back blue -store > /dev/ttyX (X is terminal number)
I do not know is this exactly what you want or not.

Last edited by ProzacR (2007-07-09 23:00:56)

Offline

#3 2007-07-10 12:27:40

Intrepidus
Member
Registered: 2007-02-08
Posts: 54

Re: Arch as a server? And colored terminal

Thanks for the reply.

Well, that sort of does it - but I mean more like the highlighting you get with a default Gentoo console. Color coded directories, files, etc. Helps me differentiate.

Offline

#4 2007-07-10 12:38:12

slackhack
Member
Registered: 2004-06-30
Posts: 738

Re: Arch as a server? And colored terminal

try adding alias ls='ls --color=yes' or alias ls='ls --color=auto' in ~/.bashrc.


edit: typo

Last edited by slackhack (2007-07-10 12:40:49)

Offline

#5 2007-07-10 12:58:52

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: Arch as a server? And colored terminal

alias ls='ls --color=auto' is default from install

if you want to change the PS1 variable to something more colorful and practical you can probably deduce it from this example:

# define some colors and new PS1
BLUE=`tput setf 1`
GREEN=`tput setf 2`
CYAN=`tput setf 3`
RED=`tput setf 4`
MAGENTA=`tput setf 5`
YELLOW=`tput setf 6`
WHITE=`tput setf 7`

PS1='\[$BLUE\]\u \[$YELLOW\]\w\[$CYAN\] \$\[$WHITE\] '

You coould also remove all the \[ and \] and it would work, but you would get problems when you wrote long cmdlines in which case the text would wrap wrongly.

that's in .bashrc of course.


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#6 2007-07-10 13:16:44

slackhack
Member
Registered: 2004-06-30
Posts: 738

Re: Arch as a server? And colored terminal

test1000 wrote:

alias ls='ls --color=auto' is default from install

if you want to change the PS1 variable to something more colorful and practical you can probably deduce it from this example:

# define some colors and new PS1
BLUE=`tput setf 1`
GREEN=`tput setf 2`
CYAN=`tput setf 3`
RED=`tput setf 4`
MAGENTA=`tput setf 5`
YELLOW=`tput setf 6`
WHITE=`tput setf 7`

i have color without those PS1 defines. is it maybe coming from another file? /etc/profile or something?

Offline

#7 2007-07-10 13:37:29

_adam_
Member
From: Dora, Alabama
Registered: 2006-05-18
Posts: 94

Re: Arch as a server? And colored terminal

check out the dircolors command.

Offline

#8 2007-07-10 13:38:32

Intrepidus
Member
Registered: 2007-02-08
Posts: 54

Re: Arch as a server? And colored terminal

slackhack wrote:

try adding alias ls='ls --color=yes' or alias ls='ls --color=auto' in ~/.bashrc.

Changing it from auto to yes seems to have done the trick. Thanks.

Offline

#9 2007-07-10 18:25:48

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: Arch as a server? And colored terminal

lazyquote slackhack:

yes, it's coming from somewhere atleast tongue

(iof you want you can do a grep -R PS1 /etc/ to see the various palces)


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

Board footer

Powered by FluxBB