Page 10 of 19 FirstFirst ... 89101112 ... LastLast
Results 91 to 100 of 188

Thread: Power Management gui

  1. #91
    Join Date
    Jun 2006
    Beans
    267

    Re: Power Management gui

    ok seperated it into a daemon and gui now. New version is in svn, but I need help writing the init script for the daemon, if no one around here knows how to write one then I'll do some more research and figure it out.
    To run the daemon for now until the init script is done use(when you run it you don't get any output....it's a daemon):
    Code:
    sudo wattospm-daemon.py
    it will log to /var/log/wattospm/log, if the log starts getting too big you can go in the config file at /etc/wattospm/config and set log to False. I'll add an option for that in the gui soon. now you can run the gui as a regular user.
    Code:
    wattospm.py
    I'll try to do some more research on policy-kit and see if I can use that in the future. Now it creates a group called powermanagers and adds the user that installed wattospm to it, if you want other users to be able to control the gui you will have to add them to that group. After you install you will have to log out then back in so the permissions for that group will work correctly. Once the init script is done you wont have to start the daemon manually each time. (hopefully this also fixed the bug with the config file, it wasn't saving the config to the right place in one line of the code)

  2. #92
    Join Date
    Jun 2007
    Location
    Columbus, OH
    Beans
    172
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Power Management gui

    I may be doing something wrong, but I am unable to get this to work at all.

    First of all i have to include python before the command and after i load the daemon i cannot load the app without errors.

  3. #93
    Join Date
    Jun 2006
    Beans
    267

    Re: Power Management gui

    what errors are you getting when you try to load the app?

    edit: also after you load the daemon what does
    Code:
    cat /var/log/wattospm/log
    say?
    Last edited by iggykoopa; December 13th, 2008 at 05:13 AM.

  4. #94
    Join Date
    Jun 2007
    Location
    Columbus, OH
    Beans
    172
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Power Management gui

    I dont even have that dir until /var/logs ... so something more major is wrong it seems. Do you still need to run the installer or just run the app directly?

    Running the installer i get:
    Code:
    chad@laptop:~/wattospm$ sudo python ./installer.py install
    chmod: cannot access `/bin/wattospm.py': No such file or directory
    chmod: cannot access `/bin/wattospm-daemon.py': No such file or directory
    groupadd: group powermanagers exists
    chad@laptop:~/wattospm$

  5. #95
    Join Date
    Jun 2006
    Beans
    267

    Re: Power Management gui

    ok it looks like you have an old version of the installer because I'm having it install the program into /usr/bin now. try deleteing your wattospm directory, then get the newest svn and run the installer again.

  6. #96
    Join Date
    Jun 2007
    Location
    Columbus, OH
    Beans
    172
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Power Management gui

    I did that just before writing ... i have version 31 checked out.

  7. #97
    Join Date
    Nov 2005
    Beans
    60
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Power Management gui

    Quote Originally Posted by iggykoopa View Post
    ok it looks like you have an old version of the installer because I'm having it install the program into /usr/bin now. try deleteing your wattospm directory, then get the newest svn and run the installer again.
    Iggy, there is something wrong with the installer, line 38, there must be corrected for /usr/bin, it is /bin/
    I corrected that and it installed fine, I ran the daemonm, but the app was impossible to run without being superuser, there was a permission error with /etc/wattospm/config. Anyways, after rebooting the machine, it worked fine, (???) and now it's running as you've told us.

  8. #98
    Join Date
    Jun 2007
    Location
    Columbus, OH
    Beans
    172
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Power Management gui

    Even after editing that line i still get this:

    Code:
    sudo python installer.py install
    chmod: cannot access `/bin/wattospm-daemon.py': No such file or directory
    groupadd: group powermanagers exists

    EDIT: nevermind i found the error for the one in the installer down a few more lines in the chmod section. changed /bin/ to /usr/bin/

    Now i can run the app but i get no detected defaults. The first screen is actually completely blank.


    Looks like there is permission issues in the configs as well. Here is the default:
    Code:
    -rwxrwx--- 1 root powermanagers 2469 2008-12-13 08:41 config
    -rw-r--r-- 1 root root          2469 2008-12-13 08:39 config.default
    Ok .. i see something I was doing wrong. I have all this time been running the wattospm.py file from the SVN directory when i should have been running it from /usr/bin/. Mine now starts up and runs fine and the info is displayed on the first page.
    Last edited by chadeldridge; December 13th, 2008 at 03:08 PM.

  9. #99
    Join Date
    Jun 2007
    Location
    Columbus, OH
    Beans
    172
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Power Management gui

    Anyways, after rebooting the machine, it worked fine, (???) and now it's running as you've told us.

    I am guessing because you have to log out and back in to get your username to recognize the addition to the powermanagers group.
    Last edited by chadeldridge; December 13th, 2008 at 02:58 PM.

  10. #100
    Join Date
    Jun 2006
    Beans
    267

    Re: Power Management gui

    ok fixed the problem with the installer. Your still going to get one or two errors from it because I had to put in lines to remove the old versions, if they are already removed for you then it may give you an error message. Once it's installed it shouldnt matter where its run from as long as you use
    sudo wattospm-daemon.py
    wattospm.py
    because the autodetection stuff is run by root now it won't find your username anymore. I just noticed it last night, I might have the installer find it.

Page 10 of 19 FirstFirst ... 89101112 ... 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
  •