08-31-2001
Lets narrow things down: does color work at the command line? (not sure if FreeBSD supports color ls?) Try the following:
echo ^[[34mhello^[[37m
(where the sequence ^[ is produced by hitting ctrl-v then escape)
You should get the word hello printed in blue if your terminal supports color.
8 More Discussions You Might Find Interesting
1. Red Hat
i am using redhat 8.0 and trying to connect to my local port 80 to run some HTTP. i know this can easily be done with telnet localhost 80, however telnet is not running, ssh is. ssh localhost -p 80 gives me a "Connection refused" error.
i've been trying to find out more information on the web,... (3 Replies)
Discussion started by: effigy
3 Replies
2. UNIX for Dummies Questions & Answers
So... i cant get it to work.
I had already posted this but it got deleted. Details:
Im running SSH shell on Windows XP, connecting to a server whose term is vt100 (someone asked me that last time)
Im trying to get the syntax highlighting in cc mode to work in color, but its black and... (0 Replies)
Discussion started by: viejid
0 Replies
3. UNIX for Advanced & Expert Users
i'm not much of an advanced unix programmer but I'm trying to write a script to access files on box1 after ssh from box 1 to box2. when ssh is invoked in the script i'm getting logged into box2 and losing complete touch with box1 which is normal i guess.
but my main aim with my script is when i... (3 Replies)
Discussion started by: pharos467
3 Replies
4. OS X (Apple)
Hi
I'm trying to customise emacs to work within iTerm (I've aliased emacs = emacs -nw so it runs inside my shell) but I can't get the 'set-cursor-color' to work. I have the following in my .emacs file:
(set-cursor-color "LightSkyBlue") ... (0 Replies)
Discussion started by: pepperjacl
0 Replies
5. Shell Programming and Scripting
I have a file that is 20 - 80+ MB in size that is a certain type of log file.
It logs one of our processes and this process is multi-threaded. Therefore the log file is kind of a mess. Here's an example:
The logfile looks like: "DATE TIME - THREAD ID - Details", and a new file is created... (4 Replies)
Discussion started by: elinenbe
4 Replies
6. UNIX for Dummies Questions & Answers
Hi,
We are currently implementing an Identity Management application which has several Unix systems as its target system. A pre-defined connector will be installed to provide connection between the Identity Management application and the Unix target system. The connection will use Public Key... (1 Reply)
Discussion started by: tristanD
1 Replies
7. Red Hat
Ok, Im trying to get NFS working on my RHEL 5 box, apparently i can use the box as a client, but not as a server. If it helps i cant ssh into the box (server), but as a client ssh works fine. Ive configured
server:
/etc/hosts.allow:
all : all
all :all@all
setup my /etc/exports file... (4 Replies)
Discussion started by: drs.grid
4 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
I am new to this forum and a beginner in unix. Please correct me if I put the question in a wrong way..
How to use emacs editor? Also how to open existing emacs files with .cgi format?
I have the following link :-
http link i.e. url and path : /abc/xyz.dev/xyz/documents
What... (7 Replies)
Discussion started by: swathi123
7 Replies
LEARN ABOUT PHP
ncurses_has_colors
NCURSES_HAS_COLORS(3) 1 NCURSES_HAS_COLORS(3)
ncurses_has_colors - Checks if terminal has color capabilities
SYNOPSIS
bool ncurses_has_colors (void )
DESCRIPTION
Checks whether the terminal has color capabilities. This function can be used to write terminal-independent programs. ncurses must be ini-
tialized using ncurses_init(3) before calling this function.
PARAMETERS
This function has no parameters.
RETURN VALUES
Return TRUE if the terminal has color capabilities, FALSE otherwise.
EXAMPLES
Example #1
Writing a string with a specified color to the screen
<?php
ncurses_init();
// If the terminal supports colors, initialize and set active color
if (ncurses_has_colors()) {
ncurses_start_color();
ncurses_init_pair(1, NCURSES_COLOR_YELLOW, NCURSES_COLOR_BLUE);
ncurses_color_set(1);
}
// Write a string at specified location
ncurses_mvaddstr(10, 10, "Hello world! Yellow on blue text!");
// Flush output to screen
ncurses_refresh();
ncurses_end();
?>
SEE ALSO
ncurses_can_change_color(3), ncurses_start_color(3).
PHP Documentation Group NCURSES_HAS_COLORS(3)