5

A standard xinit command looks like this:

xinit /usr/local/bin/app -- :1 vt2

However, I have a command that looks like this:

xinit /usr/bin/xfreerdp -a 16 -u '' -x m -z --disable-wallpaper --disable-full-window-drag --disable-menu-animations --disable-theming --plugin rdpsnd --plugin rdpdr --data disk:Devices:/media/root -- 10.0.0.197 -- :1 vt2

Notice how the command given to xinit uses "--" in-and-of-itself (before the IP)? Well, xinit complains about it:

Fatal server error:
Unrecognized option: 10.0.0.197

How do I get xinit to allow the use of a "--" within the command given to it?

Please note that I thought about moving the sub-command to it's own bash script, but this is for an LTSP server.

Soviero
  • 4,306
  • 7
  • 34
  • 59

1 Answers1

6

You could try:

xinit /bin/sh -c "exec /usr/bin/xfreerdp -a 16 -u '' -x m -z --disable-wallpaper --disable-full-window-drag --disable-menu-animations --disable-theming --plugin rdpsnd --plugin rdpdr --data disk:Devices:/media/root -- 10.0.0.197" -- :1 vt2
Balázs Pozsár
  • 2,085
  • 1
  • 14
  • 16
  • `xinit`'s first parameter (and the first parameter after `--`) must be full pathnames; otherwise the default `xinitrc`/`xserverrc` respectively will be used and all the parameters will be passed on as parameters to it. I would also `exec /usr/bin/xfreerdp` ...` there. – geekosaur May 13 '12 at 20:29
  • geekosaur: thanks for the edit. I was also thinking about the exec, nice catch – Balázs Pozsár May 13 '12 at 20:33