5

xinit /usr/bin/firefox seems to do what's expected: to run firefox without a window manager.

xinit firefox seems to do similar, but with a small xterm running behind.

Can someone explain me what's happening here?

Vlastimil Burián
  • 27,586
  • 56
  • 179
  • 309
  • As I don't use `xinit` I can only recommend defining alias `firefox='xinit /usr/bin/firefox'`. Problem gone. – Vlastimil Burián Mar 08 '17 at 00:02
  • If you want to use `xinit firefox` for convenience and you use zsh, just `alias -g firefox="/usr/bin/firefox"` and zsh will replace it automatically. – Dessa Simpson Mar 08 '17 at 02:10

1 Answers1

5

I suspect that you simply do not have an ~/.xinitrc file. When xinit starts it looks for that file and if it does not find it then it runs a tiny xterm. To be exact it runs:

xterm  -geometry  +1+1  -n  login  -display  :0

Also, the command line to xinit is:

xinit [ [ client ] options ... ] [ -- [ server ] [ display ] options ... ]

We can ignore the part after -- (right side) since that is for the server (X server) side, and you are simply using defaults in there. Now for the client side (left side) you have something a little ambiguous: [ [ client ] options ... ]. In other words xinit give preference to options instead of client.

That behaviour is actually described in the man:

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. This makes it possible to add arguments (for example, foreground and background colors) without having to retype the whole command line.

Therefore:

  • /usr/bin/firefox is an X client, so it is executed
  • firefox is a client option, so xterm is executed, with those arguments above and an extra argument (option): "firefox". Exactly this:

    xterm  -geometry  +1+1  -n  login  -display  :0  firefox
    
grochmal
  • 8,489
  • 4
  • 30
  • 60