LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 12-19-2011, 06:36 AM   #1
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Rep: Reputation: 85
yum.conf


yum has a --color option. How can I enable that in yum.conf instead of using the option each time?
 
Old 12-19-2011, 07:44 AM   #2
elp
Member
 
Registered: Aug 2003
Posts: 66

Rep: Reputation: 16
Not an answer, but how do I use --color option?
 
Old 12-19-2011, 01:53 PM   #3
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
well,
there is a "yum.conf" file in /etc (on RHEL based distro's)

inside which you define the color option:
Code:
# vim  /etc/yum.conf

[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
color=on
which produces some coloured output (man yum.conf or man yum)
Code:
yum info php --enablerepo=php52
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * base: ftp.arnes.si
Installed Packages
Name       : php
Arch       : i386
Version    : 5.2.17
Release    : 1.1.w5
Size       : 3.0 M
Repo       : installed
Summary    : The PHP HTML-embedded scripting language. (PHP: Hypertext Preprocessor)
URL        : http://www.php.net/
License    : PHP
Description: PHP is an HTML-embedded scripting language. PHP attempts to make it
           : easy for developers to write dynamically generated webpages. PHP also
           : offers built-in database integration for several commercial and
           : non-commercial database management systems, so writing a
           : database-enabled webpage with PHP is fairly simple. The most common
           : use of PHP coding is probably as a replacement for CGI scripts.
           : 
           : The php package contains the module which adds support for the PHP
           : language to Apache HTTP Server.

Available Packages
Name       : php
Arch       : i386
Version    : 5.3.8
Release    : 1.w5
Size       : 1.3 M
Repo       : php52
Summary    : PHP scripting language for creating dynamic web sites
URL        : http://www.php.net/
License    : PHP
Description: PHP is an HTML-embedded scripting language. PHP attempts to make it
           : easy for developers to write dynamically generated web pages. PHP also
           : offers built-in database integration for several commercial and
           : non-commercial database management systems, so writing a
           : database-enabled webpage with PHP is fairly simple. The most common
           : use of PHP coding is probably as a replacement for CGI scripts.
           : 
           : The php package contains the module which adds support for the PHP
           : language to Apache HTTP Server.
What colours mean you can find some info here or maybe some googling.

If you don't see the colours you can enable the option via command line to test, with:
Code:
# yum info vim* --color=on 

or disabled colours:
# yum info vim* --color=off
and if you have ANSI terminal connected you should see colours.

Last edited by lithos; 12-19-2011 at 02:02 PM.
 
Old 12-21-2011, 09:01 AM   #4
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Original Poster
Rep: Reputation: 85
Code:
╭─[~/.apps/android-sdk-linux]─[bull@beastlinux]─[0]─[492]
╰─[:)] % yum info vim* --color=on
zsh: no matches found: vim*
╭─[~/.apps/android-sdk-linux]─[bull@beastlinux]─[1]─[493]
╰─[:(] % yum info php --enablerepo=php52
Loaded plugins: downloadonly, langpacks, presto, refresh-packagekit


Error getting repository data for php52, repository not found
╭─[~/.apps/android-sdk-linux]─[bull@beastlinux]─[1]─[494]
╰─[:(] % yum info php
Loaded plugins: downloadonly, langpacks, presto, refresh-packagekit
Available Packages
Name        : php
Arch        : i686
Version     : 5.3.8
Release     : 3.fc16
Size        : 2.3 M
Repo        : fedora
Summary     : PHP scripting language for creating dynamic web sites
URL         : http://www.php.net/
License     : PHP
Description : PHP is an HTML-embedded scripting language. PHP attempts to make it
            : easy for developers to write dynamically generated web pages. PHP also
            : offers built-in database integration for several commercial and
            : non-commercial database management systems, so writing a
            : database-enabled webpage with PHP is fairly simple. The most common
            : use of PHP coding is probably as a replacement for CGI scripts.
            :
            : The php package contains the module which adds support for the PHP
            : language to Apache HTTP Server.

Name        : php
Arch        : x86_64
Version     : 5.3.8
Release     : 3.fc16
Size        : 2.3 M
Repo        : fedora
Summary     : PHP scripting language for creating dynamic web sites
URL         : http://www.php.net/
License     : PHP
Description : PHP is an HTML-embedded scripting language. PHP attempts to make it
            : easy for developers to write dynamically generated web pages. PHP also
            : offers built-in database integration for several commercial and
            : non-commercial database management systems, so writing a
            : database-enabled webpage with PHP is fairly simple. The most common
            : use of PHP coding is probably as a replacement for CGI scripts.
            :
            : The php package contains the module which adds support for the PHP
            : language to Apache HTTP Server.

╭─[~/.apps/android-sdk-linux]─[bull@beastlinux]─[0]─[495]
╰─[:)] % grep color /etc/yum.conf
color=on
╭─[~/.apps/android-sdk-linux]─[bull@beastlinux]─[0]─[496]
╰─[:)] %
No colors at all except in my zsh prompt. I really liked Gentoo for all the colors in the console and Arch for the colors in the man pages. It made the terminal less dull looking.

EDIT: My prompt does support ANSI. It does the colors in my prompt. I'm using the default, gnome-terminal in Gnome3.2 for Fedora16. Even XTerm supports colors.

Last edited by fakie_flip; 12-21-2011 at 01:35 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Can yum override an exclusion in the /etc/yum.conf directory eodchop Fedora 3 12-05-2013 05:44 PM
CRITICAL:yum.cli Config Error yum.conf in RHEL 6.0 chunrima Linux - Software 2 12-09-2010 06:19 PM
erased yum.conf by forced yum-update in RHEL5.3, need help curiocurio Red Hat 3 04-21-2009 03:33 AM
yum.conf - extract files from a DVD. How define repo location and what is yum command emuub Linux - Software 2 06-17-2007 07:28 AM
Yum Errors in parsing, whats wrong here (yum.conf pasted) thejokker Linux - Newbie 1 06-15-2004 02:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 06:55 AM.

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