Bug 338740 - Xsession script shouldn't be directly sourced(and run using user's default shell)
Summary: Xsession script shouldn't be directly sourced(and run using user's default sh...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kdm
Classification: Miscellaneous
Component: general (show other bugs)
Version: 4.11.10
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdm bugs tracker
URL: https://bugs.launchpad.net/kdebase-wo...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-01 23:59 UTC by V字龍(Vdragon)
Modified: 2018-04-16 20:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description V字龍(Vdragon) 2014-09-01 23:59:05 UTC
Recently I encountered a problem that my input method malfunctions because the environmental variables are wrongly set(which is, fully configured using im-config), after hours of debugging I found that it's Z-shell(my current default shell)'s bug that prematurely quits before the Xsession.d im-config input method configure script completes.

The problem is, /etc/X11/Xsession (and all the Xsession.d scripts it sourced) **shouldn't** be run in Z-shell.  Patching /etc/kde4/kdm/Xsession # invoke global X session script. code from
. /etc/X11/Xsession
to
/etc/X11/Xsession

workarounded the issue (however I have no idea why).  Switching to other display managers instead of KDM worked also)

Reproducible: Always

Steps to Reproduce:
Currently there's no simple reproduce method as another software(zsh)'s bug involved.
Comment 1 V字龍(Vdragon) 2014-09-02 00:02:15 UTC
Downstream bug report:
Bug #1364173 “Xsession sourced scripts shouldn't be run using us...” : Bugs : KDE Base Workspace
https://bugs.launchpad.net/kdebase-workspace/+bug/1364173
Comment 2 V字龍(Vdragon) 2014-09-03 08:08:44 UTC
Here's the Zsh bug report end that Zsh is behave properly, but not the same way as Bash do.
Z-Shell breaks im-config configuration scripts, making input method malfunction
http://www.zsh.org/mla/workers/2014/msg00886.html
Comment 3 V字龍(Vdragon) 2014-09-06 10:11:55 UTC
I found out that kdm runs /etc/kde4/kdm/Xsession using user's default shell.
http://i.imgur.com/xyiJ1b8.jpg

It is not sane as in Xsession(5) manpage notes:
/etc/X11/Xsession  is  a Bourne shell (sh(1)) script which is run when an X Window System session is begun by startx(1) or a display manager such as  xdm(1).
Comment 4 Nate Graham 2018-04-16 20:21:10 UTC
KDM is unmaintained and not used in KDE Plasma 5.

SDDM is the login manager used in KDE Plasma 5. If you still have this same issue with SDDM, please file an issue on the SDDM bugtracker (after doing a search for existing issues first!): https://github.com/sddm/sddm/issues/