![]() |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
|
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
Inception |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
' this will be the first one that will work out of the box {maybe just for inception-users and open-moders, but ill do my best to make it work for anybody that can use a terminal and follow instructions in it once}. ' the thing is that you currently need to use a terminal, and set up an upstart file that manages your path depending on how you have it set up. power users will have it set up differently, and non-power users will have know idea how to do it at all. im hoping to make this app-store-able, which inception makes impossible. also, even using inception, i make a lot of privileged shell calls so im going to need to use aegis-ctl as well. n9-button-monitor works very nicely out of the box, but just for open-moders right now, and anyone who knows how to use aegis-ctl when permission errors occur. {i dont know what permission errors youd get, because i havent run it on a non-hacked kernel yet} |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
|
Re: [Anounce] [N9] Volume/Power Button Monitor
Hi there, I'm not succeeding with your script.
I installed xresponse, x11-utils, python-qmsystem, python-qtmobility.multimediakit, python-qtmobility.systeminfo, python-pyside.qtgui and python-pyside.qtcore (is "deps" a package?). Then I created the file /usr/bin/n9-button-monitor containing v0.4 of the script. I gave this executable rights. I also created the .conf-file, and your autostart script in /etc/init/apps (/etc/init isn't writeable). This is the output from "devel-su -c 'python /home/user/MyDocs/n9-button-monitor'": Code:
torch on Code:
2: long-start |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
so, thats a root permission that i didnt realize that aegis didnt give you by default. ive been testing it mostly on open mode, and i forgot to test the camera flash on closed mode since i changed it. for a solution, it is probably sufficient to just run develsh first. i.e.: # devel-su PASSWORD: {rootme} # develsh # python /usr/bin/n9-button-monitor please lemme know if that does it, and ill update the instructions. thanks again! |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
So how do I rewrite the start script to grant the correct permissions? |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
try this to get it to auto-start at boot {i havent tested it on closed mode}. /etc/init/apps/n9-button-monitor.conf Code:
description "Startup script for n9-button-monitor" 1) the click delays {for single/long click actions, you have to wait a half second before they start. for double-click actions, you have to wait .75s. for treble-click, you dont have to wait at all, since there is no quadruple-click actions.} this is very solvable, if you only do long-clicks, partially solvable if you never double-click or treble-click, and unsolvable if you ever wanna do double-treble clicks. 2) the condition detection {figuring out whether youre actually in the camera app, or on the screen-lock, etc} this is not particularly solvable , unless you dont mind weird behaviours in other apps {for instance, the camera-snap would make volume-up click the screen in other apps}. 3) the actions actually take time. e.g.: the camera submodule is slow to initialize. this makes the flash bulb, for instance, take 1-2 full seconds no matter what. theres nothing you can do about this. so! if you only care about the long press actions {flashing and the camera}, you can make it considerably faster by changing the longClickDelayMs from 500 => 1. this will effectively disable all single/double/treble click actions, though. to do this, copy the default config on the OP to /home/user/.config/n9-button-monitor.conf and change the delay. {you have to restart the program}. |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
Extremely useful script though! I love the way I can just pull up the phone and hold one button to get a flashlight! |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
maybe you dont have bash, that should be 'sh' instead. try 'start n9-button-monitor' and 'stop n9-button-monitor' |
Re: [Anounce] [N9] Volume/Power Button Monitor
HOLA. congratulations on your work. I find it very ineresante.
You could create a script to: VOLUME + = torch - on VOLUME - = torch - off I would greatly appreciate it |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
v0.4 supports this, through modification of the config file paste the below code into /home/user/.config/n9-button-monitor.conf Code:
#just to torch on/off for guillermorojaz p.p.s.: be careful with these easy on/off buttons for torch; the flash could turn on in your pocket. the example above auto-turns off after 60 seconds, as a precaution against this. you can make it last longer by changing 'torchAutoShutOffTimeMs=60000' to your liking. to make the flash stay on for an hour, change it from '60000' to '3600000'. |
Re: [Anounce] [N9] Volume/Power Button Monitor
This is getting really good. Im yet to use it. A GUI would be awesome, I would donate if you get that far!
|
Re: [Anounce] [N9] Volume/Power Button Monito
Release where the components python?
|
Re: [Anounce] [N9] Volume/Power Button Monito
Quote:
follow the installation instructions in the first post, and then add the config file i put in the post above. {the release im talking about is the 'v0.4' link.} |
Re: [Anounce] [N9] Volume/Power Button Monitor
I've tried for hours now. It is impossible to get it to autostart. Seriously what should I do?
Code:
description "Startup script for n9-button-monitor" Now I can't start it at all from terminal. Can't get necessary permissions from develsh. How is this possible? Is aegis having fun giving permissions one day and blocking them the next? |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
my current hypothesis for your problem is that its running at startup with incorrect permissions, and then somehow mucking you up. 1) try starting and stopping them manually, instead of restarting. {if you change the /etc/init file, start/stop pick up on the changes instantly.} /sbin/stop n9-button-monitor /sbin/start n9-button-monitor 2) try putting the n9-button-monitor.conf in /etc/init instead of /etc/init/apps; /etc/init/apps scripts have restrictions on what they can and cant say about starting and stopping, and setting nice values, etc. 3) try variations on the exec like youve been doing. use full paths to executables, and try the simpler stuff first. e.g.: exec /usr/bin/n9-button-monitor exec /bin/sh -c /usr/bin/n9-button-monitor 4) verify no other instances are running, with pidof n9-button-monitor {killall -9 n9-button-monitor}. make PIDs show up after starting the job, and make sure stop says its really stopping the job, instead of it wasnt running at all. here is a script that should work for you {only in /etc/init, not in /etc/init/apps} /etc/init/n9-button-monitor.conf Code:
description "Startup script for n9-button-monitor" e.g.: i pause my music like this action=cmd(udo klomp-cmd pause),volumeUp,singleClick,screenLocked source /etc/profile is necessary to get the dbus session. |
Re: [Anounce] [N9] Volume/Power Button Monitor
yea, it seems like you cant run things as root from /etc/init/apps in closed mode. put it in /etc/init
if we cant do that, i think we need to bring inception into the picture |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
Your approach won't work even with Inception. You have to do a proper debian package, which contains the needed _aegis and digsigsums files. Otherwise "root" will not be able to execute the scripts or python application as "user". Aegis-exec won't give you permissions, if those aren't requested in the first place (during installation). Here is an example _aegis file: Code:
<aegis> The upstart script will work after installing a debian package with this file and correct digsigsums included. Digsigsums should be added for "n9-button-monitor.py", "start.sh" and "stop.sh". In order to autostart the application as "user", you need to execute it like this: Code:
exec /usr/bin/aegis-exec -s -l -u user /opt/n9-button-monitor/start.sh |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
p.s.: is there really no way to put a file in /etc/init even with an incepted deb? nokia debs put stuff there; i guess those debs update the immutable-dir hash somehow. |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
|
Re: [Anounce] [N9] Volume/Power Button Monitor
If/when this will be a deb install with a GUI to configure it, I'll be glad to use it and pay for it! Just sayin' :P
|
Re: [Anounce] [N9] Volume/Power Button Monitor
me too
too short |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
|
Re: [Anounce] [N9] Volume/Power Button Monitor
build a deb, aegisized.
turns out i need 'GRP :: pulse-access' to work the flash... |
Re: [Anounce] [N9] Volume/Power Button Monitor
anyone wanna test the deb in the OP?
all you should need to do is install the deb {and the dependencies}, and it should work immediately. {if you reboot, it will start back up after a minute} you can stop it and restart it as root like this: stop apps/n9-button-monitor start apps/n9-button-monitor |
Re: [Anounce] [N9] Volume/Power Button Monitor
Just installed the deb. Works great thanks.
|
Re: [Anounce] [N9] Volume/Power Button Monitor
I've tried the .deb file from the first post but I'm running onto problems when installing it.
1. It wont install with either the app manager nor with xterm "apt-get install". 2. When trying to install the dependency packages it's abborting with an error code 1 (aegis rejecting it). 3. apt-get -f install same problem as 2. 4. It's breaking alot of installed apps when trying to install the n9_monitor.deb, wich can be fixed by reinstalling one of the broken apps. If you need more info just ask, if you want i can upload screenshots. Regards Dousan... I've flashed a custom zImage/kernel to be able to dualboot Nitdroid, could that be the issue? |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
HOWEVER, if you cant apt-get install the dependencies, then something is wrong with your system. these packages are available through normal repositories, and should all 'just work'. this will show you where the packages are coming from: {they should all be downloads.maemo.nokia.com} {run as root} Code:
apt-cache policy xresponse x11-utils python-qmsystem python-qtmobility.multimediakit python-qtmobility.systeminfo python-pyside.qtgui python-pyside.qtcore {run as root} Code:
cat /etc/apt/sources.list.d/* |
Re: [Anounce] [N9] Volume/Power Button Monitor
Thanks for your reply wolke, i'll try it again.
My mistake, it's a mis type of command, i did use dpkg -i 'your.deb' file to try to install it through xterm. Regards Dousan... |
Re: [Anounce] [N9] Volume/Power Button Monitor
I get this with 'apt-cache policy' command
Code:
# apt-cache policy xresponse x11-utils python Code:
# cat /etc/apt/sources.list.d/* |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
you left out the important part; can i see the error when you try to install the dependencies? apt-get install xresponse x11-utils python-qmsystem python-qtmobility.multimediakit python-qtmobility.systeminfo python-pyside.qtgui python-pyside.qtcore |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
Code:
# apt-get install xresponse x11-utils python- |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
apt-get install libpyside1.0 libshiboken1.0 python-support python-pyside.qtnetwork -s |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
Code:
# apt-get install libpyside1.0 libshiboken1.0 |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
|
Re: [Anounce] [N9] Volume/Power Button Monitor
nevermind, its probably this causing it:
deb http://qtlabs.org.br/~lmoura/qt5 unstable main xcb implies you are using unstable qt5 libs that are breaking dependencies. |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
Code:
# apt-get -f install |
Re: [Anounce] [N9] Volume/Power Button Monitor
Quote:
i have absolutely no idea why those wont install. fix the dep problems, then apt-get update && apt-get upgrade, then try again. |
Re: [Anounce] [N9] Volume/Power Button Monitor
Thanks for your help wolke :)
when i do 'apt-get update' i get this error W: GPG error: http://repo.apps.formeego.org ./Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 700116F6792563E3 ~ # Regards Dousan... e: shouldn't one be cautious with 'apt-get upgrade'? |
All times are GMT. The time now is 19:12. |
vBulletin® Version 3.8.8