Using a Microsoft style command line syntax for a Linux program really doesn't make sense. I think that it would be best to drop the MS style arguments from Linux. It's too difficult to get the parsing right.
For example "/admin" is a legal file name. How can you tell whether it is a connection file or a file name. I don't like changing the arguments, though I do sympathize with the idea of having the arguments appear compatible with other RPC clients. Having a one-time change in command line arguments *might* be OK, if there is sufficient warning to the users, and a long period to allow scripts to change. This change will cause a lot of pain to a lot of users. Let's make sure that the pain is justified. ----- Original Message ----- From: "Marc-André Moreau" <marcandre.mor...@gmail.com> To: "Christian Nilsson" <nik...@gmail.com> Cc: "Freerdp-devel" <freerdp-devel@lists.sourceforge.net> Sent: Tuesday, December 4, 2012 8:00:21 AM Subject: Re: [Freerdp-devel] Why is there a change in the command line interface? Hi, As explained earlier, the new command-line options are first based on the mstsc options, from which we extend to add all our options. You can find the mstsc command-line reference here: http://windows.microsoft.com/en-US/windows-vista/Use-command-line-parameters-with-Remote-Desktop-Connection mstsc [<connection file>] [/v:<server[:port]>] [/admin] [/f[ullscreen]] [/w:<width>] [/h:<height>] [/public] | [/span] [/edit "connection file"] [/migrate] [/?] Since we support both syntaxes, /v becomes -v Using an option for the hostname means we can put the hostname anywhere we want in the command. With mstsc, the only option-less argument that can be passed is the .rdp connection file. If we were to retain the old syntax where the hostname is always the last argument and option-less, then we would not be able to really make the difference between xfreerdp being invoked with a .rdp file and xfreerdp being invoked with a hostname, unless we check for the .rdp file extension. Now you do bring a point that since putting the hostname last is no longer enforced, this breaks the old functionality where multiple command lines could be passed once to xfreerdp to launch multiple instances. It would be possible to use some sort of a separator to divide set of options and provide similar functionality. However, I'd like to know more about who, why and how this feature was used exactly, and if we should do it the same way (multiple set of options in a single command-line that can only be entered once). What happens if you want to launch another session from the same instance after it has already been launched? Here is what I suggest as a replacement or addition: Add a command-line argument giving the path to a local named pipe like /tmp/freerdp, on which the given xfreerdp instance would listen for further command-line strings. We could also make it such that xfreerdp could be ran without launching a session, and just listen for connection command lines. What do you think? On Tue, Dec 4, 2012 at 10:34 AM, Christian Nilsson <nik...@gmail.com> wrote: > Why do we need to add -v before hostname? > Is it it still needed to have host as the last option on the commandline? > > There is other applications that can take them in any order (mplayer is > one example i have mentioned before) > Is there still multi connection support as in FreeRDP-old (one instance of > xfreerdp connected to multiple servers) If not giving commands in any order > should be trivial? And even if there is multi connections support it shuld > work with a command like: xfreerdp -globalopt1 -globalopt2 host1:3389 > -opt-for-host1 host2:3399 -opt-for-host2 > > This -v option dosn't make sense to me. > > Regards > Christian > > On Tue, Dec 4, 2012 at 8:19 AM, Kevin Dalley <kdal...@vmware.com> wrote: > >> OK. I understand it a little bit more. I hadn't realized that the >> server name and port are now optional, >> rather than mandatory. I tested the new parser briefly. There do seem to >> be a lot of changes. >> It will take me a while to determine whether I understand it and can use >> it. >> >> Some suggestions: >> >> If file is optional, then it should have an option in front of it, >> otherwise it should be >> mandatory. >> >> Test this parser for quite a while before switching to it in stable. >> >> There are very reliable CLI parsers already written. Writing a new one >> brings a strong risk that there are some cases which are not interpreted >> correctly. >> >> Here's a case which seems to be interpreted incorrectly. >> Since the file name starts with "/", the parser assumes that we >> are using windows style options. >> >> $ xfreerdp /tmp/foo -v 10.113.138.75:3389 >> error: server hostname was not specified with /v:<server>[:port] >> >> ----- Original Message ----- >> From: Marc-André Moreau <marcandre.mor...@gmail.com> >> To: Kevin Dalley <kdal...@vmware.com> >> Cc: Alex Bligh <a...@alex.org.uk>, Freerdp-devel < >> freerdp-devel@lists.sourceforge.net>, Alexis Moinet < >> alexis.moi...@umons.ac.be> >> Sent: Mon, 03 Dec 2012 20:15:41 -0800 (PST) >> Subject: Re: [Freerdp-devel] Why is there a change in the command line >> interface? >> >> Hey, I haven't magically brought back the old *options* back, only the >> syntax. >> Your command should be: >> xfreerdp -v 10.113.131.83 >> >> On Mon, Dec 3, 2012 at 6:31 PM, Kevin Dalley <kdal...@vmware.com> wrote: >> Somehow, running the command does not seem to work for me. >> >> >> ~/bin/xfreerdp 10.113.131.83:3389 >> >> error: server hostname was not specified with /v:<server>[:port] >> >> >> I see a potential problem with >> >> >> freerdp_detect_windows_style_command_line_syntax >> >> >> If any of the arguments are a file name which starts with a "/", then the >> command line would be assumed to be >> >> windows style. >> >> >> ----- Original Message ----- >> >> From: "Alex Bligh" <a...@alex.org.uk> >> >> To: "Marc-André Moreau" <marcandre.mor...@gmail.com> >> >> Cc: "Alex Bligh" <a...@alex.org.uk>, "Kevin Dalley" <kdal...@vmware.com>, >> "Freerdp-devel" <freerdp-devel@lists.sourceforge.net>, "Alexis Moinet" < >> alexis.moi...@umons.ac.be> >> >> >> Sent: Sunday, December 2, 2012 11:58:47 PM >> >> Subject: Re: [Freerdp-devel] Why is there a change in the command line >> interface? >> >> >> On 2 Dec 2012, at 18:41, Marc-André Moreau wrote: >> >> >> > I have added support for both syntaxes. Detection of the syntax is >> >> > performed by checking if arguments start with / or not. >> >> > >> >> > Right now the help will show only the windows-style syntax, but the >> >> > arguments are exactly the same for the other syntax, aside from the >> syntax >> >> > itself. >> >> >> You could always display windows help from /help and POSIX help from >> --help. >> >> >> -- >> >> Alex Bligh >> >> >> >> ------------------------------------------------------------------------------ >> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >> Remotely access PCs and mobile devices and provide instant support >> Improve your efficiency, and focus on delivering more value-add services >> Discover what IT Professionals Know. Rescue delivers >> http://p.sf.net/sfu/logmein_12329d2d >> >> _______________________________________________ >> Freerdp-devel mailing list >> Freerdp-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/freerdp-devel >> > > ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Freerdp-devel mailing list Freerdp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freerdp-devel ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Freerdp-devel mailing list Freerdp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freerdp-devel