startx handles client arguments without a specific client inconsistently when ~/.xinitrc exists.
Documented behaviour in the manpage for xinit when ~/.xinitrc exists:
a) According to the description "xinit -arg" results in running "~/.xinitrc -arg"
b) This conflicts with the third example (quote: "It will ignore .xinitrc.")
Observed xinit behaviour:
* Behaviour a) is used.
Documented startx behaviour in manpage
* If client arguments are given without a client, do the same as xinit.
* Use xinitrc if it exists and no client and no client arguments are given.
Intended behaviour from sourcecode ("compatibility reasons"):
* Use xinitrc if no client and no client arguments are given
* Use xterm as the client if only client arguments are given
* Otherwise use the given client with the given client arguments
Observed startx behaviour:
* "startx -arg"
-> results in "xinit xterm -arg -- ..."
-> results in ~/.xinitrc with arguments $1=xterm, $2=-arg
I found two issues with this:
1) "xterm" has to be resolved to an absolute path for xinit to work properly. This would restore the behaviour as intended in the code.
The problem can be fixed by setting --with-xterm to an absolute path during ./configure, but DEFAULT_XTERM should be a sane working value as well.
Maybe "defaultclient" should be resolved with "which" or "whereis -b".
2) What is the correct behaviour for startx?
* the way xinit works and is documented in the description
* the way xinit is described in the examples,
* the way startx was written including fix 1)?
I am using Arch Linux with xorg-xinit 1.3.4-4
( ./configure --prefix=/usr --with-xinitdir=/etc/X11/xinit )
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/app/xinit/issues/12.