/srv/irclogs.ubuntu.com/2014/05/06/#upstart.txt

TrevinhoHi, we've a problem when trying to run unity with upstart at session level.... The fact is that it doesn't, *weirdly* seem to inherit some env variables that are set when gnome-session launches the autostart programs (such as gnome-keyring-daemon)14:33
TrevinhoBasically, what happens is that both unity and unity-settings-daemon are launched "on starting gnome-session", but once all it's loaded14:34
Trevinhoif I open a terminal from unity, then these env variables are not set (env | grep key should show you the one I mean)14:35
Trevinhoinstead, if I do ctrl+alt+t (which causes unity to make unity-settings-daemon to open a terminal), then these are set correctly14:35
TrevinhoAnd the werid thing is that both processess seems (after some debugging) to be launched just before gome-session... But unity doesn't get all the env varialbes it should14:36
Trevinhoalso, gnome session has a dbus call to set/unset env variables and I was wondering if I should bind these calls to set the envs also at upstart level, but they don't seem to be set globally... I mean, not in the terminals I have opened at least14:37
jodhTrevinho: have you compared 'env' with 'initctl list-env'? The session init will by default inherit all variables from the environment that started it and job will be given that environment, plus any variables set with 'initctl set-env key=value' so it may be you need to adjust the time particular jobs start to ensure that any 'initctl set-env's happen before gnome starts autostarting .desktop apps.14:46
Trevinhojodh: well I've tried to launch unity after that gnome-session has set these variables, but then at that point these variables are not set at all (while if I make it launch before they only are set "partially")...14:49
Trevinhojodh: but still I'm wondering why a process that starts before it (unity-settings-daemon) will inherit it, while unity doesn't14:50
jodhTrevinho: I'm confused. Are you saying gnome-session.conf is calling 'initctl set-env'? If it is, does 'initctl list-env' from any terminal show that the vars were set? Might be easier if you raise a bug with just the basic issue as I'm getting confused by all the unity and gnome stuff I'm afraid :-14:52
Trevinhojodh: no, gnome-session is not calling that.... Gnome-session runs some autostart scripts that then set env variables14:53
jodhTrevinho: how are they setting env vars exactly?14:53
Trevinhojodh: I've not checked the internals yet, but there's a gnome-session dbus call for doing that, and I guess that when it's done, gnome-session sets these envs at its level, at that point all the apps it has launched will use them14:55
Trevinhojodh: btw explaing this is probablty harder than seeing it.14:55
Trevinhojodh: you can easily test this by:14:55
Trevinho sudo sed "s/compiz;//" -i /usr/share/gnome-session/sessions/ubuntu.session14:55
Trevinhojodh: then if you reload your unity session, you will see that if you use ctrl+alt+t launches a terminal with different env than if you run it from unity launcher/dash14:55
jodhTrevinho: I'm struggling to see how this is an upstart issue if gnome-session's autostarted apps are making env setting dbus calls on gnome-session?14:56
Trevinhojodh: I'm not saying it's an upstart issue :), I'm just wondering how I can fix this, since we'd like to use upstart to launch unity for multple reasons, but currently we can't do it as it would break the gnome-keyring-daemon env vars14:58
jodhTrevinho: might be a question for the desktop team then as they understand the gnome stack more than I do :) How about raising a bug and assigning to upstart + gnome for discussion?14:59
Trevinhojodh: ok15:00
xnoxTrevinho: with unity, I thought "unity-session" is supposed to be used, not gnome-session.15:00
xnoxTrevinho: also we are working on a fix to get gnome-keyring agents to be spawned correct under upstart and have their environmental variables available everywhere.15:01
Trevinhoxnox: no, we use gnome-session with a unity profile15:01
jodhTrevinho: I really think this discussion should be on #ubuntu-desktop.15:01
Trevinhojodh: ok15:01
=== marcoceppi_ is now known as marcoceppi
josehey, everyone! I'm doing 'setuid username' (with a valid username on the system) for an upstart job and it says '/proc/self/fd/9: 2: /proc/self/fd/9: setuid: not found'21:02
joseany idea on what may be happening?21:02
josefound the error, thanks!21:08

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!