Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1838180 - no way to disable colors
Summary: no way to disable colors
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cronie
Version: 32
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matej Mužila
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1895896 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-20 15:10 UTC by Zing
Modified: 2021-03-27 00:15 UTC (History)
5 users (show)

Fixed In Version: cronie-1.5.6-1.fc33 cronie-1.5.6-1.fc34
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-19 18:50:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Zing 2020-05-20 15:10:01 UTC
Description of problem:
"crontab -l" is showing colors in my terminal (looks like comments).  I do not want colors and there isn't anyway to disable it that I can find.

It's also buggy... it permanently changed terminal color to all blue.

Version-Release number of selected component (if applicable):
cronie-1.5.5-2.fc32.x86_64

Steps to Reproduce:
1. "crontab -l" with a comment

Actual results:
blue color

Expected results:
no colorization.  

Additional info:
there should be at least some way to disable all colorization for the tool itself.  at a system level, redhat has "COLOR none" in /etc/DIR_COLORS for ls which stops "--color=auto" alias from activating.  there is also a no-color initiative at https://no-color.org/

Comment 1 nvwarr 2020-09-18 06:13:30 UTC
If the last line of the crontab is a comment, it seems to mess up the terminal's color scheme permanently leaving it dark blue (in my case on a black background). Uggh!

Comment 3 Wolfgang Denk 2021-02-11 07:28:51 UTC
same problem still present in Fedora 33:

cronie-1.5.5-4.fc33.x86_64

see also bug #1895896

Comment 4 Jonathan Wakely 2021-02-11 15:17:25 UTC
*** Bug 1895896 has been marked as a duplicate of this bug. ***

Comment 5 Jonathan Wakely 2021-02-11 15:19:15 UTC
(In reply to Zing from comment #0)
> Description of problem:
> "crontab -l" is showing colors in my terminal (looks like comments).  I do
> not want colors and there isn't anyway to disable it that I can find.

Colours are only enabled if output is to a terminal, so as a workaround you can do:

crontab -l | cat


> It's also buggy... it permanently changed terminal color to all blue.

Yes, I reported that as bug 1895896 with the following content (including a link to the upstream fix):

Description of problem:

'crontab -l' changes terminal colour for comment lines, but doesn't reset it.


Version-Release number of selected component (if applicable):

cronie-1.5.5-2.fc32.x86_64

How reproducible:

Always

Steps to Reproduce:
1. crontab -l > /tmp/crontab
2. echo '# this is a comment' >> /tmp/crontab
3. crontab /tmp/crontab
4. crontab -l

Actual results:

The terminal colour is changed.

Expected results:

My usual terminal colours are used.

Additional info:

This was fixed upstream but there hasn't been a new release yet:
https://github.com/cronie-crond/cronie/issues/45

Comment 6 nvwarr 2021-02-12 07:29:54 UTC
It is also still present in cronie-1.5.5-5.fc34.x86_64 from rawhide/FC34.

The good news is that I can confirm that the one-line fix upstream, that Jonathan refers to, really works.

So perhaps this can be applied before FC34 is released.

Comment 7 Fedora Update System 2021-03-17 16:30:45 UTC
FEDORA-2021-93a62df830 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-93a62df830

Comment 8 Fedora Update System 2021-03-17 16:30:46 UTC
FEDORA-2021-b55af90afe has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-b55af90afe

Comment 9 Fedora Update System 2021-03-18 03:28:53 UTC
FEDORA-2021-b55af90afe has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-b55af90afe`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-b55af90afe

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 nvwarr 2021-03-18 04:53:13 UTC
This fixes the bug of not restoring colors at the end, which is all I care about. However, I note that the original point raised by Zing was that there's no way to turn off the colors the way you can with other programs that colorize.

Comment 11 Fedora Update System 2021-03-18 21:46:30 UTC
FEDORA-2021-93a62df830 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-93a62df830`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-93a62df830

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Jonathan Wakely 2021-03-19 09:56:08 UTC
(In reply to nvwarr from comment #10)
> This fixes the bug of not restoring colors at the end, which is all I care
> about. However, I note that the original point raised by Zing was that
> there's no way to turn off the colors the way you can with other programs
> that colorize.

I reported that upstream https://github.com/cronie-crond/cronie/issues/81

Comment 13 Jonathan Wakely 2021-03-19 10:25:04 UTC
(In reply to Jonathan Wakely from comment #12)
> I reported that upstream https://github.com/cronie-crond/cronie/issues/81

And it's now implemented upstream!
https://github.com/cronie-crond/cronie/commit/765a745c6497f8cde51c39db7b1bb88686b90a9c

Comment 14 Fedora Update System 2021-03-19 18:50:11 UTC
FEDORA-2021-b55af90afe has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2021-03-27 00:15:36 UTC
FEDORA-2021-93a62df830 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.