Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 263192 - x11-apps/xinit supplies scripts require xterm (and twm)
Summary: x11-apps/xinit supplies scripts require xterm (and twm)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-21 00:27 UTC by Olliver Schinagl
Modified: 2009-11-06 09:55 UTC (History)
0 users

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


Attachments
remove non-existant binaries from scripts (gentoo-minimal-xinit.patch,4.45 KB, patch)
2009-03-22 23:46 UTC, Olliver Schinagl
Details | Diff
infinite loop using sleep 1d (idle.sh,48 bytes, text/plain)
2009-03-22 23:48 UTC, Olliver Schinagl
Details
patch to ebuild xinit-1.0.8-r4 (xinit.patch,857 bytes, patch)
2009-03-22 23:49 UTC, Olliver Schinagl
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olliver Schinagl 2009-03-21 00:27:01 UTC
x11-apps/xinit gets pulled in by xorg-server. Xorg-server doesn't need xterm or anything fancy (when for example building a dedicated freevo/mplayer box.

One can start X and run mplayer without a problem; however using startx uses /etc/X11/xinitrc/xinit to want to start an xterm amongst other things, which aren't available. This also applies to /etc/X11/Xsession.

xinit shouldn't depend on xterm or the like, it should install an xinit that doesn't use anything that's not installed yet; or, do we need xinit at all when only installing xorg-server?

Reproducible: Always

Steps to Reproduce:
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-03-21 01:47:26 UTC
If you install x11-apps/xinit with the "minimal" USE flag set, it doesn't depend on any package you mentioned.

*** This bug has been marked as a duplicate of bug 110880 ***
Comment 2 Olliver Schinagl 2009-03-21 02:47:13 UTC
this is not the same as #110880

with only xorg-server emerged, doing a 'startx' results in a failure, no such file or directory, xterm.

E.g. the script runs an xterm, which isn't installed. So if the minimal flag makes it that it doesn't install those init's, or atlest not with those apps in it, then the -minimal flag would still run an xterm, twm and xclock. (Which seems to be the case now). In such case, xinit needs then depend on those apps and pull them in.


I tried the minimal flag, but the xf86-video-ati driver needs an xorg-server without the minimal flag set. I'll figure out what's going on there tomorrow.
Comment 3 Olliver Schinagl 2009-03-21 14:38:50 UTC
Also, I just realized I was running on a complete -minimal install. Only xorg-server has an entry like x11-base/xorg-server -minimal in my packages.use, which is needed by xf86-video-ati for some strange reason. So if -minimal would remove those scripts/entries in those scripts it appears to be not doing it's thing.
Comment 4 Steev Klimaszewski (RETIRED) gentoo-dev 2009-03-22 07:00:48 UTC
Bug 110... points out that the reason for the stuff being pulled in and attempting to run xterm is because it is the fallback entry from xinit.  This is the same as upstream's xinitrc and unfortunately, startx is provided by xinit.  The fallback entry is what brings in the other apps.  I don't quite understand what you are asking for in this bug, could you please further clarify what you mean?
Comment 5 Olliver Schinagl 2009-03-22 15:39:09 UTC
#110 speaks of bochs :p

Anyway, the problem is, it's not so clean nor nice to have a system that gives 'no such file or directory' errors.

E.g. You emerge freevo on a minimal box, you dont' get xorg-x11 but only xorg-server and xinit; this is all fine, but if you now use startx you only get errors. It's nothing big and only a minor thing, it's still not nice and clean.

freevo -fs for example launches it's own X server and won't even notice anyway.

The fix i'd suggest, is that if a minimal setup like such is build, e.g. without xorg-x11 (i belive that is the thing that pulls those deps in 'naturally') is to remove the xterm, xclock and twm commands and just have X start an empty server.
#c1 above mentions that if you use the minimal useflag, xterm etc aren't pulled in. That may be so, but then xinitrc would need to be patched to not run xterm etc.

I'll write up a patch and attach it in about an hour.

Comment 6 Olliver Schinagl 2009-03-22 23:46:26 UTC
Created attachment 185918 [details, diff]
remove non-existant binaries from scripts

Ok a little longer then an hour, but here it is anyway. This won't affect the .cmd files as it looks like this is only for OS/2? I don't have any box or anything to test that with, so I'm not touching it.

This probably won't win any beautycontest either; but it solves the issue where a user would get a 'no such file or directory' error. startx and xinit atleast work now.
Comment 7 Olliver Schinagl 2009-03-22 23:48:00 UTC
Created attachment 185920 [details]
infinite loop using sleep 1d

So xinit wants to execute something by default, it cannot not execute nothing as it is setup to exit once something is terminated. You tell it to run nothing, it'll immediatly exit and won't do much.

this little shell script just sits there and sleeps forever until killed.
Comment 8 Olliver Schinagl 2009-03-22 23:49:13 UTC
Created attachment 185921 [details, diff]
patch to ebuild xinit-1.0.8-r4

patches the ebuild to use the 2 aforementioned files.
Comment 9 Rémi Cardona (RETIRED) gentoo-dev 2009-11-05 20:51:11 UTC
This is now fixed in the x11 overlay and will soon be available in portage.

Just emerge xinit with USE=minimal and use your own .xinitrc to override the default one and launch whatever apps you want.

Thanks
Comment 10 Olliver Schinagl 2009-11-06 00:49:43 UTC
I'll reopen if I bump into it again.

Just as a note, 'define your own .xinirc to overide the default one' isn't a fix though is it? it's a workaround to a bug.

What if the user deletes/changes his own .xinitrc you still run into errors and a server that won't start. But i'll check out the fix and see what a default config does. Might be a few months though most probably :p
Comment 11 Rémi Cardona (RETIRED) gentoo-dev 2009-11-06 07:06:02 UTC
(In reply to comment #10)
> I'll reopen if I bump into it again.
> 
> Just as a note, 'define your own .xinirc to overide the default one' isn't a
> fix though is it? it's a workaround to a bug.

There's no bug, that's how xinit work. You don't _have_ to use xinit to launch X. You don't _have_ to use startx. It's just a tool that _helps_ you start X by doing mundane tasks for you.

If you want complete control over the process, then don't use startx. It's as simple as that.

Cheers
Comment 12 Olliver Schinagl 2009-11-06 09:55:47 UTC
That is all very true, but it still is the case, that if you do use it, you get errors about missing things, and thus, missing dependencies if that's it's default behaviour.

A dummy xterm I suppose could be enough to resolve it!