[go: up one dir, main page]

Menu

[13a3e6]: / INSTALL  Maximize  Restore  History

Download this file

108 lines (80 with data), 4.2 kB

Calise setup instructions


Generic Installation
NOTE: for differences in distro-specific installation refer below

  Get these needed python2 modules:
    PIL (python imaging): http://www.pythonware.com/products/pil/
    NumPy: http://numpy.scipy.org/
    PyGame: http://www.pygame.org/
    xdg
    ephem: http://rhodesmill.org/pyephem/

  Plus these for building/installing:
    python distutils
    python distutils-extra: http://www.glatzor.de/projects/python-distutils-extra/
    gcc & everything needed to build C programs
    libx11 developement libraries
    python developement libraries
    intltool

  If you want to use the gui of non-daemon version you also need:
    PyQt4: http://www.riverbankcomputing.co.uk/software/pyqt/download


  Now you're ready for building/installing the program, move to the folder 
  where you extracted calise and run:
    $ env python2 setup.py build
    # env python2 setup.py install --prefix=/usr

  Then refresh icon-cache:
    # gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor

  Start calise calibration (in Terminal):
    $ calise --calibrate

    NOTE: before you proceed with calibration-step 3, you have to give write
          permissions to the file returned by step 2 (sysfs backlight path):
            $ interface= #type here the file returned on calibration-step 2 (eg. /sys/class/backlight/acpi_video0/brightness)
            # chmod 666 $interface

          After that you can continue calibration.

  The permission change just applied will reset on reboot since it's managed 
  by udev. In order to make "permanent" changes you have to add a udev rule.
  However it's not good to set permanent write permission also for "guest", 
  to avoid that you can set write permission for video group users (or the 
  group you think swits better)
  Here's how to achieve that (in most distributions, check for udev's rules.d
  directory position, can also be "/lib/udev/rules.d" or others):

    # must be run as root
    for path in /sys/class/backlight/*
    do
      interfaces="`udevadm info -a -p ${path} |
        grep "KERNEL=" |
        sed s'/KERNEL==//' |
        awk -F ['"'] '{print $2}'` ${interfaces}"
    done
    for interface in $interfaces
    do
      udevrule="$pkgdir/lib/udev/rules.d/99-backlight-$interface.rules"
      echo "KERNEL==\"${interface}\", RUN+=\"/bin/chmod 664 /sys/class/backlight/$interface/brightness\"" > $udevrule
      echo "KERNEL==\"${interface}\", RUN+=\"/bin/chgrp video /sys/class/backlight/$interface/brightness\"" >> $udevrule
    done

    NOTE: As said before, you have to be member of the video group or that 
          won't work (of course you can choose the group you prefer)
          If you chose a group different from video, you'll have to edit
          the file other/org.calise.conf (or directly
          /etc/dbus-1/system.d/org.calise.conf if already installed) and
          replace (line 26) like this:
          -    <policy group="video">
          +    <policy group="thegroupyouchose">


  Now you have (hopefully) correctly installed and first configured calise.
  To see what you can do now you may take a look at README, man pages and/or
  cli help options:
    calise --help
    calised --help



Ubuntu (tested on 11.04, 11.10 and 12.04 but also previous should work fine)

  You have to prepare the system so, first enable community repository (for 
  pygame) then run:
    # apt-get install python-imaging python-qt4 python-numpy python-pygame python-setuptools python-distutils-extra python-xdg build-essential python-dev libx11-dev python-pip python-dbus
    # pip install pyephem

  Move to the folder where you extracted calise and run:
    $ env python setup.py build
    # env python setup.py install  --install-layout=deb

  Remaining passages should be the same as generic installation



OpenSuse 12.1 (and probabily also previous)

  Refer to Generic installation.

  NOTE: To un correctly the calibration you need to symlink the program 
        /sbin/udevadm to /usr/sbin, it should be completely safe (and if you 
        think is not, after calibration you can remove the symlink):
        # ln -s /sbin/udevadm /usr/sbin/udevadm