Bug#780005: mate-terminal: reset option does not reset colors to defaults

brian m. carlson sandals at crustytoothpaste.net
Sun Mar 8 00:00:36 UTC 2015


Package: mate-terminal
Version: 1.8.1+dfsg1-4
Severity: normal

If the terminal color mapping has been changed by a terminal sequence, 
neither Terminal → Reset nor Terminal → Reset and Clear restores the 
colors to the defaults.

To demonstrate this, run the attached script as "color-bug-test 
--no-change".  Notice that color 1 is a dark red (at least by default). 
Now run the script as "color-bug-test".  Color 1 is now a light blue. 
No matter what you do, color 1 will remain a light blue unless you 
change it again with an escape sequence.  You'll have to open a new 
terminal tab to get the original colors again.

I discovered this when I logged into someone else's VM at work and their 
shell setup changed the red in my terminal to magenta.  I then had to 
close the terminal tab and open a new one to get my colors back.

-- System Information:
Debian Release: 8.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.19.0-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages mate-terminal depends on:
ii  libatk1.0-0           2.14.0-1
ii  libc6                 2.19-15
ii  libcairo2             1.14.0-2.1
ii  libdconf1             0.22.0-1
ii  libfontconfig1        2.11.0-6.3
ii  libfreetype6          2.5.2-3
ii  libgdk-pixbuf2.0-0    2.31.1-2+b1
ii  libglib2.0-0          2.42.1-1
ii  libgtk2.0-0           2.24.25-3
ii  libice6               2:1.0.9-1+b1
ii  libpango-1.0-0        1.36.8-3
ii  libpangocairo-1.0-0   1.36.8-3
ii  libpangoft2-1.0-0     1.36.8-3
ii  libsm6                2:1.2.2-1+b1
ii  libvte9               1:0.28.2-5
ii  libx11-6              2:1.6.2-3
ii  libxext6              2:1.3.3-1
ii  mate-desktop-common   1.8.1+dfsg1-2
ii  mate-terminal-common  1.8.1+dfsg1-4
pn  python:any            <none>

mate-terminal recommends no packages.

mate-terminal suggests no packages.

-- no debconf information

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
-------------- next part --------------
#!/usr/bin/perl
# Based off the X11 256colors.pl script.

use strict;
use warnings;

sub set_color {
	my ($color, $r, $g, $b) = @_;
	printf "\x1b]4;%d;rgb:%2.2x/%2.2x/%2.2x\x1b\\", $color, $r, $g, $b;
}

sub print_color {
	my $x = shift;
	printf "\x1b[48;5;%dm %2x", $x, $x;
}

sub print_all {
	print "System colors:\n";
	for (my $color = 0; $color < 8; $color++) {
	        print_color $color;
	}
	print "\x1b[0m\n";
	for (my $color = 8; $color < 16; $color++) {
	        print_color $color;
	}
	print "\x1b[0m\n\n";
}

my $no_change = ($ARGV[0] || '') eq '--no-change';

# Set the default red to a nice blue.
set_color(1, 0x3b, 0x6b, 0xdf) unless $no_change;
print_all();

if ($no_change) {
	print "No change has been made to the terminal colors.\n";
}
else {
	print "Now reset the terminal, and see if the color 1 is red again.\n";
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-mate-team/attachments/20150308/6bb1909b/attachment.sig>


More information about the pkg-mate-team mailing list