How to execute a command each time I switch between users

Asked by smurf

I have Ubuntu 12.04 with a NVIDIA GeForce 210 graphic card, drivers 331.113 . I don't know why NVIDIA driver store the gamma I wish but can't fix it, so each time I log in the brilliance of the screen increase and increase. Normally I fixed the problem with a small script that execute the command [CODE]nvidia-settings -l[/CODE] in Preferences -> startup programs.
But now I added a second user and each time I switch between users I see the screen increase brilliance up to almost white. In fact switching between users without logging out doesn't execute the programs in startup list.
Now I wish to know if there is any system file or some stuff that is executed when I switch user, where I can put the nvidia-settings command to trim the screen brilliance.
Thx a lot.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Does xrandr have a gamma setting. You could run:

sudo nvidia-xconfig; gksudo nvidia-settings

You can then setup the screen and click 'Save to X config file'

It should help

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

If you find it doesn't then simply run:

sudo rm /etc/X11/xorg.conf

Then reboot

Revision history for this message
smurf (luca-dgh) said :
#3

Well, I tried all the steps above, but no way the problem is still a problem.
Furthermore now I have a new issue: every time I make the first login I receive an error message concerning nvidia-settings, something like: nvidia-settings has stopped.

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Open' state without activity for the last 15 days.