maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Newbie (https://talk.maemo.org/forumdisplay.php?f=26)
-   -   command for quick shut down (https://talk.maemo.org/showthread.php?t=22598)

iceman600 2008-08-06 08:37

command for quick shut down
 
what is the command for a quick shut down on x term?
im adding a quick shut down option on my personal menu for a quick reboot.... thanks

josiahg777 2008-08-06 08:42

Re: command for quick shut down
 
oddly enough it's "shutdown" :P

It requires root though.

and reboot is either "shutdown -r" or "reboot"

qwerty12 2008-08-06 08:58

Re: command for quick shut down
 
"shutdown -h now" as root

I prefer using "shutdown -r now" to reboot but IMHO, this is the best way to reboot:
Code:

run-standalone.sh dbus-send --system --type=method_call --dest="com.nokia.mce" --print-reply "/com/nokia/mce/request" com.nokia.mce.request.req_reboot
(That command uses the Nokia daemons to handle the reboot and anything written using libosso knows the tablet is about to restart and can do something about it. For example, the built in Notes app saved my unsaved note in a recovery file)

iceman600 2008-08-06 09:01

Re: command for quick shut down
 
thank you guys... im still learning about linux. this is kinda new to me... im planing reformating my desktop and instal a gnome instead. thanks again


edit: the shutdown and shutdown -f now is not working at personal menu.
what command will i put at the COMMAND TO EXECUTE box for the qhick shutdown?

edit:i put these command and it just reboot...
rootsh shutdown -r now

josiahg777 2008-08-06 09:48

Re: command for quick shut down
 
It should be "shutdown -h" or "shutdown -r"

also, make sure the "run as root" box is checked :)

iceman600 2008-08-06 10:24

Re: command for quick shut down
 
shutdowm -h or shutdown -r doesnt work for me... there should be the word "now". and when i check run as root it doesnt work. so i uncheck it and works awsome.

so for newbies like me,
the command for personal menu for shutdown is
ROOTSH SHUTDOWN-H NOW

and for reboot it
ROOTSH SHUTDOWN-R NOW

josiahg777 2008-08-06 10:58

Re: command for quick shut down
 
Hmmm funny, I've never had to include the "now"

it always worked with or without it... well, I'm glad to see you got it working :)

lma 2008-08-06 13:34

Re: command for quick shut down
 
Quote:

Originally Posted by qwerty12 (Post 210717)
I prefer using "shutdown -r now" to reboot but IMHO, this is the best way to reboot:
Code:

run-standalone.sh dbus-send --system --type=method_call --dest="com.nokia.mce" --print-reply "/com/nokia/mce/request" com.nokia.mce.request.req_reboot

Thanks, useful to know!

The only reference I could find to this is in the SDK headers (/usr/include/mce/dbus-names.h specifically). Is there any other documentation?

IMHO there's no reason why shutdown couldn't also send an appropriate dbus signal (shutdown_ind perhaps?) via one of the init scripts' stop stanza (/etc/init.d/mce may be a good choice). Care to open a bug?

lma 2008-08-06 14:01

Re: command for quick shut down
 
Quote:

Originally Posted by lma (Post 210768)
/etc/init.d/mce may be a good choice

Or maybe not, at that point both Xomap and dbus have gone away. /etc/init.d/zzinitend looks a bit better.

cvmiller 2008-08-06 19:02

Re: command for quick shut down
 
Call me lazy, but I just use "init 6" (as root) to reboot. It is less typing.

Craig...

tehforum 2008-08-08 00:51

Re: command for quick shut down
 
How would you save that command into a handy file on which you double click and it shutdown?

dfinch 2008-08-08 01:43

Re: command for quick shut down
 
I use

sh -c 'echo reboot | sudo gainroot'

as a command in the osso-statusbar app command list. It works without complaint.
This was provided by someone else ~ so it's not original work.

nilchak 2008-08-08 01:47

Re: command for quick shut down
 
With becomeroot installed on my N810 , the command
" shutdown -h now " didnt work in Personal menu - with or withour "run as root" checked.

So I uninstalled becomeroot and instead installed the newer roosh package.

Now running the command
" rootsh shutdown -h now " works fine in Personal menu 0 no need to check "run as root" option either.

Thanks for the tips.

gemniii42 2008-09-07 02:33

Re: command for quick shut down
 
Quote:

Originally Posted by qwerty12 (Post 210717)
"shutdown -h now" as root

I prefer using "shutdown -r now" to reboot but IMHO, this is the best way to reboot:
Code:

run-standalone.sh dbus-send --system --type=method_call --dest="com.nokia.mce" --print-reply "/com/nokia/mce/request" com.nokia.mce.request.req_reboot
(That command uses the Nokia daemons to handle the reboot and anything written using libosso knows the tablet is about to restart and can do something about it. For example, the built in Notes app saved my unsaved note in a recovery file)

EXCELLENT!!
I slammed that into my PM and it worked as advertised, clean shutdown and reboot.
Tricks like this need to be accumulated.


All times are GMT. The time now is 14:25.

vBulletin® Version 3.8.8