If my homefolder doesn't have a .xinitrc but has a .xsession consists of:

exec jwm

Will startx -- -nolisten local -nolisten tcp actually process the -nolisten options?

I think if I create a .xinitrc with the same content, startx won't process any option.


startx will split its command line arguments into two groups, separated by the double dash: the X client to start (+ its arguments), and the X server options.

Supplying a .xinitrc is one way to provide a user-specific default for the X client part; it should have no effect at all on the X server options part. If it actually does have an effect, that would be a bug.

In Debian 10, if the user has no .startxrc and no .xinitrc, and the system administrator has not created a system-wide /usr/lib/x86_64-linux-gnu/sys.startxrc (or whichever path is appropriate for your hardware architecture - it does not exist by default anyway), then startx will use /etc/X11/xinit/xinitrc as the X client part.

By default, this will just source the X11 session script /etc/X11/Xsession, which should be universal to all X session startup methods in Debian. It will in turn source any scripts in /etc/X11/Xsession.d/ directory. Among those, /etc/X11/Xsession.d/50x11-common_determine-startup will detect the presence of user's .xsession file, and later 99x11-common_start will execute it with exec, once all the other Xsession.d scripts have been run.

But if you use both -nolisten local and -nolisten tcp server options, will there be any X11 transport methods left usable? According to the X(7) man page, if the DISPLAY variable has an empty string as the host specification, for example with the default DISPLAY value of :0 or :0.0 for the local session, the local transport method would be used. If it has been disabled, I would expect the session to inevitably fail - but I have not investigated this corner of the X11 session startup in any sort of detail since very long ago, so I might be missing something.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.