Active Topics

 



Notices


Reply
Thread Tools
Posts: 3,617 | Thanked: 2,410 times | Joined on Nov 2009 @ Cambridge, UK
#141
You could probably do "echo /sbin/reboot | sudo gainroot"
 

The Following User Says Thank You to Rob1n For This Useful Post:
Posts: 1,283 | Thanked: 370 times | Joined on Sep 2009 @ South Florida
#142
Originally Posted by Rob1n View Post
You could probably do "echo /sbin/reboot | sudo gainroot"
Hey thanx, I'll give that a try. Looks like it will work!
 
Posts: 1,283 | Thanked: 370 times | Joined on Sep 2009 @ South Florida
#143
Originally Posted by Rob1n View Post
You could probably do "echo /sbin/reboot | sudo gainroot"
Heh, well that one didn't work. It opens two xterms and one collapses and disappears.
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,356 times | Joined on Sep 2007 @ Looking at y'all and sighing
#144
Originally Posted by les_garten View Post
Mine did the same thing.

Might be able to cobble something together with low permissions with setuid possibly. But would not want to do that though.
sudo could probably be abused for this:

Code:
sudo gainroot
echo "user ALL = NOPASSWD: /sbin/reboot" > /etc/sudoers.d/reboot.sudoers
update-sudoers
After that, change your reboot entry to run "sudo reboot".
 

The Following 4 Users Say Thank You to qwerty12 For This Useful Post:
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,356 times | Joined on Sep 2007 @ Looking at y'all and sighing
#145
OK, scratch that: that only worked once...

Do this, instead:

Do the sudoers trick outlined above;

/usr/share/dbus-1/services/reboot.service:
[D-BUS Service]
Name=com.misc.reboot
Exec=/usr/bin/sudo reboot
/etc/systemui/systemui.xml:
<menuitem priority="750" name="Reboot">
<icon>general_refresh</icon>
<callback service="com.misc.reboot" path="/com/misc/reboot" interface="com.misc.reboot" method="reboot" bus="session" autostart="true">
<argument type="boolean">true</argument>
</callback>
</menuitem>
 

The Following 4 Users Say Thank You to qwerty12 For This Useful Post:
Posts: 1,283 | Thanked: 370 times | Joined on Sep 2009 @ South Florida
#146
Originally Posted by qwerty12 View Post
sudo could probably be abused for this:

Code:
sudo gainroot
echo "user ALL = NOPASSWD: /sbin/reboot" > /etc/sudoers.d/reboot.sudoers
update-sudoers
After that, change your reboot entry to run "sudo reboot".
Same thing, opens two Xterms and leaves one while the other melts away.
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,356 times | Joined on Sep 2007 @ Looking at y'all and sighing
#147
Yep, I had it work once but then it started to do what you said. See my second method that abuses D-Bus - that worked more than once.
 

The Following User Says Thank You to qwerty12 For This Useful Post:
Posts: 1,283 | Thanked: 370 times | Joined on Sep 2009 @ South Florida
#148
Originally Posted by qwerty12 View Post
Yep, I had it work once but then it started to do what you said. See my second method that abuses D-Bus - that worked more than once.
That worked, interesting, thanx!

Why is the Reboot using osso-powerup-shutdown so "abrupt". Both these methods work but the osso command juist seems "Violent" in it's nature!
 
Schturman's Avatar
Posts: 5,323 | Thanked: 4,080 times | Joined on Jan 2010 @ Israel
#149
Maybe someone know how I can get the button or shortcut icon for a simple bluetooth ON/OFF action ?
I need this for a quickly on/off bluetooth.
Thanks
 

The Following User Says Thank You to Schturman For This Useful Post:
Posts: 1,283 | Thanked: 370 times | Joined on Sep 2009 @ South Florida
#150
Originally Posted by qwerty12 View Post
Yep, I had it work once but then it started to do what you said. See my second method that abuses D-Bus - that worked more than once.
How do you hup that menu with out a reboot?
 
Reply

Tags
maemo mods, mods thread

Thread Tools

 
Forum Jump


All times are GMT. The time now is 04:37.