Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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
share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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