[KDE/Mac] KDE4 and D-BUS

Jonas Bähr jonas.baehr at web.de
Sat Feb 7 16:06:17 CET 2009


Am 07.02.2009 um 15:21 schrieb Julian Mehnle:

> O wrote:
>> If you can figure out how to get sudo to run commands as the local
>> user, I can figure out the rest.
>> Till then, read a little, learn a lot :-)

I did not load the launchd plist automatically in dbus'  
post_activation for two reasons:
1) there is no way to undo it since there is no port-phase  
pre_deactivation
2) it's a macports policy not to start daemons automatically

However, for dbus we could perhaps make an exception. First, the  
software is nearly useless without an open session bus and second, on  
a reboot the launchagent is loaded anyway.

The command to load it in post_activation should be some thing like this
   sudo -u $SUDO_USER launchctl load /Library/LaunchAgents/ 
org.freedesktop.dbus-
session.plist

bye,
Jonas

>
> `man sudo`:
>
> | ENVIRONMENT
> |       sudo utilizes the following environment variables:
> |
> |       [...]
> |
> |       SUDO_USER       Set to the login of the user who invoked sudo
> |
> |       SUDO_UID        Set to the uid of the user who invoked sudo
> |
> |       SUDO_GID        Set to the gid of the user who invoked sudo
> |
> |       [...]
>
> Try it:
>
>  $ whoami
>  julian
>  $ sudo printenv | grep julian
>  MAIL=/var/mail/julian
>  HOME=/home/julian
>  SUDO_USER=julian
>
> -Julian
> _______________________________________________
> kde-mac at kde.org
> List Information: https://mail.kde.org/mailman/listinfo/kde-mac
> KDE/Mac Information: http://techbase.kde.org/index.php?title=Projects/KDE_on_Mac_OS_X



More information about the kde-mac mailing list