'export TERM=xterm-color' pretty much screws up clear command

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers 'export TERM=xterm-color' pretty much screws up clear command
# 1  
'export TERM=xterm-color' pretty much screws up clear command

I like using VIM with color tagging (using putty to SunOS). However, when I do an "export TERM=xterm-color", I can't make use of the clear command. Clear just has the same effect as pressing enter now. How can I fix this?

Also, does anyone know how to get the directories and file colors when I do an ls command? I don't have administrative privileges. I can create/edit files within my home directory though (like .profile and .bashrc).

One more thing, I've noticed that my long commands don't wrap around the console. It manages to wrap on the same line and writes over words. It's weird. How do I fix this? I have tried (.bashrc):

[ -z "$PS1" ] && return

#instead of wrapping onto the start of the same line.
shopt -s checkwinsize

Last edited by mrwatkin; 07-10-2009 at 10:03 AM..
# 2  
1. Try xterm-ansi or just ansi. There's also a way to download a termlib entry and use it yourself, but I don't know how with Solaris. What version of Solaris?

2. Get gnu ls and build it with color support. Install it in ~/bin and set your PATH to include that directory before any others. Then create an environment variable called "LS_COLORS". Here's mine:

(Remove newlines and spaces). Directories are bright-yellow rather than dark blue, which I found hard to read on dark backgrounds.

Then alias or functionize your ls command thusly:
alias ls="/bin/ls --color=auto"

which will turn it on normally, but leave it off when piped to a command, like less. If you want to really get fancy, check out this post -- ls is replaced by a function in such a way that if the directory listing is actually more than a page, less is used. Color is always enabled if piped through less, which is enabled to show it in that case, but if going through a pipe, the standard ls command is used.
# 3  
I tried the LS_COLORS before, but we don't have GNU ls and I don't have the permissions to install it. Oh well. xterm-ansi didn't do it either. Thanks for the suggestions though.
# 4  
we don't have GNU ls and I don't have the permissions to install it
Grrr... of course you do! Just install it into your $HOME/bin directory!

When you do your configure step, you can do something like:
./configure --prefix=$HOME
# 5  
Well, there is no gcc, g++, or cc installed. So nope, I don't have permission to even compile such a thing.
# 6  
Do you have tcsh? You can edit .tcshrc and place "set color" and "set colocat"
Google it.

Last edited by nj78; 07-13-2009 at 08:20 PM.. Reason: wrong info
# 7  
You can use the opensolaris/sfw packages to install GNU coreutils. For info on how to install these packages in your home directory, see the solutions for FAQ: question 7.

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #935
Difficulty: Medium
A fixed 32-bit data format for system time means that timestamps rolls over approximately every 136 years, with the first such occurrence on 7 February 2036.
True or False?

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Regarding passwd command - Pretty urgent

Can any one please help me for the following :mad: i'm searching for an alternative command in linux for passwd -as (which is in solaris) but in linux there is an option "-S" which gives the status of only one user for listing all the user i cudn't find any alternative this "passwd -as" in... (0 Replies)
Discussion started by: sabee.prakash
0 Replies

2. Shell Programming and Scripting

.bashrc/PS1 command color different color to command output

I have been configuring my .bashrc PS1 to be displayed with some nice colors and in a format that I like, however there is one thing that I cannot figure out (or know if it's even possible). my PS1 line is as follows: export PS1='\\u\@\\h\:\\w\n\\$ \'This makes the command and command output... (0 Replies)
Discussion started by: jelloir
0 Replies

3. UNIX for Advanced & Expert Users

Changing text color in existing xterm or dtterm

On solaris and irix systems, I'm using csh in an existing xterm or dterm and would like to change the text colors. How do I accomplish this? Thanks (1 Reply)
Discussion started by: fjc
1 Replies

4. UNIX for Dummies Questions & Answers

export script commands with xterm

I am attempting to write a shell script that runs a program which generates data and then runs another program to plot the data. The problem is that I need the plotting to take place in a different terminal window that stays open after the plotting has finished. I have experimented 'xterm -e '... (1 Reply)
Discussion started by: chris2051
1 Replies

5. Solaris

How to set color in the xterm

Hello Friends, I am using solaris 10 operating system. I would like to know how to use the xterm color in it. I am trying this command:- xterm -bg color, but it is giving this talc:/home/ania {ania} xterm -bg color 21469 -bg: Command not found. What should i do? Can u help me... (3 Replies)
Discussion started by: asirohi
3 Replies

6. Shell Programming and Scripting

Search term and output term in desired field

Hi All, I have an input_file below and i would like to use Perl to search for the term "aaa" and output the 3rd term in the same row as "aaa".For Example, i want to search for the term "ddd" and would want the code to ouput the 3rd term in the same row which is "fff". Can somebody help ? ... (28 Replies)
Discussion started by: Raynon
28 Replies

7. UNIX for Dummies Questions & Answers

how to disable color text in xterm window

Hello, Anyone knows how to disable color text displayed on xterm window screen? I hate that color making me hard to read when front and background color are similar. Thanks, M. (1 Reply)
Discussion started by: modemer
1 Replies

8. UNIX for Advanced & Expert Users


Hi all, Can someone explain to me what xterm-color is? I do most of my coding on Emacs over telnet sessions with my school's server, and I recently discovered that if I set TERM=xterm-color in my environment, then emacs will will send colored syntax highlighting over telnet. That's great,... (4 Replies)
Discussion started by: lantern
4 Replies

9. Programming

Create a Term & Run chars on this Term

hi floks ! i'd like to know how can i transmete a character or a string from my source code to a term and make it interpret or un by the shell wich is running in my term. I'd like to create a Term from my code (and get its file descriptor) and then transmete each char typed on the keyboard to... (1 Reply)
Discussion started by: the_tical
1 Replies

Featured Tech Videos