View Single Post
Posts: 5 | Thanked: 1 time | Joined on Jan 2012
#6
Originally Posted by Temporal View Post
Akira, this is what I got so far (this will let you use the camera - and flashlight if you use it):
Code:
sudo hal-set-property --udi /org/freedesktop/hal/devices/platform_cam_shutter --key button_state_value --bool false
Unfortunately this will make the camera button unusable to shortcutd, so you'll have to use

Code:
sudo hal-set-property --udi /org/freedesktop/hal/devices/platform_cam_shutter --key button_state_value --bool true
to restore functions.

There's more details on my thread. I believe the easier way is to fake a dbus signal.
------------------------------------------------------------------
Thx man, that's a useful way to cheat the system hahaha..... but i think too that it's has to be a better way to do it.

I tried to use your code but is not working. When i wrote in the x-terminal:


Code:
sudo hal-set-property --udi /org/freedesktop/hal/devices/platform_cam_shutter --key button_state_value --bool false
And then open the camera app, still the app tells me that the lens cover is closed. So i try to get the state of the varibale to see if something changed. I used this line:


Code:
hal-get-property --udi /org/freedesktop/hal/devices/platform_cam_shutter --key button_state_value
And this was the result:


Code:
Error: libhal_device_get_property_type: org.freedesktop.Hal.NoSuchProperty: No property button_state_value on device with /org/freedesktop/hal/devices/platform_cam_shutter
Then i tried the same comand but with sudo and nothing, i mean, nothing changed and no error message either.

So, after 20 minutes seeing the screen like a crazy person, i figure out, that before i was using the same comand but with a little diference. Instead of "button_state_value" i use "button.state.value". So if i write:


Code:
hal-get-property --udi /org/freedesktop/hal/devices/platform_cam_shutter --key button.state.value
This returns "True". But when i use the same line with sudo dosen't give me any result. I mean, dosen't tells me the state of the variable.

In resume, i tried to use your code like this:


Code:
sudo hal-set-property --udi /org/freedesktop/hal/devices/platform_cam_shutter --key button.state.value --bool false
But again nothing happened, the app of the camera still tells me that the lens cover is closed. And i check the state of the variable and still is "True", so i guess is not changing it.
I was thinking, that maybe is something that i have installed. So, i unistalled some programs like Bless (http://blessn900.com/) and others that i tried to use with the camera. But i keep one of those, the Fcamera app, that let me use the camera, at least for take pictures. This app also tells me that the cover is closed but even with that the app let me take pictures. Do you think that this app is doing something that is blocking the code?