How to make sabayon work under GARNOME



The problem
------------
* sabayon uses /usr/bin/consolehelper

       [from the man page]
       consolehelper is a tool that makes it easy for console  users  to  run
       system  programs, doing authentication via PAM (which can be set up to
       trust all console users or to ask for a password at the system  admin-
       istrator’s  discretion).   When  possible,  the authentication is done
       graphically; otherwise, it is done within the text console from  which
       consolehelper was started.

* GARNOME applications are installed in a non-standard, "safe" location 
to avoid polluting the system

        ==> A user must set environment variables in order to run the GARNOME desktop

For example:

    [ignore line wrap]

        #!/bin/sh
        
        GARNOME=/opt/garnome
        ACLOCAL_FLAGS="-I $GARNOME/share/aclocal"
        PATH=$GARNOME/bin:$GARNOME/sbin:$PATH
        LD_LIBRARY_PATH=$GARNOME/lib:$GARNOME/lib/firefox-1.0.6:$LD_LIBRARY_PATH
        PYTHONPATH=$GARNOME/lib/python2.4/site-packages:$GARNOME/lib/python2.4/site-packages/gtk-2.0
        PKG_CONFIG_PATH=$GARNOME/lib/pkgconfig:/usr/lib/pkgconfig:$GARNOME/lib/python2.4/site-packages/gtk-2.0
        XDG_DATA_DIRS=$GARNOME/share:/usr/share
        XDG_CONFIG_DIRS=$GARNOME/etc/xdg
        GDK_USE_XFT=1
        
        export ACLOCAL_FLAGS PATH LD_LIBRARY_PATH PYTHONPATH PKG_CONFIG_PATH GDK_USE_XFT XDG_DATA_DIRS XDG_CONFIG_DIRS


* consolehelper ignores the user's environment.

What to do???

A solution
----------
(0) build and install sabayon

(1) rename $GARNOME/sbin/sabayon -> $GARNOME/sbin/sabayon-bin

(2) create a shell script, $GARNOME/sbin/sabayon, owned by root, 
which exports the required environment variables and then exec's
sabayon-bin

For example:
    [ignore line wrap]

        #!/bin/sh
        
        GARNOME=/opt/garnome
        PATH=/opt/python-2.4.1/bin:$PATH
        PYTHON=/opt/python-2.4.1/bin/python
        PYTHONPATH=$GARNOME/lib/python2.4/site-packages:$GARNOME/lib/python2.4/site-packages/gtk-2.0
        export PATH PYTHON PYTHONPATH
        
        exec $GARNOME/sbin/sabayon-bin

Notes:
* On my system python-2.4.1 is installed in a non-standard location.
* It might be better is sabayon used libgnomesu for authentication since
libgnomesu supports consolehelper, PAM, and su.


-Joseph

-- 
joseph_sacco [at] comcast [dot] net




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]