Session scripts.
Stef Bon
stef at bononline.nl
Mon Oct 5 11:03:00 BST 2009
Scott James Remnant wrote:
> On Thu, 2009-09-10 at 15:39 +0200, Stef Bon wrote:
>
>
>> Are you also planning to add this feature to upstart?? Or is it already
>> possible to do this?? I cannot find an event name for "session added"
>> and "session removed"...
>>
>>
> Events can be sent from any other process via D-Bus or by using "initctl
> emit"
>
> It should be easy enough to patch your session manager to do that, and
> even include environment such as $DISPLAY, $SSH_AUTH_SOCK, etc.
>
Ok, how? I can make ConsoleKit send something with initctl emit like:
initctl emit sessionadded USER=%USER% CK_SESSION_ID=..
and
initctl emit sessionremoved USER=%USER% CK_SESSION_ID=
and in /etc/init:
sessionadded.conf
start on sessionadded
exec add_mount_point_for_this_user $USER
and simular for sessionremoved.
>
>> Futher, I've installed the newest upstart package (0.6.3) and found out
>> that the /etc/event.d directory is not used anymore, I had to create
>> the tty.conf files myself....It would be much better when there is
>> documentation about this.
>>
>>
> There's plenty: man init
>
> Scott
>
No, be serious. There is nothing there about the layout of tty.conf
files in the init directory. I've found plenty about the format in the
/etc/event.d
directory, but that's an old directory, not used in the new versions as
I understand it.
I think it's much clearer if you would add some more documentation and
examples about this and (see above) more to show what's possible with
upstart.
BTW I've read the wiki, found specifications.
Stef
More information about the upstart-devel
mailing list