Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 293342 - x11-apps/xinit-1.2.0: /etc/X11/xinit/xinitrc has invalid default client
Summary: x11-apps/xinit-1.2.0: /etc/X11/xinit/xinitrc has invalid default client
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
: 294984 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-11-16 05:44 UTC by Hamlet
Modified: 2009-11-28 21:38 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Alternate patch to xinitrc.cpp to avoid the problem (xinitrc-gentoo.patch,1.29 KB, patch)
2009-11-20 04:54 UTC, Andrew Church
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hamlet 2009-11-16 05:44:14 UTC
I think the "XTERM" in /etc/X11/xinit/xinitrc script from ebuild x11-apps/xinit-1.2.0 is a typo for "xterm".
I realized that when overlooking at message in startkde ebuild warning about the change kde-4.x => KDE_4. I didn't make it, the script didn't find the correct client (/etc/X11/Sessions/kde-4.3), tried to start the default one and failed that as well.
Error message: "/etc/X11/xinit/xinitrc: line 64: exec: XTERM: not found"


Reproducible: Always

Steps to Reproduce:
1. export XSESSION=
2. startx


Actual Results:  
X server is started and immediately shut down, with error message:
/etc/X11/xinit/xinitrc: line 64: exec: XTERM: not found

Expected Results:  
A failsafe environment should be started (xterm).

Just lower-case the "XTERM" on /etc/X11/xinit/xinitrc line 48.
Comment 1 Rémi Cardona (RETIRED) gentoo-dev 2009-11-16 15:59:52 UTC
Please paste the output of :

  emerge -pv xinit

Thanks
Comment 2 Rémi Cardona (RETIRED) gentoo-dev 2009-11-17 08:50:54 UTC
Fixed in 1.2.0-r1.

Thanks
Comment 3 ferret 2009-11-18 21:10:51 UTC
Incorrectly fixed.

The xinitrc file now contains this line:

command=xterm -geometry 80x66+0+0 -name login

Which will cause an error like:
sh: -geometry: not found
Comment 4 Rémi Cardona (RETIRED) gentoo-dev 2009-11-18 23:01:22 UTC
Shit...

Then my bash-shell-script-gone-through-cpp skillz are close to 0.

Help!
Comment 5 ferret 2009-11-18 23:27:43 UTC
Couple of things I can think of that will work:

command=XTERM" -geometry 80x66+0+0 -name login" # only if XTERM has no spaces

command=`echo XTERM -geometry 80x66+0+0 -name login`

read command <<HEREDOC
XTERM -geometry 80x66+0+0 -name login
HEREDOC

I didn't manage to come up with a way that generates the obvious desired script line.  Something with the stringification operator in cpp should have worked, but didn't for me.
Comment 6 Andrew Church 2009-11-20 04:54:28 UTC
Created attachment 210677 [details, diff]
Alternate patch to xinitrc.cpp to avoid the problem

Alternatively, you could just skip setting $command entirely in the failsafe case, and do this instead (as in the attached patch):

if [ $failsafe = "yes" ]; then
        TWM &
        XCLOCK -geometry 50x50-1+1 &
        XTERM -geometry 80x50+494+51 &
        XTERM -geometry 80x20+494-0 &
        exec XTERM -geometry 80x66+0+0 -name login
else
        exec $command
fi
Comment 7 Harald van Dijk (RETIRED) gentoo-dev 2009-11-28 21:09:40 UTC
*** Bug 294984 has been marked as a duplicate of this bug. ***
Comment 8 Rémi Cardona (RETIRED) gentoo-dev 2009-11-28 21:38:55 UTC
Fixed in 1.2.0-r2 and in the x11 overlay.

Thanks :)