I'm using dual monitor configuration (laptop + external CRT). Each time I lock my screen I need to restore my CRT screen parameters (actually refresh rate only) on next unlock. Screen refresh rate of external monitor is reset to 60Hz and desktop picture moved (or better to say compressed) to left creating black zone right.
I'm running following command to restore correct parameters
xrandr --output VGA-0 --mode 1280x1024 -r 75
I need to run this script each time I'm unlocking my screen and it would be nice to make this happening automatically.
Startup applications won't help as they run once only during system boot.
Another solution is to save those VGA parameters somewhere but I'm not sure how. Probably in /etc/X11/xorg.conf (which actually don't have) but I need to generate full config first and then put that 75 rate in it.
UPDATE
I can't understand why was this marked as DUPLICATE of another question where in the description a man says "... upon boot? (not upon user login)" and my question is inverted - "upon login (not upon boot)".
Also I mentioned that putting a script to "Startup applications" does not do the trick.