Bug 104910 - startx client argument handling inconsistent
Summary: startx client argument handling inconsistent
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: App/xinit (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-02 00:18 UTC by code
Modified: 2018-08-10 20:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description code 2018-02-02 00:18:37 UTC
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 )
Comment 1 GitLab Migration User 2018-08-10 20:30:58 UTC
-- 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.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.