The Following 45 Users Say Thank You to x-rated For This Useful Post: | ||
alienhead, amin007110, bakuur, bingomion, bman, bunanson, cardiff-blues, ceevee, D4rKlar, dana.s, etuoyo, fw190, gordonshowers, gregoranderson, gttnnn, ivgalvez, jackburton, jedi, JimKnopf, jvl1, Magik, mannakiosk, michaaa62, misiak, mrsellout, nkirk, patrickl, pelago, phedders, saponga, SavageD, sirloon, sixwheeledbeast, skalogre, StefanL, Tiboric, torpedo48, totalentropy, vi_, vkv.raju, Wikiwide, xman, yablacky, YoDude, zimon |
|
2010-06-27
, 16:33
|
Posts: 7 |
Thanked: 0 times |
Joined on Mar 2010
|
#2
|
|
2010-06-29
, 11:38
|
Posts: 25 |
Thanked: 59 times |
Joined on Jun 2010
@ Finland
|
#3
|
Awesome! But somehow X-term is opened twice and I have no idea how to fix this..
The Following User Says Thank You to x-rated For This Useful Post: | ||
|
2010-07-18
, 21:08
|
Posts: 7 |
Thanked: 0 times |
Joined on Mar 2010
|
#4
|
|
2010-08-20
, 05:16
|
Posts: 5 |
Thanked: 0 times |
Joined on Mar 2010
@ Bogotá Colombia
|
#5
|
|
2010-08-20
, 07:46
|
|
Posts: 263 |
Thanked: 231 times |
Joined on Feb 2010
@ wales
|
#6
|
|
2010-08-21
, 08:05
|
|
Posts: 263 |
Thanked: 231 times |
Joined on Feb 2010
@ wales
|
#7
|
|
2010-08-25
, 20:26
|
|
Posts: 271 |
Thanked: 124 times |
Joined on May 2006
@ Aperture Science, Inc.
|
#8
|
sudo gainroot echo 2 > /sys/class/backlight/acx565akm/brightness
echo "echo 2 > /sys/class/backlight/acx565akm/brightness" | sudo gainroot
<menuitem priority="3" name="Brightness"> <icon>terminal</icon> <callback service="com.nokia.xterm" path="/com/nokia/xterm" interface="com.nokia.xterm" method="run_command" bus="session" autostart="true"> <argument type="string">echo "echo 2 > /sys/class/backlight/acx565akm/brightness" | sudo gainroot</argument> </callback> </menuitem>
The Following User Says Thank You to quingu For This Useful Post: | ||
|
2010-08-26
, 09:25
|
Posts: 55 |
Thanked: 72 times |
Joined on Nov 2009
|
#9
|
Hi, I'm trying to run a commandline directly from systemui.xml.
Code:sudo gainroot echo 2 > /sys/class/backlight/acx565akm/brightness
user ALL = (ALL) NOPASSWD: ALL
|
2010-08-26
, 10:08
|
Posts: 55 |
Thanked: 72 times |
Joined on Nov 2009
|
#10
|
- Are those <title> and <po> in the beginning of systemui.xml (but not callui.xml) used for something?
The Following 5 Users Say Thank You to josh For This Useful Post: | ||
Noticed this topic has been handled in some threads but to keep it readable, decided to start a new one dedicated to this. Good tips, ideas and more information about using systemui and d-bus welcome! These might also work with N770/8x0, haven't tried yet.
While playing with the power button menu configuration files at /etc/systemui/, I noticed there's an entry for "Top in XTerm" that starts XTerm with top running. If that is possible then starting any command should be possible, let's add some frequently used tools there. Also noticed some of the entries had icons so those could be added as well. I'm biking a lot and my biggest gripe for the N900 has been awkward access to anything unless you have two hands available, stable environment and full concentration. The power button menu allows starting, or focusing, anything with just a press of the power button and one touch of the large power menu items, easy even when biking.
Seems that all the *.xml files under /etc/systemui folder are loaded when systemui is restarted (see below). The basic structure of these files is:
Don't worry about the priorities at first, just create the buttons and plan on paper how would you like them arranged, then assign priority numbers from lower to higher numbers starting from top left.
I have disabled the shutdown and screen lock entries as those can be accessed by long press and double press anyway. Reboot I might disable too as that's easy enough to do in XTerm, considering that's not needed even every day.
In landscape mode, 14 entries fit the menu nicely, more than that will leave some outside the screen and it doesn't scroll. In portrait mode, 13 entries would (almost) fit, but even with 12 it's difficult to leave the menu without selecting something so a dummy entry might be handy.
My entries:
End task, just icon added:
Plain XTerm (could be root as well but thought this is more general):
Calendar:
Editing instructions:
- Enable root access. If you don't know what is that, please do some homework or wait for someone write a nice tool for editing the power menu. You might brick your device by editing these files as they are loaded in the startup sequence.
- cd /etc/systemui
- cp systemui.xml systemui.xml_backup
- vi systemui.xml (or whatever editor you like)
or
- cp callui.xml mypowermenu.xml;
- vi mypowermenu.xml
Existing icons can be found in /usr/share/icons/hicolor/48x48/hildon (or other folders below 48x48). Own 48x48 icons can be put there as well.
Here's my icon for Nethack:
The new menu can be taken in use by rebooting but a quick way is to restart systemui. Here is a script for that, save somewhere and run when the menu needs to be refreshed:
Some questions waiting for answers:
- Are those <title> and <po> in the beginning of systemui.xml (but not callui.xml) used for something?
- What's the <po> tag anyway?
- How exactly does this <callback> work, what do the parameters mean?
I have used Linux for >15 years but am a complete newbie in Maemo, trying to learn quick:)
Edit 2010-06-11:Added systemui restart instructions/script, info about number of entries, how to start apps without xterm.
Edit 2010-06-11:Added info about portrait mode power menu.
Edit 2010-06-17: Added phone shortcut entry.
Last edited by x-rated; 2010-06-17 at 13:33. Reason: Added phone shortcut entry.