I personally like command line terminals with a black background and white (or even green) text. However, this is not the most readable color combination and may stress one's eyes after long working sessions. In addition visually impaired people may also like to tweak the screen just for better readability.
There are two posts I've stumple across, which deal with readability. On the Adobe forums one suggested that Adobe Reader may need a feature to invert the page, i.e. to exchange background and foreground, here: The poster complains that reading PDFs is like having a bulb in front of you, which seems a valid point.
Another post comes from the Vinux development blog, here: Vinux is a special linux variant for visually impaired people. One issue for people with bad vision is wrong contrast. Hence, they propose using xcalib for applications like brightness and contrast control using keyboard shortcuts and in addition for an inverted copy of the primary screen on a second monitor, so that one can use the monitor that is more readable.
Showing posts with label xcalib. Show all posts
Showing posts with label xcalib. Show all posts
Sunday, November 1, 2009
Unexpected xcalib applications #2: fixing brocken screens
There was one post on the Ubuntu forums that I didn't expect is a possible application for xcalib: fixing a brocken screen. You can find the original post here and the solution is here.
I didn't know that a screen can become completely inverted after it was dropped on the floor, but well, I just hope that this never happens to me. Nevertheless, the solution can either be to use compiz and invert everything or you can just use xcalib with the -invert switch. This switch I've added just for fun because I wanted to see whether it's possible to set arbitrary values in the video LUT. The interesting observation there was that X11 does not check the values, whereas on Windows the operating system does not allow you to set completely unlikely screen calibration values. Hence, this will only work on Linux:
When you are going to do color-critical work (which I don't recommend with a knowingly broken screen!) and wanto to create an ICC profile, be careful: many calibration tools reset the LUT to the default values (the equivalent of xcalib -clear) - which are totally useless in this case to derive an ICC profile. Hence, better explicitly disable screen calibration in this case!
I didn't know that a screen can become completely inverted after it was dropped on the floor, but well, I just hope that this never happens to me. Nevertheless, the solution can either be to use compiz and invert everything or you can just use xcalib with the -invert switch. This switch I've added just for fun because I wanted to see whether it's possible to set arbitrary values in the video LUT. The interesting observation there was that X11 does not check the values, whereas on Windows the operating system does not allow you to set completely unlikely screen calibration values. Hence, this will only work on Linux:
Code:
xcalib -invert -alter
When you are going to do color-critical work (which I don't recommend with a knowingly broken screen!) and wanto to create an ICC profile, be careful: many calibration tools reset the LUT to the default values (the equivalent of xcalib -clear) - which are totally useless in this case to derive an ICC profile. Hence, better explicitly disable screen calibration in this case!
Thursday, October 29, 2009
Unexpected xcalib applications #1: preserving night vision
It's been a while since I have done work on xcalib or posted here on this blog but I have a little bit problems with jetlag currently, which provides me with a little bit of extra time. So, I've done a little google research on where xcalib is used in scenarios that haven't been envisioned when I wrote xcalib.
Application #1: Making the screen red to preserve night vision
(from here: http://ubuntuforums.org/showpost.php?p=6803029&postcount=4 - by sanskaras)
The trick is basically to switch off green and blue entirely. The proposed solution is modifying these two channels with the -green and -blue command line paramters. I've realized that these quite powerful commands are not documented in the README currently, hence here's the description:
Hence, the following is, according to the link, a possible setting for disabling green and blue.
These are the currently lowest allowed parameters in xcalib, hence it's well possible that I remove these limits in future versions or add a parameter to disable a channel entirely.
When all is over or the screen became unreadable, you can always revert back to normal:
Application #1: Making the screen red to preserve night vision
(from here: http://ubuntuforums.org/showpost.php?p=6803029&postcount=4 - by sanskaras)
The trick is basically to switch off green and blue entirely. The proposed solution is modifying these two channels with the -green and -blue command line paramters. I've realized that these quite powerful commands are not documented in the README currently, hence here's the description:
-green GREENGAMMA GREENBRIGHTNESS GREENCONTRASTWith these switches and the -alter command it is possible to modify the existing color behavior.
-blue BLUEGAMMA BLUEBRIGHTNESS BLUECONTRAST
-red REDGAMMA REDBRIGHTNESS REDCONTRAST
Hence, the following is, according to the link, a possible setting for disabling green and blue.
Code:
xcalib -green .1 0 1 -alter
xcalib -blue .1 0 1 -alter
When all is over or the screen became unreadable, you can always revert back to normal:
Code:
xcalib -clear
Saturday, November 24, 2007
xcalib and Linux screen savers - Part 2
In my recent post I recommended to use the notification methods of the screen savers for reloading the LUTs when the screen saver unblanks. I got a report that the method below does not work with the gnome screen saver - probably because of a problem in gnome screen saver.
The question is: what did gnome screen saver wrong - I don't know (I haven't tested it myself) but I guess it's a timing problem and the way gnome screen saver activates and deactivates. All the following applies only to gnome screen saver and not to e.g. xscreensaver. When the screen saver blanks it dims the screen to fade to the nice graphics that appear little later. For this fading the screen saver uses the LUTs - ouch - they were altered by xcalib for a reason before! When the user moves the mouse, the screen saver fades again to the desktop. At the same time it sends the message via D-Bus that it unblanks and xcalib can step in with the script, mentioned in the previous post. However, fading has not finished and at its end the LUTs are set to their default value.
One solution for this is to add a delay in the script of the previous post so that xcalib is started when the screen saver has finished its unblanking task.
The other solution is to apply a patch that is mentioned here which saves the LUTs inside gnome screen saver and reloads them when unblanking is finished. I hope this patch is integrated into gnome screen saver so we don't have to worry about these problems anymore.
The question is: what did gnome screen saver wrong - I don't know (I haven't tested it myself) but I guess it's a timing problem and the way gnome screen saver activates and deactivates. All the following applies only to gnome screen saver and not to e.g. xscreensaver. When the screen saver blanks it dims the screen to fade to the nice graphics that appear little later. For this fading the screen saver uses the LUTs - ouch - they were altered by xcalib for a reason before! When the user moves the mouse, the screen saver fades again to the desktop. At the same time it sends the message via D-Bus that it unblanks and xcalib can step in with the script, mentioned in the previous post. However, fading has not finished and at its end the LUTs are set to their default value.
One solution for this is to add a delay in the script of the previous post so that xcalib is started when the screen saver has finished its unblanking task.
The other solution is to apply a patch that is mentioned here which saves the LUTs inside gnome screen saver and reloads them when unblanking is finished. I hope this patch is integrated into gnome screen saver so we don't have to worry about these problems anymore.
Wednesday, October 31, 2007
xcalib and Linux screen savers
I was asked how you can start xcalib when the Linux screen saver deactivates.
Let's first talk about what the reason for this question may have been: Probably the screen saver alters the LUTs and resets them to their default value. It could also be possible that a 3D screen saver does some weird things with the LUTs. In any case, it seems like some screen savers require to load the LUTs again after the screen saver is disabled.
Unfortunately, there's no single screen saver program on Linux. There is the good old xscreensaver and the rather new gnome-screensaver. The later one supports D-Bus, so we can monitor a certain signal and issue the xcalib command when the screen saver deactivates. For the first one unfortunately no D-Bus signals exist (there's only a hack which is not integrated in the current xscreensaver).
So let's try to modify the FAQ Perl scripts of both screensavers for running xcalib when the screensaver unblanks.
xscrensaver:
gnome-screensaver:
Let's first talk about what the reason for this question may have been: Probably the screen saver alters the LUTs and resets them to their default value. It could also be possible that a 3D screen saver does some weird things with the LUTs. In any case, it seems like some screen savers require to load the LUTs again after the screen saver is disabled.
Unfortunately, there's no single screen saver program on Linux. There is the good old xscreensaver and the rather new gnome-screensaver. The later one supports D-Bus, so we can monitor a certain signal and issue the xcalib command when the screen saver deactivates. For the first one unfortunately no D-Bus signals exist (there's only a hack which is not integrated in the current xscreensaver).
So let's try to modify the FAQ Perl scripts of both screensavers for running xcalib when the screensaver unblanks.
xscrensaver:
#!/usr/bin/perl
my $blanked = 0;
open (IN, "xscreensaver-command -watch |");
while () {
if (m/^(BLANK|LOCK)/) {
if (!$blanked) {
$blanked = 1;
}
} elsif (m/^UNBLANK/) {
system "xcalib myprofile.icm";
$blanked = 0;
}
}
gnome-screensaver:
#!/usr/bin/perlI must admit that I haven't checked the scripts - but keep me informed if they don't work and I will modify them. As always, it should work with dispwin as well.
my $cmd = "dbus-monitor --session \"type='signal',interface='org.gnome.ScreenSaver',member='SessionIdleChanged'\"";
open (IN, "$cmd |");
while () {
if (m/^\s+boolean true/) {
} elsif (m/^\s+boolean false/) {
system "xcalib myprofile.icm";
}
}
Subscribe to:
Posts (Atom)