Running scripts at GUI login or log-off
<yambe:breadcrumb self="Running scripts at GUI login or log-off">Miscellaneous OS configuration|Miscellaneous OS configuration</yambe:breadcrumb>
Running scripts at GUI login or log-off
Some times it is desired that scripts run automatically after every GUI login / log-off. We cannot use '/etc/rc.d/rc.local' for such cases as that would cause script to run at system start-up and only once and not at every user login/log-off.
For such cases we can edit file '/etc/gdm/PreSession/Default' or '/etc/gdm/PostSession/Default' and enter full path of scripts to be executed before GUI login or after log-off respectively. These scripts would be run as root user and hence would allow all types of configuration to be done without facing permission issues.
<yambe:breadcrumb self="Running scripts at GUI login or log-off">Miscellaneous OS configuration|Miscellaneous OS configuration</yambe:breadcrumb>