Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#41092 - [xorg-xinit] installing broken defaults in /etc/skel

Attached to Project: Arch Linux
Opened by Brian BIdulock (bidulock) - Friday, 04 July 2014, 23:27 GMT
Last edited by Andreas Radke (AndyRTR) - Monday, 16 March 2015, 18:18 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Andreas Radke (AndyRTR)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

xorg-xinit PKGBUILD is installing two files in /etc/skel: .xinitrc and .xsession

The .xinitrc installed for a new user breaks xinit and startx because it never launches a session and simply returns.

The .xsession installed for a new user simply calls the install .xinitrc so it breaks xdm logins (and any other dm that uses ~/.xsession).

If the .xinitrc file was not installed for a new user, xinit and startx would default to using /etc/X11/xinit/xinitrc which is fully functional by default and in the backups array.

If the .xsession file was not installed for a new user, xdm would default to using /etc/X11/xinit/xinitrc as well.

Fix: do not install files in /etc/skel in PKGBUILD.

Additional info:
* package version(s)
xorg-xinit 1.3.3-3

* config and/or log files etc.


Steps to reproduce:
remove xorg-xinit and xorg-xdm
create a new user A
install xorg-xinit and xorg-xdm
create a new user B
log into console as new user B
startx <= fails
log into console as new user A
startx <= succeeds

start xdm.service
log into xdm as new user B <= fails
log into xdm as new user A <= succeeds
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Monday, 16 March 2015, 18:18 GMT
Reason for closing:  Fixed
Additional comments about closing:  files removed in 1.3.4-2
Comment by Andreas Radke (AndyRTR) - Saturday, 05 July 2014, 08:42 GMT
.xinitrc make X load files from /etc/X11/xinit/xinitrc.d/* if found and can be used to start a X session without a login manager. So it has its use case.

xsession file is a simple starting point X expects to be there. See here for some
more explenation:

http://manpages.ubuntu.com/manpages/lucid/man5/Xsession.5.html - no idea if Arch has such man page in some pkg.

I see no bug here.
Comment by Daniel Micay (thestinger) - Saturday, 05 July 2014, 09:12 GMT
It could have the same contents as /etc/X11/xinit/xinitrc (formatted sanely...) but I don't think it's very important.
Comment by Brian BIdulock (bidulock) - Saturday, 05 July 2014, 09:29 GMT
Ubuntu is different. On Arch xorg-xdm login calls /etc/X11/xdm/Xsession. Look at it. If ~/.xsession is there it will exec it. The /etc/skel/.xsession installed as ~/.xsession simply call /bin/bash --login -i ~/.xinitrc. The /etc/skel/.xinitrc file sources files from /etc/X11/xinit/xinitrc.d. Files in /etc/X11/xinit/xinitrc.d do not start a window manager so much as an xterm: they initialize a dbus session, start sound modules, and establish XDG user directories. As man xinit(1) says:

"An important point is that programs which are run by .xinitrc should be run in the background if they do not exit right away, so that they don't prevent other programs from starting up. However, the last long-lived program started (usually a window manager or terminal emulator) should be left in the foreground so that the script won't exit (which indicates that the user is done and that xinit should exit)."

The install /etc/skel/.xinitrc file has the last long-lived program (exec gnome-session, exec startkde) commented out. This causes a return to xinit and the session is immediately torn down causing "user B" in the "steps to reproduce" fail to log in. If no /etc/skel/.xinitrc was installed, the default /etc/X11/xinit/xinitrc would run which is in the backups array and by default is functional: it ends with: twm & and exec xterm -geometry 80x66+0+0 -name login The session does not exit until the xterm is destroyed.

If the broken /etc/skel/.xinitrc and /etc/skel/.xsession were not installed, xdm and xinit both default to /etc/X11/xinit/xinitrc which is fine. As it is, these files break X logins from all quarters for new users. How is that not a bug?
Comment by Daniel Micay (thestinger) - Saturday, 05 July 2014, 12:04 GMT
The skeleton configuration could also just be omitted, since the global xinitrc provided by upstream is a sane default. Most installs are going to have the first non-root user created before xorg-server is ever installed anyway, so the documentation on the wiki already has to deal with this.
Comment by Brian BIdulock (bidulock) - Saturday, 05 July 2014, 20:11 GMT
I think that you propose the best solution.

Loading...