Re: [SLE] reboot
From: Mark A. Taff (marktaff_at_comcast.net)
Date: 09/17/05
- Previous message: Darryl Gregorash: "Re: [SLE] du"
- In reply to: John D Lamb: "[SLE] reboot"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: suse-linux-e@suse.com Date: Sat, 17 Sep 2005 14:38:54 -0700
On Thursday 15 September 2005 23:56, John D Lamb wrote:
> 9.3 has a long-click reboot that lets you choose what grub boots.
>
> Is there a script for this?
> I'd like to can remote reboot between SuSE and XP on one box.
>
> --
> JDL
I would investigate using a dcop call to ksmserver. Get kdcop, if you don't
have it already. It provides a gui to access an application's dcop
interface. This is quit handy in figuring out which dcop call will do what
you want.
In your case, ksmserver (the kde session manager) has a logout signal that
will logout and reboot or halt your machine. Telling it which OS to reboot
into is a function in grub.
That said, my script GRUB NextBoot (search kde-apps.org) will do this from
within a kde session. So if you are into the box remotely in an NX session,
this would work for you.
However, it seems you are probably using ssh for a command line remote
session. In that case, you should modify grub nextboot for your own needs.
All you need to do tell grub what to reboot into. Make a textfile:
savedefault --stage2=/boot/grub/stage2 --default=$input --once
quit;
Where input is the index number from your grub menu.lst; 0 is the first OS, 1
is the second, etc...
Then as root, execute `grub < textfile`
Now that grub will boot into whatever OS you told it to for the nex reboot
only, now tell it to reboot with a safe logout of KDE:
`dcop --all-users --all-sessions ksmserver ksmserver logout 0 1 0`
# 0 2 0 is halt; see KApplication shutdown enums in KDE API
-- Mark A. Taff With sufficient thrust, pigs fly just fine. --RFC 1925 -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
- Previous message: Darryl Gregorash: "Re: [SLE] du"
- In reply to: John D Lamb: "[SLE] reboot"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|