3

I need to change my monitor's gamma settings permanently to the value of 0.7. I've tried using xgamma for this, but the thing is I have to execute this command everytime I start my laptop. Also, the gamma settings seem to revert to their original values (1.0) if something significant happens - when I copy/delete something, when I play media from my external hard disk, etc.
I tried making a custom script which reads like:

#!/bin/bash
xgamma -gamma 0.7

Saved it as gammasettings.sh, put it up into my list of start-up applications; but it fails to work for some reason.

Changing these settings again and again is a really cumbersome. Is there a way to make these changes permanent (edit any .conf file or something)?

3 Answers3

1

Redshift applies additional gamma correction, so it may not play nicely with xgamma (i.e. together they may over-correct).

My solution is:

  1. Put xgamma -quiet -gamma 0.7 in session/Application Autostart
  2. Put redshift-gtk (without gamma setting, but you can use -l LAT:LONG parameter for if location service fails) in session/Application Autostart
  3. Have a link to run xgamma -gamma 0.7 in case something deactivates the correction

Then you can deactivate Redshift temporarily, say for watching a video, and it will not affect the gamma.

1
  1. Install redshift, sudo apt-get install redshift
  2. In terminal, gnome-session-properties
  3. Add redshift -t 6500k:6500k -g .7:.7:.7 (the first 6500k is temp color for day, the second for night, - 6500k is default temp color- you can change the values) (.7 is my gamma setting)
  4. Install dconf-editor sudo apt-get install dconf-editor
  5. Open dconf-editor, org->gnome ->gnome-session and check "auto-save-session"
  6. Reboot
Juan
  • 26
0

Make executable gammasettings.sh

chmod +x gammasettings.sh

Then modify the script like this

#!/bin/bash
sleep 1
xgamma -gamma 0.7

On my VAIO with Ubuntu 14.04 works like a charm :)

CFW
  • 1
  • How do I set it only for a specific display? The tool takes a display and a screen argument, but how do I find the right values for these parameters? – Dmitry Pashkevich Jul 23 '15 at 15:55