- Posts: 274
- Thank you received: 104
Linux redscreen trick
- martinus
- Topic Author
- Offline
- Main Sequence
Less
More
13 years 4 months ago #90354
by martinus
Linux redscreen trick was created by martinus
Hi guys, it struck me earlier that having to buy a red filter for the laptop screen seems a bit redundant given the configurability of Xorg. I've tested this on Debian and it works grand. Obviously you need to have xcalib installed.
xcalib -green .1 0 1 -alter
xcalib -blue .1 0 1 -alter
will make the screen red. To return it to default simply invoke
xcalib -clear
Instant red screen.
Hope this is of some use to someone.
xcalib -green .1 0 1 -alter
xcalib -blue .1 0 1 -alter
will make the screen red. To return it to default simply invoke
xcalib -clear
Instant red screen.
Hope this is of some use to someone.
The following user(s) said Thank You: wbean
Please Log in or Create an account to join the conversation.
- Seanie_Morris
- Offline
- Administrator
Less
More
- Posts: 9640
- Thank you received: 547
13 years 3 months ago #90377
by Seanie_Morris
Midlands Astronomy Club.
Radio Presenter (Midlands 103), Space Enthusiast, Astronomy Outreach Co-ordinator.
Former IFAS Chairperson and Secretary.
Replied by Seanie_Morris on topic Re: Linux redscreen trick
That is such a handy tip!
Midlands Astronomy Club.
Radio Presenter (Midlands 103), Space Enthusiast, Astronomy Outreach Co-ordinator.
Former IFAS Chairperson and Secretary.
Please Log in or Create an account to join the conversation.
- martinus
- Topic Author
- Offline
- Main Sequence
Less
More
- Posts: 274
- Thank you received: 104
12 years 3 months ago #94795
by martinus
Replied by martinus on topic Re: Linux redscreen trick
Hope I'm not being a pest by bumping this thread with more info, I'd forgotten to post my bash script for automating this.
Simply paste the code into a text document (mine's called redscreen.sh) and set the file permissions to make it executable.
You may need to verify where the bash executable is and amend the first line to reflect this as it can vary in linux distros.
Code:
#!/bin/bash
echo -e "Type R and hit return to make the screen red. "
read word
if [ "$word" = "R" ]; then
echo `xcalib -green .1 0 1 -alter`
echo `xcalib -blue .1 0 1 -alter`
else
echo `xcalib -clear`
fi
Simply paste the code into a text document (mine's called redscreen.sh) and set the file permissions to make it executable.
You may need to verify where the bash executable is and amend the first line to reflect this as it can vary in linux distros.
Please Log in or Create an account to join the conversation.
- Janek
- Offline
- Proto Star
Less
More
- Posts: 52
- Thank you received: 0
12 years 3 months ago #94837
by Janek
Replied by Janek on topic Re: Linux redscreen trick
Or you could use Compiz with Invert Plugin (turns white to black).
Please Log in or Create an account to join the conversation.
- martinus
- Topic Author
- Offline
- Main Sequence
Less
More
- Posts: 274
- Thank you received: 104
12 years 3 months ago #94841
by martinus
Replied by martinus on topic Re: Linux redscreen trick
Agreed, I would suggest that the xcalib solution may be preferable, particularly where the system does not already have compiz installed. Installing compiz to do this rings of cracking a nut with a sledgehammer.
As with everything in Linux there are quite a few methods of acheiving the same result.
As with everything in Linux there are quite a few methods of acheiving the same result.
Please Log in or Create an account to join the conversation.
- albertw
- Offline
- IFAS Secretary
Less
More
- Posts: 4173
- Thank you received: 181
12 years 3 months ago #94843
by albertw
Albert White MSc FRAS
Chairperson, International Dark Sky Association - Irish Section
www.darksky.ie/
Replied by albertw on topic Re: Linux redscreen trick
Or put a sheet or red celophane or plastic that you can get in an art supplies shop over your screen.
Simple solution works well for Mac, Windows and Linux
Simple solution works well for Mac, Windows and Linux
Albert White MSc FRAS
Chairperson, International Dark Sky Association - Irish Section
www.darksky.ie/
Please Log in or Create an account to join the conversation.
Time to create page: 0.115 seconds