Enhanced Upstart User Sessions
Discuss requirements with Desktop Team and others on how the existing Upstart user sessions need to be enhanced to provide suitable facilities to the desktop.
= Key Questions =
* What needs to be stored in a "session"?
(list of entities and data types)
* What interfaces are required to such sessions?
* Is there a 1-to-1 mapping between users and sessions?
* Can/should sessions persist?
* Will users be able to manipulate their own session(s)?
* What is the maximum amount of memory a session _could_ occupy?
(Allowing an arbitrary large amount of data will impact the design).
= References =
* https:/
* https:/
Blueprint information
- Status:
- Started
- Approver:
- Steve Langasek
- Priority:
- High
- Drafter:
- James Hunt
- Direction:
- Needs approval
- Assignee:
- James Hunt
- Definition:
- Review
- Series goal:
- Accepted for raring
- Implementation:
- Started
- Milestone target:
- None
- Started by
- James Hunt
- Completed by
Related branches
Whiteboard
Work Items below taken from https:/
Spec: https:/
= References =
Default environment after Xsession:
COMPIZ_
DEFAULTS_
DESKTOP_
DISPLAY=:0
GDMSESSION=ubuntu
GNOME_KEYRING_
GNOME_KEYRING_
GTK_MODULES=
HOME=/home/stgraber
KRB5CCNAME=
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LOGNAME=stgraber
MANDATORY_
PATH=/usr/
PWD=/home/stgraber
SHELL=/bin/bash
SSH_AGENT_PID=2970
SSH_AUTH_
UBUNTU_
USER=stgraber
XAUTHORITY=
XDG_CONFIG_
XDG_DATA_
XDG_RUNTIME_
XDG_SEAT_
XDG_SESSION_
XDG_SESSION_
--
the shutdown ordering of the user session is racy & hence the whoopsie reports.
Work Items
Work items for ubuntu-
[stgraber] init: Allow Upstart to run as a non-priv user (part 1): add --user option: DONE
[stgraber] init: Allow Upstart to run as a non-priv user (part 2): call prctl(PR_
[stgraber] Ensure 'init --session' still works as it currently does (required for testing upstart as PID 1, but running as a non-root user): DONE
[xnox] Resolve autopkgtest issues (branches to merge are in bug 1075976): DONE
[xnox] Add ability for user jobs to be searched for in multiple directories (command line and/or environment variables: ~/.init *and* /etc/xdg/init/ for example) (to merge): DONE
[xnox] Ensure that when run with --user, conf loaded from ${XDG_CONFIG_
[xnox] init: Allow override files to apply to any conf directory (for example /etc/xdg/init) (branch https:/
[stgraber] init: Add "EventEmitted" D-Bus signal: DONE
[stgraber] init: Add "Restarted" D-Bus signal (should be emitted in main.c after successful call to state_read() on restart): DONE
Work items for ubuntu-
[jamesodhunt] initctl: add 'initctl set-env' command: DONE
[jamesodhunt] initctl: add 'initctl get-env' command: DONE
[jamesodhunt] initctl: tests for environment verbs: DONE
[jamesodhunt] initctl: add --all and --user options: DONE
[stgraber] jobs: Write a dbus and gnome-session job, doing the session bus init and spawning gnome-session once ready: DONE
[stgraber] Xsession: Update Xsession scripts to start upstart: DONE
[stgraber] PPA: Setup test PPA installable on raring including the various user sessions branches and Xsession changes (ppa:stgraber/
[xnox] Handle user logs under XDG_CACHE_
Work items for ubuntu-
[stgraber] init: Allow Upstart to re-exec as a non-priv user: DONE
[stgraber] Make Upstart call initgroups() when running as PID 1 (in init/job_
[jamesodhunt] Remove existing user session code: DONE
[jamesodhunt] init: Create session files in XDG_RUNTIME_DIR: DONE
[jamesodhunt] initctl: add list-sessions command: DONE
[jamesodhunt] init: Add ability to handle ':sys:' and ':user:' events: DONE
[jamesodhunt] Write event+job tests for new system events syntax: DONE
[jamesodhunt] Write event tests for new user events syntax: DONE
[jamesodhunt] Write job tests for new user events syntax: DONE
[jamesodhunt] init: Implement quiescent mode for shutdown: DONE
[jamesodhunt] initctl: Implement 'initctl shutdown' for shutdown: DONE
[jamesodhunt] init: Implement timer handlers for shutdown: DONE
[jamesodhunt] init: Implement shutdown algorithm: DONE
[jamesodhunt] Test session shutdown: DONE
[jamesodhunt] Write upstart-file-bridge create_handler: DONE
[jamesodhunt] Write upstart-file-bridge modify_handler: DONE
[jamesodhunt] Write upstart-file-bridge job_remove_file: DONE
[jamesodhunt] Write upstart-file-bridge delete_handler: DONE
[jamesodhunt] Test upstart-file-bridge as root: DONE
[jamesodhunt] Test upstart-file-bridge as non-root user: DONE
[jamesodhunt] Write upstart-file-bridge documentation and conf files (system+Session Init): DONE
Work items for ubuntu-
[jamesodhunt] init: Ensure Session Inits re-exec when PID 1 does by implementing 'initctl reexec' command: DONE
[xnox] Write tests for multiple confdir directory support: DONE
[xnox] Write tests for override files in alternative confdir directory: DONE
[stgraber] Land the changes in Ubuntu: DONE
Work items for ubuntu-
[jamesodhunt] Write autopkgtest tests for upstart-
[jamesodhunt] Write autopkgtest tests for Session Init re-exec: DONE
[jamesodhunt] Write autopkgtest tests for Session Init re-exec on PID 1 re-exec: DONE
[jamesodhunt] Update Cookbook for Enhanced User Sessions: DONE
Work items:
[seb128] replace update-notifier with upstart jobs (requires upstart-
[stgraber] Prototype an upstart-
[vorlon] create a pam_upstart module that starts the Session Init by spawning 'init --user' with the users full PAM environment: TODO