Super -> exec vs Alt-F2 -> exec have different environment
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | gnome-session (Ubuntu) |
Medium
|
Marco Trevisan (Treviño) | ||
| | Xenial |
Undecided
|
Marco Trevisan (Treviño) | ||
| | upstart (Ubuntu) |
Medium
|
Dimitri John Ledkov | ||
| | Trusty |
Medium
|
Unassigned | ||
| | Utopic |
Medium
|
Unassigned | ||
| | Vivid |
Medium
|
Unassigned | ||
| | Xenial |
Undecided
|
Dimitri John Ledkov | ||
Bug Description
upstart in user session manages environmental variables and most things have them, however Alt-f2 started processes lack them.
[Impact]
Some environment variables are missing from apps that are launcher from Alt+f2 command lens, or in general with dbus-activation (an example might be gnome-terminal, global menu not working).
[Test case]
Super Key -> "xterm" -> Enter -> env | grep SSH
it should return something like:
SSH_AUTH_
Alt+F2 -> "xterm" -> Enter -> env | grep SSH
The returned values should match the results got from the xterm instance that has been ran from unity dash application lens (the one opened with Super).
The same should be checked for the variable XDG_MENU_PREFIX
Before this fix happened we had this result:
via Super Key -> the environment is correct
via Alt-F2 -> it is not
[Regression potential]
Nothing known. Some variables could be overridden, but this is expected.
Related branches
- Marco Trevisan (Treviño) (community): Approve on 2016-04-28
- Upstart Reviewers: Pending requested 2015-05-16
-
Diff: 255 lines (+83/-2)4 files modifieddbus/Makefile.am (+1/-0)
dbus/org.freedesktop.DBus.xml (+9/-0)
init/Makefile.am (+33/-0)
init/control.c (+40/-2)
- VCS imports: Pending requested 2016-04-28
-
Diff: 106 lines (+86/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/export_env_to_upstart.patch (+78/-0)
debian/patches/series (+1/-0)
- VCS imports: Pending requested 2016-04-28
-
Diff: 13147 lines (+12538/-0)121 files modified.bzr-builddeb/default.conf (+2/-0)
debian/50-ubuntu.conf (+2/-0)
debian/55gnome-session_gnomerc (+23/-0)
debian/README.Debian (+45/-0)
debian/changelog (+3170/-0)
debian/compat (+1/-0)
debian/control (+130/-0)
debian/control.in (+126/-0)
debian/copyright (+52/-0)
debian/defaults.list (+346/-0)
debian/gnome-session-bin.install (+7/-0)
debian/gnome-session-bin.postinst (+12/-0)
debian/gnome-session-bin.prerm (+9/-0)
debian/gnome-session-bin.user-session.upstart (+31/-0)
debian/gnome-session-common.dirs (+1/-0)
debian/gnome-session-common.install (+6/-0)
debian/gnome-session-common.links (+1/-0)
debian/gnome-session-wayland.install (+2/-0)
debian/gnome-session.install (+3/-0)
debian/patches/103_kill_the_fail_whale.patch (+41/-0)
debian/patches/13_display_session_properties.patch (+18/-0)
debian/patches/22_support_autostart_delay.patch (+239/-0)
debian/patches/50_ubuntu_sessions.patch (+65/-0)
debian/patches/51_remove_session_saving_from_gui.patch (+66/-0)
debian/patches/53_add_sessionmigration.patch (+26/-0)
debian/patches/95_dbus_request_shutdown.patch (+99/-0)
debian/patches/export_env_to_upstart.patch (+76/-0)
debian/patches/revert_remove_gnome_session_properties.patch (+3992/-0)
debian/patches/series (+9/-0)
debian/po-up/POTFILES.in (+2/-0)
debian/po-up/af.po (+42/-0)
debian/po-up/am.po (+42/-0)
debian/po-up/ar.po (+47/-0)
debian/po-up/az.po (+41/-0)
debian/po-up/be.po (+42/-0)
debian/po-up/be@latin.po (+41/-0)
debian/po-up/bg.po (+48/-0)
debian/po-up/bn.po (+41/-0)
debian/po-up/bn_IN.po (+46/-0)
debian/po-up/bs.po (+44/-0)
debian/po-up/ca.po (+43/-0)
debian/po-up/cs.po (+50/-0)
debian/po-up/cy.po (+41/-0)
debian/po-up/da.po (+42/-0)
debian/po-up/de.po (+52/-0)
debian/po-up/dz.po (+44/-0)
debian/po-up/el.po (+69/-0)
debian/po-up/en_CA.po (+42/-0)
debian/po-up/en_GB.po (+41/-0)
debian/po-up/eo.po (+45/-0)
debian/po-up/es.po (+53/-0)
debian/po-up/et.po (+49/-0)
debian/po-up/eu.po (+45/-0)
debian/po-up/fa.po (+43/-0)
debian/po-up/fi.po (+45/-0)
debian/po-up/fr.po (+50/-0)
debian/po-up/fur.po (+41/-0)
debian/po-up/ga.po (+42/-0)
debian/po-up/gl.po (+51/-0)
debian/po-up/gu.po (+54/-0)
debian/po-up/he.po (+44/-0)
debian/po-up/hi.po (+48/-0)
debian/po-up/hr.po (+40/-0)
debian/po-up/hu.po (+48/-0)
debian/po-up/hy.po (+41/-0)
debian/po-up/id.po (+41/-0)
debian/po-up/is.po (+42/-0)
debian/po-up/it.po (+41/-0)
debian/po-up/ja.po (+49/-0)
debian/po-up/ka.po (+41/-0)
debian/po-up/kn.po (+41/-0)
debian/po-up/ko.po (+41/-0)
debian/po-up/ku.po (+43/-0)
debian/po-up/lt.po (+48/-0)
debian/po-up/lv.po (+46/-0)
debian/po-up/mg.po (+40/-0)
debian/po-up/mi.po (+42/-0)
debian/po-up/mk.po (+44/-0)
debian/po-up/ml.po (+45/-0)
debian/po-up/mn.po (+49/-0)
debian/po-up/mr.po (+49/-0)
debian/po-up/ms.po (+43/-0)
debian/po-up/nb.po (+40/-0)
debian/po-up/ne.po (+46/-0)
debian/po-up/nl.po (+53/-0)
debian/po-up/nn.po (+50/-0)
debian/po-up/nso.po (+42/-0)
debian/po-up/oc.po (+43/-0)
debian/po-up/or.po (+44/-0)
debian/po-up/pa.po (+49/-0)
debian/po-up/patches.pot (+42/-0)
debian/po-up/pl.po (+41/-0)
debian/po-up/pt.po (+42/-0)
debian/po-up/pt_BR.po (+49/-0)
debian/po-up/ro.po (+41/-0)
debian/po-up/ru.po (+41/-0)
debian/po-up/rw.po (+50/-0)
debian/po-up/si.po (+43/-0)
debian/po-up/sk.po (+43/-0)
debian/po-up/sl.po (+47/-0)
debian/po-up/sq.po (+43/-0)
debian/po-up/sr.po (+45/-0)
debian/po-up/sr@latin.po (+45/-0)
debian/po-up/sv.po (+45/-0)
debian/po-up/ta.po (+50/-0)
debian/po-up/te.po (+43/-0)
debian/po-up/th.po (+41/-0)
debian/po-up/tk.po (+42/-0)
debian/po-up/tr.po (+48/-0)
debian/po-up/uk.po (+41/-0)
debian/po-up/vi.po (+43/-0)
debian/po-up/wa.po (+49/-0)
debian/po-up/xh.po (+42/-0)
debian/po-up/zh_CN.po (+41/-0)
debian/po-up/zh_HK.po (+49/-0)
debian/po-up/zh_TW.po (+49/-0)
debian/po-up/zu.po (+42/-0)
debian/rules (+24/-0)
debian/source/format (+1/-0)
debian/ubuntu-session.install (+3/-0)
debian/watch (+2/-0)
| summary: |
- upstart user session variables are not in dbus activated processes + Super -> exec vs Alt-F2 -> exec have different environment |
| Dimitri John Ledkov (xnox) wrote : | #1 |
| Changed in upstart (Ubuntu): | |
| importance: | Undecided → Medium |
| Changed in unity-lens-applications (Ubuntu): | |
| importance: | Undecided → Medium |
| Changed in unity (Ubuntu): | |
| importance: | Undecided → Medium |
| Iain Lane (laney) wrote : | #2 |
Can you please test this with the gnome-session in vivid-proposed / wily? We think it might be the same issue.
| Dimitri John Ledkov (xnox) wrote : | #3 |
The branches attached solve this for me. I hope somebody from upstart team can review them.
I'll try to put a ppa out with that patch in, such that other users that are affected can also test this.
I expect to SRU this change to all stable releases.
| no longer affects: | unity-lens-applications (Ubuntu Trusty) |
| no longer affects: | unity-lens-applications (Ubuntu Utopic) |
| no longer affects: | unity-lens-applications (Ubuntu Vivid) |
| Changed in unity-lens-applications (Ubuntu): | |
| status: | New → Won't Fix |
| no longer affects: | unity (Ubuntu Trusty) |
| no longer affects: | unity (Ubuntu Utopic) |
| no longer affects: | unity (Ubuntu Vivid) |
| Changed in unity (Ubuntu): | |
| status: | New → Won't Fix |
| Changed in unity: | |
| status: | New → Won't Fix |
| Launchpad Janitor (janitor) wrote : | #4 |
Status changed to 'Confirmed' because the bug affects multiple users.
| Changed in upstart (Ubuntu Trusty): | |
| status: | New → Confirmed |
| Changed in upstart (Ubuntu Utopic): | |
| status: | New → Confirmed |
| Changed in upstart (Ubuntu Vivid): | |
| status: | New → Confirmed |
| Changed in upstart (Ubuntu): | |
| status: | New → Confirmed |
| Ilya Murav'jov (muravjov-il) wrote : | #8 |
Hi,
I use Trusty, use Alt-f2 to start konsole. And ssh-agent doesn't run because "set | grep SSH" is empty.
Is there a workaround for this issue?
| Ilya Murav'jov (muravjov-il) wrote : | #9 |
*ssh-agent doesn't work because "set | grep SSH" is empty.
| ltsampros (ltsampros) wrote : | #10 |
Is there any update on this issue? Is there any remedy or workaround since alt-f2 is widely used?
(After all the ssh-agent/
| tags: | added: rls-w-incoming |
| Dimitri John Ledkov (xnox) wrote : | #11 |
There is untested patch attached as a merge proposal here.
In essence the environment variables should be uploaded into the dbus activation environment, such that when unity launcher is dbus activated, it can launch things with same variables as the upstart jobs.
| Iain Lane (laney) wrote : | #12 |
I think it makes sense. DBus in wily (>= 1.9) does similar for Xsession.d managed sessions:
# unset login-session-
unset XDG_SEAT
unset XDG_SESSION_ID
unset XDG_VTNR
# tell dbus-daemon --session (and systemd --user, if running)
# to put the Xsession's environment in activated services'
# environments
dbus-
You probably want to blacklist those same variables.
| Marco Trevisan (Treviño) (3v1n0) wrote : | #13 |
Yeah, agree...
The fix works, but having some blacklist of variables would be nice.
| tags: |
added: rls-w-notfixing removed: rls-w-incoming |
| no longer affects: | unity-lens-applications (Ubuntu) |
| affects: | unity → ubuntu-translations |
| no longer affects: | ubuntu-translations |
| no longer affects: | unity (Ubuntu) |
| Changed in upstart (Ubuntu Trusty): | |
| importance: | Undecided → Medium |
| Changed in upstart (Ubuntu Utopic): | |
| importance: | Undecided → Medium |
| Changed in upstart (Ubuntu Vivid): | |
| importance: | Undecided → Medium |
| Rolf Leggewie (r0lf) wrote : | #14 |
utopic has seen the end of its life and is no longer receiving any updates. Marking the utopic task for this ticket as "Won't Fix".
| Changed in upstart (Ubuntu Utopic): | |
| status: | Confirmed → Won't Fix |
| Changed in upstart (Ubuntu): | |
| assignee: | nobody → Dimitri John Ledkov (xnox) |
| Launchpad Janitor (janitor) wrote : | #15 |
This bug was fixed in the package upstart - 1.13.2-0ubuntu23
---------------
upstart (1.13.2-0ubuntu23) yakkety; urgency=medium
* Cherry-pick upstream fix to publish global session variable changes to
the dbus environment. LP: #1433013.
-- Steve Langasek <email address hidden> Fri, 29 Apr 2016 14:38:53 -0700
| Changed in upstart (Ubuntu): | |
| status: | Confirmed → Fix Released |
| description: | updated |
| description: | updated |
| Changed in gnome-session (Ubuntu): | |
| status: | New → In Progress |
| importance: | Undecided → Medium |
| assignee: | nobody → Marco Trevisan (Treviño) (3v1n0) |
| Iain Lane (laney) wrote : | #16 |
I uploaded gnome-session to yakkety and xenial
| Changed in gnome-session (Ubuntu): | |
| status: | In Progress → Fix Committed |
| Changed in gnome-session (Ubuntu Xenial): | |
| status: | New → In Progress |
| assignee: | nobody → Marco Trevisan (Treviño) (3v1n0) |
| Launchpad Janitor (janitor) wrote : | #17 |
This bug was fixed in the package gnome-session - 3.18.1.2-1ubuntu2
---------------
gnome-session (3.18.1.2-1ubuntu2) yakkety; urgency=medium
* debian/
- Export environment variables to upstart as well, if available (LP: #1433013)
-- Marco Trevisan (Treviño) <email address hidden> Thu, 12 May 2016 14:44:19 +0100
| Changed in gnome-session (Ubuntu): | |
| status: | Fix Committed → Fix Released |
| tags: | added: desktop-trello-import |
Hello Dimitri, or anyone else affected,
Accepted gnome-session into xenial-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
| Changed in upstart (Ubuntu Vivid): | |
| status: | Confirmed → Won't Fix |
| Changed in gnome-session (Ubuntu Xenial): | |
| status: | In Progress → Fix Committed |
| tags: | added: verification-needed |
| tags: |
added: verification-done removed: verification-needed |
| Changed in upstart (Ubuntu Xenial): | |
| status: | New → In Progress |
| assignee: | nobody → Dimitri John Ledkov (xnox) |
| Martin Pitt (pitti) wrote : | #19 |
Hello Dimitri, or anyone else affected,
Accepted upstart into xenial-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
| Changed in upstart (Ubuntu Xenial): | |
| status: | In Progress → Fix Committed |
| tags: | removed: verification-done |
| tags: | added: verification-needed |
| tags: |
added: verification-done removed: verification-needed |
| Launchpad Janitor (janitor) wrote : | #20 |
This bug was fixed in the package gnome-session - 3.18.1.
---------------
gnome-session (3.18.1.
[ Iain Lane ]
* Update Vcs-Bzr for 16.04
[ Marco Trevisan (Treviño) ]
* debian/
- Export environment variables to upstart as well, if available (LP: #1433013)
-- Iain Lane <email address hidden> Fri, 13 May 2016 09:14:24 +0100
| Changed in gnome-session (Ubuntu Xenial): | |
| status: | Fix Committed → Fix Released |
| Chris J Arges (arges) wrote : Update Released | #21 |
The verification of the Stable Release Update for gnome-session has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.
| Launchpad Janitor (janitor) wrote : | #22 |
This bug was fixed in the package upstart - 1.13.2-0ubuntu21.1
---------------
upstart (1.13.2-
* Cherry-pick upstream fixes to publish global session variable changes
to the dbus environment. LP: #1433013.
-- Dimitri John Ledkov <email address hidden> Thu, 19 May 2016 12:04:29 +0100
| Changed in upstart (Ubuntu Xenial): | |
| status: | Fix Committed → Fix Released |


So further experimentation revealed that we should be keeping the DBUS activation environment up to date with all the initctl set-env calls.
Thus initctl set-env calls should call into org.freedesktop .DBus.UpdateAct ivationEnvironm ent in the user session upstart case.