LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   .bash_login .bash_logout on KDE and GNOME (https://www.linuxquestions.org/questions/linux-general-1/bash_login-bash_logout-on-kde-and-gnome-102186/)

ja_nch 10-09-2003 02:58 PM

.bash_login .bash_logout on KDE and GNOME
 
Hi.

I need to ensure a scrpit01.sh file is executed after login and that a script.02.sh file is executed during logout.

I have read that that can be achieved through including the commands into the .bash_login and .bash_logout of the home directory, but even though I already done so, the commands never get executed.

I think there could be some differences when logging in using GNOME or KDE so may be somebody know on this may help me.

Advise will be very much appreciated.

Thanks

JN

/bin/bash 10-09-2003 08:12 PM

Probably the easiest way would be to edit startkde script. Look for the line that starts kde and put the kde startup script there. Then at the end of the startkde script you could put the kde shutdown script:

Code:

# In case of dcop sockets left by a previous session, cleanup
dcopserver_shutdown
/path/to/kdestartupscript
echo 'startkde: Starting up...'  1>&2
...
...
...

echo 'startkde: Done.'  1>&2
/path/to/kdelogoutscript


ja_nch 10-09-2003 08:28 PM

Where is it typically located and named
 
Sounds good, but, when is it typically located and what is its name? (of the script)

Also, I see this would work for KDE... any idea with GNOME?

THKS.

/bin/bash 10-09-2003 09:09 PM

Mine is /usr/bin/startkde but typically it would be /opt/kde3/bin/startkde
Try which startkde


All times are GMT -5. The time now is 05:20 PM.