View Single Post
Posts: 197 | Thanked: 91 times | Joined on Dec 2010
#16
So I found a way to do this thanks to this thread.

One needs to just put the following into /etc/system/systemui.xml :
Code:
  <menuitem priority="750" name="Reboot">
    <icon>general_refresh</icon>
      <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/reboot_manual</argument>
    </callback>
  </menuitem>
And create (executable!) file /usr/bin/reboot_manual with the following content:
Code:
#!/bin/sh
# gain superuser rights.
if [ `id -u` != 0 ] ; then
    exec sudo gainroot <<EOF
exec sh $0 $*
EOF
exit $?
fi   
# put your code below
reboot
Reboot and the button should work and reboot nicely.
 

The Following 4 Users Say Thank You to sup For This Useful Post: