Mailinglist Archive: opensuse-kde (114 mails)

< Previous Next >
Re: [suse-kde] KDE and shutdown script
  • From: Ingo Strauch <brack@xxxxxxxxxxxxxxxxx>
  • Date: Fri, 9 Sep 2005 09:15:29 +0200
  • Message-id: <20050909091529.45813953.brack@xxxxxxxxxxxxxxxxx>
On Thu, 8 Sep 2005 07:04:40 +0200
"Sami A. Hassanein" <linux@xxxxxxxxxxxx> wrote:

> On Wednesday 07 September 2005 08:32, Ingo Strauch wrote:
> > On Tue, 6 Sep 2005 21:48:56 +0200
> > "Sami A. Hassanein" <linux@xxxxxxxxxxxx> wrote:
> > > I want to run a user script when KDE goes down - where do I have
> > > to place such scripts?
> >
> > You could create a ~/.xsession file that contains something like
> > this:
> >
> > ------------
> > $WINDOWMANAGER
> > <call to your script>
>
> I use SUSE9.3 and KDE 3.4.0.
> I created the file ~/.xinitrc and put my script as you suggested, but
> nothing happend - it was not being called.

That won't work anyway, it's ~/.xsession and not ~/.xinitrc. The former
will get called on graphical login, the latter when starting X by hand
(xinit or startx). And typically it has to be set executable I think.

But when using KDM instead of XDM the entire sequence is different and
those files are not evaluated anyway. When you look at
/etc/opt/kde3/share/config/kdm/Xsession you'll see at the end of the
script that it calles scripts in $KDEDIRS/shutdown. At least this is
what the comment in the script says. To me it seems that instead
"kde-config --path exe" is evaluated and the 'bin' part replaced by
'shutdown'. So basically it should work if you create a directory
'~/.kde/shutdown' and place your script there (set the executable bit!).


> Now I am looking for a solution sincd weeks and I really do not know
> how to achieve this.
> There must be a way to call a user script at closing of KDE of X.

Ok, try the above. But I'm not sure if that is a general feature of KDE
or if SUSE has modified the startkde script and added this feature (I
think they in principle do modify startkde).

HTH,
Ingo

--
Ingo Strauch ---- Registered Linux User #227900 (http://counter.li.org/)
GPG Key Fingerprint = DEC8 1B12 9573 6BE7 7A99 C33F 809C 8C2C 772E 66A1
http://www.the-one-brack.org/
< Previous Next >