Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu Mobile and Embedded (http://www.linux-archive.org/ubuntu-mobile-embedded/)
-   -   PPM status (http://www.linux-archive.org/ubuntu-mobile-embedded/3013-ppm-status.html)

"Abbas, Mohamed" 11-07-2007 05:28 PM

PPM status
 
I tried to replace all X call with HAL, there are some HAL call to set brightness but there are no equivalent to set screen saver or dpms. I found another solution to solve running ppmd at boot time as a root causing call X call to fail because the DISPLAY environment will be empty. The work around is:
1- in the display plugin, we only call X call if X is running.
2- We call XOpenDispaly with ":0.0" argument since calling with "" or NULL will fails since we don’t have access to display the $DISPLAY value is NULL if app launched at system start up.
3- There should be a script to run #xhost local:root to give access to root.

Following these steps will prevent any failure in calling X when launched as a system start up.

Any thought?
Mohamed

-----Original Message-----
From: Lynch, Rusty
Sent: Friday, October 19, 2007 9:48 AM
To: Matthew Garrett; Abbas, Mohamed
Cc: Ubuntu-mobile@lists.ubuntu.com
Subject: RE: PPM status

I'm afraid this might not be the best mechanism to use since it assumes you have access to the display, but the daemon is being launched at system startup instead of inside the user session.

I can't just make the script be launched as system startup because other plugins need to be run as root (i.e. the cpu plugin that needs to write to sysfs files.)

I suspect the correct mechanism would be to call hal over the system dbus. You can see an implementation of this in the moblin-applets display applet.

The problem is that ppm is that the ppm display plugin is also making X calls to adjust the screen saver timeout values, and I'm not sure what the correct mechanism would be for this if we are running below the session.

--rusty

-----Original Message-----
From: ubuntu-mobile-bounces@lists.ubuntu.com [mailto:ubuntu-mobile-bounces@lists.ubuntu.com] On Behalf Of Matthew Garrett
Sent: Friday, October 19, 2007 6:48 AM
To: Abbas, Mohamed
Cc: Ubuntu-mobile@lists.ubuntu.com
Subject: Re: PPM status

On Wed, Oct 10, 2007 at 06:24:57PM -0700, Abbas, Mohamed wrote:

> ● Installing xbacklight app, PPM uses this app to control brightness, once
> installed a more accurate measurement can be taken.

How does this interact with the firmware interface to the backlight?

--
Matthew Garrett | mjg59@srcf.ucam.org

--
Ubuntu-mobile mailing list
Ubuntu-mobile@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile

--
Ubuntu-mobile mailing list
Ubuntu-mobile@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile

"Abbas, Mohamed" 11-14-2007 01:46 AM

PPM status
 
Yes Rusty brought my attention to gnome-screensaver, currently I am
looking at this code and hopefully I will come with solution without X.
Mohamed

-----Original Message-----
From: Matthew Garrett [mailto:mjg59@srcf.ucam.org]
Sent: Tuesday, November 13, 2007 6:43 PM
To: Abbas, Mohamed
Cc: Lynch, Rusty; Ubuntu-mobile@lists.ubuntu.com
Subject: Re: PPM status

On Wed, Nov 07, 2007 at 10:28:34AM -0800, Abbas, Mohamed wrote:
> I tried to replace all X call with HAL, there are some HAL call to set
brightness but there are no equivalent to set screen saver or dpms. I
found another solution to solve running ppmd at boot time as a root
causing call X call to fail because the DISPLAY environment will be
empty. The work around is:

Hm, no. This isn't ideal. Anything that's supposed to alter X settings
should run under the context of the session user. Gnome-screensaver is
already able to alter settings in response to dbus events - I suspect
that modelling something along those lines would work better.

--
Matthew Garrett | mjg59@srcf.ucam.org

--
Ubuntu-mobile mailing list
Ubuntu-mobile@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile


All times are GMT. The time now is 07:27 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.