LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 04-30-2007, 11:00 AM   #1
dukegeo
LQ Newbie
 
Registered: Apr 2007
Posts: 5

Rep: Reputation: 0
Solaris and colored text


I would like to get colored text on a black background (as is usual with LINUX) in my Solaris terminal windows.

We have a bash shell binary installed and it is fuctional but ...
eval `dircolors`
returns not found

I tried
find dircolors
but it returned - find: cannot open dircolors: No such file or directory

Please advise,
dukegeo
 
Old 04-30-2007, 11:49 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Try setting:

Code:
LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;0
1:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.b
tm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:
*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*
.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;3
5:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:
then:

ls --color=tty /somedir/
 
Old 04-30-2007, 02:16 PM   #3
dukegeo
LQ Newbie
 
Registered: Apr 2007
Posts: 5

Original Poster
Rep: Reputation: 0
I tried the code two ways and got errors. Please let me know what I'm doing wrong.

First way:
I tried pasting in at the command line after executing bash:
/home/taylstet> bash
bash-2.00$ LS_COLORS=no=00:fi=00:di=01;34:ln=01;36i=40;33:so=01;35:bd=40;33;01:cd=40;33;0
bash: 34:ln=01: command not found
bash: 36i=40: command not found
bash: 33:so=01: command not found
bash: 35:bd=40: command not found
bash: 33: command not found
bash: 01:cd=40: command not found
bash: 33: command not found
bash: 0: command not found
bash-2.00$ 1r=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.b
bash: 1r=01: command not found
bash: 05: command not found
bash: 37: command not found
bash: 41:mi=01: command not found
bash: 05: command not found
bash: 37: command not found
bash: 41:ex=01: command not found
bash: 32:*.cmd=01: command not found
bash: 32:*.exe=01: command not found
bash: 32:*.com=01: command not found
bash: 32:*.b: command not found
bash-2.00$ tm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:
bash: 32:*.bat=01: command not found
bash: 32:*.sh=01: command not found
bash: 32:*.csh=01: command not found
bash: 32:*.tar=01: command not found
bash: 31:*.tgz=01: command not found
bash: 31:*.arj=01: command not found
bash: 31:: command not found
bash-2.00$ *.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*
bash: *.taz=01: command not found
bash: 31:*.lzh=01: command not found
bash: 31:*.zip=01: command not found
bash: 31:*.z=01: command not found
bash: 31:*.Z=01: command not found
bash: 31:*.gz=01: command not found
bash: 31:*.bz2=01: command not found
bash: 31:*: command not found
bash-2.00$ .bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;3
bash: .bz=01: command not found
bash: 31:*.tz=01: command not found
bash: 31:*.rpm=01: command not found
bash: 31:*.cpio=01: command not found
bash: 31:*.jpg=01: command not found
bash: 35:*.gif=01: command not found
bash: 35:*.bmp=01: command not found
bash: 3: command not found
bash-2.00$ 5:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:

Second way:
I pasted the code in to a .bashrc file but got basically the same erros but from the korn shell

/home/taylstet> . .bashrc
/bin/ksh: 34:ln=01: not found
/bin/ksh: 36i=40: not found
/bin/ksh: 33:so=01: not found
/bin/ksh: 35:bd=40: not found
/bin/ksh: 33: not found
/bin/ksh: 01:cd=40: not found
/bin/ksh: 33: not found
/bin/ksh: 0: not found
/bin/ksh: 1r=01: not found
/bin/ksh: 05: not found
/bin/ksh: 37: not found
/bin/ksh: 41:mi=01: not found
/bin/ksh: 05: not found
/bin/ksh: 37: not found
/bin/ksh: 41:ex=01: not found
/bin/ksh: 32:*.cmd=01: not found
/bin/ksh: 32:*.exe=01: not found
/bin/ksh: 32:*.com=01: not found
/bin/ksh: 32:*.b: not found
/bin/ksh: 32:*.bat=01: not found
/bin/ksh: 32:*.sh=01: not found
/bin/ksh: 32:*.csh=01: not found
/bin/ksh: 32:*.tar=01: not found
/bin/ksh: 31:*.tgz=01: not found
/bin/ksh: 31:*.arj=01: not found
/bin/ksh: 31:: not found
/bin/ksh: *.taz=01: not found
/bin/ksh: 31:*.lzh=01: not found
/bin/ksh: 31:*.zip=01: not found
/bin/ksh: 31:*.z=01: not found
/bin/ksh: 31:*.Z=01: not found
/bin/ksh: 31:*.gz=01: not found
/bin/ksh: 31:*.bz2=01: not found
/bin/ksh: 31:*: not found
/bin/ksh: .bz=01: not found
/bin/ksh: 31:*.tz=01: not found
/bin/ksh: 31:*.rpm=01: not found
/bin/ksh: 31:*.cpio=01: not found
/bin/ksh: 31:*.jpg=01: not found
/bin/ksh: 35:*.gif=01: not found
/bin/ksh: 35:*.bmp=01: not found
/bin/ksh: 3: not found
/bin/ksh: 5:*.xbm=01: not found
/bin/ksh: 35:*.xpm=01: not found
/bin/ksh: 35:*.png=01: not found
/bin/ksh: 35:*.tif=01: not found
/bin/ksh: 35:: not found
/home/taylstet>
 
Old 04-30-2007, 02:24 PM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
It's a single line wrapped; you need to join them.
 
Old 04-30-2007, 02:34 PM   #5
dukegeo
LQ Newbie
 
Registered: Apr 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Ok. I joined the lines in .bashrc so it looks as follows (except the LS_COLORS statement is all on one line
# .bashrc
LS_COLORS=no=00:fi=00:di=01;34:ln=01;36i=40;33:so=01;35:bd=40;33;01:cd=40;33;01r=01;05;37;41:mi= 01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01 ;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz =01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;3 5:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:
alias ls='ls $LS_COLORS'

but got the following errors:
/bin/ksh: 34:ln=01: not found
/bin/ksh: 36i=40: not found
/bin/ksh: 33:so=01: not found
/bin/ksh: 35:bd=40: not found
/bin/ksh: 33: not found
/bin/ksh: 01:cd=40: not found
/bin/ksh: 33: not found
/bin/ksh: 01r=01: not found
/bin/ksh: 05: not found
/bin/ksh: 37: not found
/bin/ksh: 41:mi=01: not found
/bin/ksh: 05: not found
/bin/ksh: 37: not found
/bin/ksh: 41:ex=01: not found
/bin/ksh: 32:*.cmd=01: not found
/bin/ksh: 32:*.exe=01: not found
/bin/ksh: 32:*.com=01: not found
/bin/ksh: 32:*.btm=01: not found
/bin/ksh: 32:*.bat=01: not found
/bin/ksh: 32:*.sh=01: not found
/bin/ksh: 32:*.csh=01: not found
/bin/ksh: 32:*.tar=01: not found
/bin/ksh: 31:*.tgz=01: not found
/bin/ksh: 31:*.arj=01: not found
/bin/ksh: 31:*.taz=01: not found
/bin/ksh: 31:*.lzh=01: not found
/bin/ksh: 31:*.zip=01: not found
/bin/ksh: 31:*.z=01: not found
/bin/ksh: 31:*.Z=01: not found
/bin/ksh: 31:*.gz=01: not found
/bin/ksh: 31:*.bz2=01: not found
/bin/ksh: 31:*.bz=01: not found
/bin/ksh: 31:*.tz=01: not found
/bin/ksh: 31:*.rpm=01: not found
/bin/ksh: 31:*.cpio=01: not found
/bin/ksh: 31:*.jpg=01: not found
/bin/ksh: 35:*.gif=01: not found
/bin/ksh: 35:*.bmp=01: not found
/bin/ksh: 35:*.xbm=01: not found
/bin/ksh: 35:*.xpm=01: not found
/bin/ksh: 35:*.png=01: not found
/bin/ksh: 35:*.tif=01: not found
/bin/ksh: 35:: not found
/home/taylstet> dtpad .bashrc
 
Old 04-30-2007, 04:15 PM   #6
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Semi-colons (';') are line delimiters in shell. You need to escape them (\;) or place the string in single quotes (not accent quotes).

Last edited by macemoneta; 04-30-2007 at 04:18 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Colored Text in Terminal Window griffey Red Hat 3 04-30-2007 12:40 PM
multi-colored unreadable text on LCD monitor gurulocu Linux - Software 3 01-28-2005 07:56 PM
text editors for solaris sunOs 5.9 ranger225 Solaris / OpenSolaris 1 11-30-2004 01:42 AM
colored text in boot messages patrickdonohue Debian 1 05-04-2004 08:43 PM
Colored black text with XF86 4.3.0, Kde and RH9 using nvidia drivers tobz Linux - Hardware 1 10-28-2003 09:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 10:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration