how to run a command after switching user

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

nvidia-settings -l

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.
Looking for a solution I learned to use xrandr command to set gamma, it works as well, but I stiil didn't find a good place where to put it.
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
Launchpad Janitor (janitor) said :
#1

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