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?

2
  • As I don't use xinit I can only recommend defining alias firefox='xinit /usr/bin/firefox'. Problem gone. – LinuxSecurityFreak Mar 8 '17 at 0: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. – Duncan X Simpson Mar 8 '17 at 2:10
6

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
    

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.