Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Linux > Mandriva

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-30-2008, 03:27 PM
Dave Farrance
 
Posts: n/a
Run bash script at KDE logout?

How do I run a bash script at the start of the KDE logout process?

The reason I'm asking is that the KDE logout process on my laptop is very
slow, taking about 25 seconds before it gets as far as terminating the
X-server. I've suspected various KDE services of causing the problem,
and I've noticed that stopping one or the other seemed to speed things
up, but I've now realised that services that can use the sound system
seem to be to blame. I've found that a sure way of chopping 20 seconds
from the logout time is to kill kmix, which displays the taskbar volume
control, before logging out. I'd guess it's something to do with the
driver for Intel 82801DBM sound chip.

Unfortunately, if I put "pkill kmix" in a script in the "~.kde/logout"
directory, it doesn't run until *after* this annoying delay.

So is there a way to run a script at (or soon after) the *start* of the
KDE shutdown process, rather than after it has completed?

--
Dave Farrance
Reply With Quote
  #2 (permalink)  
Old 06-30-2008, 04:52 PM
David W. Hodgins
 
Posts: n/a
Re: Run bash script at KDE logout?

On Mon, 30 Jun 2008 11:27:44 -0400, Dave Farrance <DaveFarrance@omitthisyahooandthis.co.uk> wrote:

> So is there a way to run a script at (or soon after) the *start* of the
> KDE shutdown process, rather than after it has completed?


Try putting the following three lines in a file, chmod a+x, the file, create an icon
on the desktop that runs the script, and click on the icon to logout ...
#!/bin/bash
dcop kmix MainApplication-Interface quit
dcop kdesktop default logout

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
Reply With Quote
  #3 (permalink)  
Old 06-30-2008, 06:42 PM
Dave Farrance
 
Posts: n/a
Re: Run bash script at KDE logout?

"David W. Hodgins" <dwhodgins@nomail.afraid.org> wrote:

>On Mon, 30 Jun 2008 11:27:44 -0400, Dave Farrance wrote:
>> So is there a way to run a script at (or soon after) the *start* of the
>> KDE shutdown process, rather than after it has completed?

>
>Try putting the following three lines in a file, chmod a+x, the file, create an icon
>on the desktop that runs the script, and click on the icon to logout ...
>#!/bin/bash
>dcop kmix MainApplication-Interface quit
>dcop kdesktop default logout


Brilliant. Thanks. Got no answer when I asked this at www.kde-forum.org

I put the big red switchoff button icon (from system icons, actions) onto
the applet and dragged it into the task bar, just to the right of the
start menu icon, where I shouldn't forget to use it.

The apps that need to be closed to ensure a shutdown that doesn't jam for
20 seconds seems to vary with the phase of the moon or something. I'm
now shutting down kmix, klaptop and knemo, so the complete script is now:

#! /bin/bash
dcop kded kded unloadModule "knemod"
dcop kded kded unloadModule "klaptopdaemon"
dcop kmix MainApplication-Interface quit
dcop kdesktop default logout

--
Dave Farrance
Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Linux > Mandriva


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 02:59 PM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109