maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   A small utility program to soft reboot your tablet (https://talk.maemo.org/showthread.php?t=15223)

qwerty12 2008-01-23 16:22

Re: A small utility program to soft reboot your tablet
 
Quote:

Originally Posted by fanoush (Post 129229)
open xterm
sudo gainroot
vi /etc/systemui/systemui.xml
position cursor on beginning of comment <!-- above reboot item, enter dd (press d twice) to delete it
position cursor on end of comment -->, enter dd (press d twice) to delete it
enter ZZ (twice shift + z) to save

It is critical to not to mess this file or your tablet will not boot. Do it slowly. Enter :q! to exit vi without saving if you are not sure what you entered.

You may also just move the comment beginning <!-- below the reboot item to leave other items still disabled but it is harder.

Does someone have a backup of the N800 OS2008 systemui.xml file please?

I thought I did it properly but it seems not. I have lost all the options on the device mode menu. I can still shut down and take the phone out of wifi but it would be nice to have the file back please.

Note to self, backup files first :rolleyes:

Here's my current systemui. Not sure what is wrong with it:
Code:

<powerkeymenu path="/">
 <title>powerup_application_title</title>
 <po>osso-powerup-shutdown</po>
 <menuitem priority="100" name="powerup_memainmenu_locktouchscreen">
  <return>1</return>
  <po>osso-powerup-shutdown</po>
 </menuitem>
 <menuitem priority="90" name="powerup_memainmenu_normalmode" visible="flight">
  <keyfile>/var/lib/mce/mode</keyfile>
  <return>2</return>
  <po>osso-powerup-shutdown</po>
 </menuitem>
 <menuitem priority="90" name="powerup_memainmenu_flightmode" visible="normal">
  <keyfile>/var/lib/mce/mode</keyfile>
  <return>3</return>
  <po>osso-powerup-shutdown</po>
 </menuitem>
 <menuitem priority="80" name="powerup_memainmenu_lockdevice" disabled="yes">
  <keyfile>/var/run/mce/call</keyfile>
  <return>4</return>
  <po>osso-powerup-shutdown</po>
  <disabled_reason name="powerup_ib_device_lock_not_available">
  <po>osso-powerup-shutdown</po>
  </disabled_reason>
 </menuitem>
 <menuitem priority="20" name="Reboot">
  <return>6</return>
  <po>osso-powerup-shutdown</po>
 </menuitem>
 <menuitem priority="10" name="Soft poweroff">
  <return>7</return>
  <po>osso-powerup-shutdown</po>
 </menuitem>
 <menuitem priority="5" name="Top in XTerm">
  <callback service="com.nokia.xterm" path="/com/nokia/xterm" interface="com.nokia.xterm" method="run_command" bus="session" autostart="true">
  <argument type="string">/usr/bin/top</argument>
  </callback>
 </menuitem>
  <return>5</return>
  <po>osso-powerup-shutdown</po>
 </menuitem>
</powerkeymenu>


fanoush 2008-01-23 16:44

Re: A small utility program to soft reboot your tablet
 
the part

Code:

</menuitem>
  <return>5</return>
  <po>osso-powerup-shutdown</po>
 </menuitem>

is not complete, every <menuitem> needs matching </menuitem> so beginning of osso-powerup-shutdown item is missing. i don't have device now but you are missing one line with something like
Code:

<menuitem priority="1" name="Power Off">
after </menuitem>

qwerty12 2008-01-23 16:51

Re: A small utility program to soft reboot your tablet
 
Thank you for the reply but I found a systemui.xml from OS2007 and I compared it to my broken 2008 one and it seemed mostly the same. Made the right changes and now I have a reboot option and the menu fully works (plus a lot of others but I don't care :D). Thank you for this mod.

james415 2008-01-24 16:04

Re: A small utility program to soft reboot your tablet
 
Quote:

Originally Posted by bunanson (Post 129193)
All I want is a .deb file on the desktop that would,

- xterm
- sudo gainroot
- shutdown -r now

I also have an Asus EEE running Xandros Linux. Can I use that to compile the .sh into a .deb file and put it on the desktop? Look at the poll, there is more than 25 users having the power on problem.... In fact, maybe a soft reboot should be built-in into the platform in the future tablet release, uh?


bun

I don't think what you are asking for is what you really want to do. A .deb file is a debian based application package, consisting of two archives (one for data and one for control). These files are used to install software on the system.

If you want to automate a task (e.g. gainroot and reboot) you are looking for a shell script, which it appear you are already using.

As a side not, you can save a few keystrokes using "reboot" instead of "shutdown -r now" (helpful when you manually type it in)

cheers,
james

bunanson 2008-01-24 20:17

Re: A small utility program to soft reboot your tablet
 
I am not sure what is the technical difference between reboot and shutdown -r now, but the tablet obviously DOES NOT like reboot, the last time I use it, it gives me a statement "....better to use shutdown to avoid...." before I can see what is going on, the tablet rebooted. I agree, you save some keystrokes on typing. Anyhow, I am quite happy with this get around of the power on/off problem.


bun

Snoshrk 2008-06-28 06:10

Re: A small utility program to soft reboot your tablet
 
Ok I have successfully borked my systemui.xml...

I was pretty sure I only deleted the comment markers...but now:

Power button press results in pop up window with "Device Mode" and nothing else...

I'd post the text of the file, but I haven't figured out how...

TIA

caulktel 2008-06-28 14:50

Re: A small utility program to soft reboot your tablet
 
I am curios why everybody uses the "shutdown -r now" command. From root I always just issue the "reboot" command and it reboots, seems shorter to do it my way. Just wondering.

sic0048 2008-06-28 17:09

Re: A small utility program to soft reboot your tablet
 
Quote:

Originally Posted by Snoshrk (Post 196980)
Ok I have successfully borked my systemui.xml...

I was pretty sure I only deleted the comment markers...but now:

Power button press results in pop up window with "Device Mode" and nothing else...

I'd post the text of the file, but I haven't figured out how...

TIA

Here is my file with the reboot modification but otherwise normal. Hopefully you can compare the files and see if anything is different.
Code:

<powerkeymenu path="/">
 <title>powerup_application_title</title>
 <po>osso-powerup-shutdown</po>
 <menuitem priority="100" name="powerup_memainmenu_locktouchscreen">
  <return>1</return>
  <po>osso-powerup-shutdown</po>
 </menuitem>
 <menuitem priority="90" name="powerup_memainmenu_normalmode" visible="flight">
  <keyfile>/var/lib/mce/mode</keyfile>
  <return>2</return>
  <po>osso-powerup-shutdown</po>
 </menuitem>
 <menuitem priority="90" name="powerup_memainmenu_flightmode" visible="normal">
  <keyfile>/var/lib/mce/mode</keyfile>
  <return>3</return>
  <po>osso-powerup-shutdown</po>
 </menuitem>
 <menuitem priority="80" name="powerup_memainmenu_lockdevice" disabled="yes">
  <keyfile>/var/run/mce/call</keyfile>
  <return>4</return>
  <po>osso-powerup-shutdown</po>
  <disabled_reason name="powerup_ib_device_lock_not_available">
  <po>osso-powerup-shutdown</po>
  </disabled_reason>
 </menuitem>
-->
 <menuitem priority="20" name="Reboot">
  <return>6</return>
  <po>osso-powerup-shutdown</po>
 </menuitem>
 <menuitem priority="10" name="Soft poweroff">
  <return>7</return>
  <po>osso-powerup-shutdown</po>
 </menuitem>
 <menuitem priority="5" name="Top in XTerm">
  <callback service="com.nokia.xterm" path="/com/nokia/xterm" interface="com.nok                                            ia.xterm" method="run_command" bus="session" autostart="true">
  <argument type="string">/usr/bin/top</argument>
  </callback>
 </menuitem>
-->
 <menuitem priority="0" name="powerup_memainmenu_poweroff">
  <return>5</return>
  <po>osso-powerup-shutdown</po>
 </menuitem>
</powerkeymenu>


bunanson 2008-06-28 18:45

Re: A small utility program to soft reboot your tablet
 
Quote:

Originally Posted by caulktel (Post 197048)
I am curios why everybody uses the "shutdown -r now" command. From root I always just issue the "reboot" command and it reboots, seems shorter to do it my way. Just wondering.

2006OS recommends "shutdown" over "reboot", not quite sure why. Upon reboot, there is a warning statement recommend to use shutdown instead. This has ALL been changed since then. Just for your curiosity.


bun

Snoshrk 2008-06-29 05:35

Re: A small utility program to soft reboot your tablet
 
sic0048 -> THANK YOU! :D

I just copied your file and replaced mine...

You don't have any of the options commented out?!?

What do the other entries do:

Lock Device (pretty self explanatory) but how do I change the Lock code?

Soft poweroff Benefits vs locking the screen and keys?

Top in XTerm

Now for the N00B question: what are the "Comment" flags?
From looking at the posts in this thread:

comment start <!--
comment end -->

Is this correct? I tried this a couple of times with no luck


TIA


BTW I am really thankful that "shutdown -r now" was in this post as it was the only way I had to turn off my NiT :o


All times are GMT. The time now is 21:47.

vBulletin® Version 3.8.8