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:
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 ***
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.
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.
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?
#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.
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.
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.
Created attachment 185921 [details, diff] patch to ebuild xinit-1.0.8-r4 patches the ebuild to use the 2 aforementioned files.
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
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
(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
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!