![]() |
|
|
|||
|
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 |
|
|||
|
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.) |
|
|||
|
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 |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|