You are not logged in.
Hi!
I am experimenting with an old PC and Arch, trying to get Xorg work the most simple way possible. There is no xinitrc or anything like that, I just use the following command as a normal user:
xinit openbox -- vt1
The xserver starts, Openbox works fine, but there is also an xterm window in which looks like Openbox puts output.
xinit bash -- vt1
This command makes an xterm window with bash running inside. So basically xinit runs the given command inside xterm.
The question is simple: How to make it run the program directly?
Last edited by dj pixus (2020-07-08 17:51:26)
Offline
I just tested and confirmed that without an ~/.xinitrc xinit does indeed try to start an xterm even when a WM or client program is given on the command line. This looks like a bug as this is not the documented behavior.
However, it's also very easy to avoid the problem: create an ~/.xinitrc.
I just confirmed, this is in the code for xinit: on line 168 of xinit.c the default client of xterm is used unless the first command line parameter starts with either a '/' or a '.', so "xinit /usr/bin/openbox" should get the result you intended. I believe this is new behavior since the last time I used xinit - I'll confirm shortly. edit: it would seem this has been around for at least 10 years, though it's particularly odd as the client specified is called via execvp which does path lookup - so a full/relative pathname should not be required. Oh well, one more batshit crazy bit of xinit's code.
EDIT: oops! It is in the man page:
Both the client program name and the server program name must begin with a slash (/) or a period (.). Otherwise, they are treated as an arguments to be appended to their respective startup lines.
The code still is crazy.
Last edited by Trilby (2020-07-07 03:10:36)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Oh, I see. I remember that I read something about the program name must start with a /. I first tried it with a full screen application which worked perfectly so I considered the full path unnecessary. Without a WM I didn't see the xterm window cause it was hiding behind the specified one.
Anyways, specifying the full path solved the issue. Thank You!
Offline
Please remember to mark your thread [SOLVED] (edit the title of your first post).
Offline