Reply
Thread Tools
Posts: 1,539 | Thanked: 1,604 times | Joined on Oct 2011 @ With my N9
#41
Originally Posted by wolke View Post
I CANT FIGURE OUT HOW TO CHANGE THE GODDAM SYSTEM VOLUME.

tried with built-in clis:
pulseaudio-utils, alsamixer, amixer

tried with c libraries and all audio APIs i found in the developer api:
qmediaplayer, phonon.audiooutput.

this should SO not be difficult. anybody know how to do this? {programmatically adjust the system volume, such that the slider in the status bar also moves with it}
Have you asked thp?
__________________
Arie|www.everythingn9.com|Nokia N9 64GB x2|Nokia N950

@everythingn9

Temporary Inception Fix


Times Banned from TMO: 4
 
HtheB's Avatar
Moderator | Posts: 3,715 | Thanked: 7,419 times | Joined on Dec 2009 @ Bize Her Yer Trabzon
#42
Originally Posted by wolke View Post
key features are missing, like music-control and HtheB-style-volume-control, and its a ***** to install and run because it needs super-privileges.
Never heard of inception before? You have super priviliges if you incept the package. You can make a special version for inception users, so we can activate this.

Inception
__________________
www.HtheB.com
Please donate if you think I'm doing a good job.
 
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#43
Originally Posted by HtheB View Post
Never heard of inception before? You have super priviliges if you incept the package. You can make a special version for inception users, so we can activate this.

Inception
thanks, but i know about inception;
'
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}
__________________
~ teleshoes ~
 
Posts: 1,539 | Thanked: 1,604 times | Joined on Oct 2011 @ With my N9
#44
Originally Posted by wolke View Post
thanks, but i know about inception;
'
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}
I don't think it being app store useable is that important. I think once the idea is implemented it's easier to work from there.
__________________
Arie|www.everythingn9.com|Nokia N9 64GB x2|Nokia N950

@everythingn9

Temporary Inception Fix


Times Banned from TMO: 4
 
Posts: 7 | Thanked: 4 times | Joined on Apr 2012 @ Sweden
#45
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
Permission denied: opening file /home/user/.omap3cam
Starting camera without viewfinder available
Permission denied: opening file /home/user/.omap3cam
auto shut-off
torch off
Permission denied: opening file /home/user/.omap3cam
After I've locked the screen and pressed VOL+:
Code:
2: long-start
torch on
running cmd "xprop -root _NET_ACTIVE_WINDOW"
running cmd "xprop -id 0xe0006e
 WM_COMMAND"
2: long-stop
torch off
Permission denied: opening file /home/user/.omap3cam
running cmd "xprop -root _NET_ACTIVE_WINDOW"
running cmd "xprop -id 0xe0006e
 WM_COMMAND"
Nothing happens... What am I doing wrong?

Last edited by GuSec; 2012-04-06 at 07:29.
 

The Following User Says Thank You to GuSec For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#46
Originally Posted by GuSec View Post
Hi there, I'm not succeeding with your script.
....
Permission denied: opening file /home/user/.omap3cam

Nothing happens... What am I doing wrong?
first, thanks! youre the first person to try it out in the wild and tell me about it.

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!
__________________
~ teleshoes ~
 
Posts: 7 | Thanked: 4 times | Joined on Apr 2012 @ Sweden
#47
Originally Posted by wolke View Post
first, thanks! youre the first person to try it out in the wild and tell me about it.

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!
Now it worked just fine and did exactly what it was supposed to do! It's a bit slow though, which matter most with the camera, but it may be affected by a simultaneous execution of the non working start script.

So how do I rewrite the start script to grant the correct permissions?
 

The Following User Says Thank You to GuSec For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#48
Originally Posted by GuSec View Post
Now it worked just fine and did exactly what it was supposed to do! It's a bit slow though, which matter most with the camera, but it may be affected by a simultaneous execution of the non working start script.

So how do I rewrite the start script to grant the correct permissions?
just do devel-su -c "develsh -c 'CMD'".

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"
author "elliot.wolk@gmail.com"
console none
respawn
exec bash -c 'source /etc/profile; PATH=$PATH:/usr/local/bin; develsh -c n9-button-monitor'
there are 3 things that make camera actions slow:
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}.
__________________
~ teleshoes ~
 

The Following User Says Thank You to wolke For This Useful Post:
Posts: 7 | Thanked: 4 times | Joined on Apr 2012 @ Sweden
#49
Originally Posted by wolke View Post
just do devel-su -c "develsh -c 'CMD'".

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"
author "elliot.wolk@gmail.com"
console none
respawn
exec bash -c 'source /etc/profile; PATH=$PATH:/usr/local/bin; develsh -c n9-button-monitor'
This did not work out (chmod 755 /etc/init/apps/n9-button-monitor.conf)! The strange thing is that "source /etc/profile; PATH=$PATH:/usr/local/bin; develsh -c n9-button-monitor" works out just fine in the terminal, it does exactly what it's supposed to. So what's up with autostart?

Extremely useful script though! I love the way I can just pull up the phone and hold one button to get a flashlight!
 
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#50
Originally Posted by GuSec View Post
This did not work out (chmod 755 /etc/init/apps/n9-button-monitor.conf)! The strange thing is that "source /etc/profile; PATH=$PATH:/usr/local/bin; develsh -c n9-button-monitor" works out just fine in the terminal, it does exactly what it's supposed to. So what's up with autostart?

Extremely useful script though! I love the way I can just pull up the phone and hold one button to get a flashlight!
cool! glad you like it.

maybe you dont have bash, that should be 'sh' instead.
try 'start n9-button-monitor' and 'stop n9-button-monitor'
__________________
~ teleshoes ~
 
Reply

Tags
harmattan, nokia n9


 
Forum Jump


All times are GMT. The time now is 14:19.