LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   How to execute some command on GDM Login and Logout? (https://www.linuxquestions.org/questions/linux-desktop-74/how-to-execute-some-command-on-gdm-login-and-logout-476956/)

jabran 08-24-2006 10:16 AM

How to execute some command on GDM Login and Logout?
 
Hi,

How we can configure a script to be executed automatically on GDM login, as well as on logout? Actually I want to synchronize two directoris on login and logout using unison ($unison ~/dir1 ~/dir2 -batch). The command works correctly from command line.

I tried adding the command to following files, but no luck:

1- .bash_profile: Its not executed when logging in through GDM.
2- .gnomerc: Its executed on GDM Login
3- ?? :Which script executes on Logout?


Any ideas?

Jabran

ramram29 08-24-2006 10:22 AM

Put it in ~/.xinitrc - that's the file that X Window executes before it starts.

jabran 08-24-2006 10:55 AM

Quote:

Originally Posted by ramram29
Put it in ~/.xinitrc - that's the file that X Window executes before it starts.

I do not want to execute the command on Xwdinows startup, but only when a user logs in through GDM, and then second time when he/she logs out of gnome.

Thanks for any further hint.


All times are GMT -5. The time now is 09:28 PM.