LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-13-2004, 06:03 PM   #1
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Want to run a few scripts before KDE shutdown, where can I add them.


I would like to run a few scripts and or apps before the KDE 3.2 desktop shutdowns. Where can I add this at.

Thanks for everybodys help.
Brian1
 
Old 06-13-2004, 06:23 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
I don't think that there's such a feature in place... what
are you trying to achieve?


Cheers,
Tink
 
Old 06-13-2004, 06:37 PM   #3
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
it'd be easier to make a $SHELL script that runs the apps you want
and then issues the shutdown command..............

of course you will have to be root to run this since the shutdown
can only be executed by $ROOT
 
Old 06-13-2004, 07:44 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Or use sudo ;)



Cheers,
Tink
 
Old 06-14-2004, 05:16 PM   #5
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Original Poster
Rep: Reputation: 65
Thats what I had in mind. Let me guess here. I would create a script here to do all my smaller scripts then name it something like scriptshutdown. Here is my guess here I would edit the file:/etc/kde/kdm/kdmrc and change this section:
[Shutdown]
HaltCmd=/sbin/poweroff
UseLilo=false

to

[Shutdown]
HaltCmd=/sbin/scriptshutdown
UseLilo=false

Of coarse I would add poweroff to the last line in the new script. I am not sure it will run a script from here or not. Would there be a better place to link the new shutdown script to. I don't know if I would use sudo here or not. If I make the script available to all it should work fine.

Here is a few things I would like to accomplish with the script. It would copy certain files like bookmarks and email to another drive for backup and be available in an event of the main drive crash. Send this output to display on the screen using xterm to show all is done. Of coarse let it pause a few seconds using ping as a pause statement. Then powerdown. Doing the script I can do fine, just don't know where to put it mostly.

Thanks for all your help Tinkster & 320mb.
Brian1
 
Old 06-14-2004, 07:23 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Hmmm .... I thought you wanted to do things on
logout, but you're actually talking machine shutdown :)

In this case, just add any old script you wish to run
during shutdown to rc.S (where ever it lives in your
distro).


Cheers,
Tink
 
Old 06-16-2004, 06:36 PM   #7
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Original Poster
Rep: Reputation: 65
Actually during logout would be perferred. Would what was said before work for that?

Thanks for your time and help.
Brian1
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
shutdown scripts? mushmaster Linux - Software 5 02-15-2005 06:23 PM
Emergency Shutdown scripts? samroberts Linux - Enterprise 3 10-29-2004 04:48 AM
Where do you place shutdown scripts? zer0halo Linux - Newbie 3 08-24-2004 03:43 PM
How do i make scripts run at bootup and shutdown? BajaNick Linux - General 2 08-11-2003 08:37 PM
How to add Shutdown and Restart to the menu in KDE? concoran Linux - General 16 12-02-2001 10:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration