[kde-linux] K Menu->Log Out->Restart through command-line?

Felix Miata mrmazda at ij.net
Sun Dec 30 14:15:55 UTC 2007


On 2007/12/30 12:38 (GMT+0100) daniel åkerud apparently typed:

> On Dec 30, 2007 7:14 AM, Felix Miata <mrmazda at ij.net> wrote:

>> On 2007/12/30 00:30 (GMT-0500) James Loughner apparently typed:

>> > daniel åkerud wrote:

>> >> How can I do a KDE "restart" (Found through K Menu->Log Out->Restart)
>> >> from the command-line? 

Why?

> I figured a regular "reboot" is bad, since
>> >> sessions et al is not saved, and programs are probably more abruptly
>> >> closed.

>> > To stop or start a GUI session:
>> > Go to a terminal normally ctrl-alt-F1 will do
>> > log on as root
>> > type init 3
>> > this normally will shutdown the GUI
>> > type init 5
>> > this will restart the GUI
>> > go back to the terminal ctrl-alt-F1
>> > Log out as root
>> > type exit

>> > I said normally above since I don't know what distro and though most
>> > will follow the init level rules there is no  absolute....

>> Init 3/init 5 doesn't work on most Debians, which don't do anything different
>> in runlevels 2-5. '/etc/rc.d/kdm restart' as root or with sudo should get the
>> job done though on both Debians and non-Debians.

> I actually want to reboot the computer,

Why? O_O

There's only two times that make any sense to "reboot" any Linux:

1-machine off
2-engage a different kernel

Everything else that needs a shutdown or restart or repair or whatever can be
successfully accomplished without a reboot, and a whole lot more quickly.

> like "Restart" does in KDE, and the
> suggestions above doesn't do that. In other words, I want to do the KDE
> equivalent to /sbin/reboot (but still save session and whatever KDE
> does).

Try init 6 to restart, init 0 to shut off.

> Btw, I'm using Kubuntu 7.10.

That's a Debian.
-- 
Jesus Christ, the reason for the season.

 Team OS/2 ** Reg. Linux User #211409

Felix Miata  ***  http://mrmazda.no-ip.com/



More information about the kde-linux mailing list