Page 8 of 19 FirstFirst ... 67891018 ... LastLast
Results 71 to 80 of 188

Thread: Power Management gui

  1. #71
    Join Date
    Jun 2006
    Beans
    267

    Re: Power Management gui

    Thank you for the on the documentation, it is a good start. If you want to continue with it I would appreciate it. With the lcd brightness I can work on something using /proc/acpi/video/ but it will take me a little bit to figure it out. If you guys think of anything else or find any more bugs let me know, chadeldridge found a bug in the nvidia settings I'm trying to figure that one out now.

  2. #72
    Join Date
    Jun 2006
    Beans
    267

    Re: Power Management gui

    added autodetection for network interfaces and now you have a dropdown for ipw wireless. I put this in place so next I can add a one-time options tab and you'll be able to set interfaces up and down from a drop-down box.

  3. #73
    Join Date
    Nov 2007
    Location
    Singapore
    Beans
    43
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Power Management gui

    i got this when i ran in the terminal sudo wattospm.py

    Traceback (most recent call last):
    File "/bin/wattospm.py", line 971, in <module>
    Initialize()
    File "/bin/wattospm.py", line 11, in Initialize
    Config.readfp(ConfigFile)
    File "/usr/lib/python2.5/ConfigParser.py", line 286, in readfp
    self._read(fp, filename)
    File "/usr/lib/python2.5/ConfigParser.py", line 462, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
    ConfigParser.MissingSectionHeaderError: File contains no section headers.
    file: /etc/wattospm/config, line: 1
    '<<<<<<< .mine\n'

  4. #74
    Join Date
    Nov 2005
    Beans
    60
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Power Management gui

    So, I've been researching here, and I found out it is very difficult to detect laptop brighthess, mainly because it is very, but very different for each laptop vendor. I was trying to figure out how gnome-power-manager does it, as it easily manages almost every laptop brightness, and it uses something with gconf, and xrandr, that's what I understood in the code, I don't really know C.

  5. #75
    Join Date
    Jun 2006
    Beans
    267

    Re: Power Management gui

    cheaptrick it sounds like your config file is blank for some reason. If you type in:
    Code:
    cat /etc/wattospm/config
    does it say anything?

    felipefoz xbacklight that I'm using now also uses xrandr so I'll stick with that...maybe I'll put in a place for someone to manually put in their options and directory for /proc/acpi/video.

  6. #76
    Join Date
    Nov 2005
    Beans
    60
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Power Management gui

    okay, that would seem more reasonable to me, instead of programming lines and more lines to detect it! It's easier to show people how to find the folders, as laptop-mode does.

  7. #77
    Join Date
    Mar 2006
    Location
    Stockholm, Sweden
    Beans
    692
    Distro
    Ubuntu Development Release

    Re: Power Management gui

    To prevent having to enter root password upon startup - and to make it all a bit more safe - the code should be divided into a deamon part (with the power state detection and state change code, and an application/applet that reads the status of the deamon (in order to display the right icon color), and has a menu entry to Change settings (here gksudo can be used to launch the settings pane). Upon apply settings, the deamon should be restarted.

  8. #78
    Join Date
    Jun 2006
    Beans
    267

    Re: Power Management gui

    I was thinking about doing it that way before, but since I'm just learning python I wanted to get it working in the first place. Now that its working ok I may seperate the portions, it would make things a lot easier. If I get time I can start working on it tonight.

    Edit: also if anyone is familiar with python and dbus could you help me out with the bug here http://ubuntuforums.org/showthread.php?t=1005160 ?
    Last edited by iggykoopa; December 9th, 2008 at 04:51 PM.

  9. #79
    Join Date
    Jun 2006
    Beans
    267

    Re: Power Management gui

    Ok I think I have it daemonized now but I'll have to wait till I get home to test the code. I'll be implementing a log for it soon since now you won't be able to see the output from the commands. I did have one question though, how should I set the permissions on the config file? the deamon reads the settings from config and the user writes to the config to change the options, that way the gui doesn't need to be run as root, but to write to the config either it needs to be owned by the user or writeable by everyone. I don't want it to be writeable by everyone because that would be a security risk, but I want the program eventually to be multi-user. Should I have the installer create a new group that has permissions on that file and add the user to it? The group could be wattospowermanagers or something like that.

    edit: I didn't want to use gksudo to edit the config because it would be annoying to have to type in the root password every time you wanted to change the config, if people think it would be more secure that way I could do it though.
    Last edited by iggykoopa; December 9th, 2008 at 06:10 PM.

  10. #80
    Join Date
    Nov 2005
    Beans
    60
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Power Management gui

    Quote Originally Posted by iggykoopa View Post
    Ok I think I have it daemonized now but I'll have to wait till I get home to test the code. I'll be implementing a log for it soon since now you won't be able to see the output from the commands. I did have one question though, how should I set the permissions on the config file? the deamon reads the settings from config and the user writes to the config to change the options, that way the gui doesn't need to be run as root, but to write to the config either it needs to be owned by the user or writeable by everyone. I don't want it to be writeable by everyone because that would be a security risk, but I want the program eventually to be multi-user. Should I have the installer create a new group that has permissions on that file and add the user to it? The group could be wattospowermanagers or something like that.

    edit: I didn't want to use gksudo to edit the config because it would be annoying to have to type in the root password every time you wanted to change the config, if people think it would be more secure that way I could do it though.
    You can do just like another gnome apps, where there is a button to "unlock" to edit the preferences, It is a good option (and safe), because these settings we are not going to change all the time.

Page 8 of 19 FirstFirst ... 67891018 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •