Board index FlightGear Support Tools FGRun

FGRUN prop value with space

FGRun is a graphical frontend to run FlightGear.

FGRUN prop value with space

Postby sleemanj » Mon Jan 11, 2010 9:32 am

Ok, probably a stupid question, but using fgrun, how does one set a property which has a space in the value, eg set /sim/sound/device-name to "Alsa Software on Default" for example.
sleemanj
 
Posts: 9
Joined: Sun Dec 28, 2008 12:40 am

Re: FGRUN prop value with space

Postby Gijs » Mon Jan 11, 2010 5:09 pm

Hi,

open Advanced > Properties on the last page of the launcher (before clicking Run) and create a new property with /sim/sound/device-name="Alsa Software on Default".

Enjoy!
Gijs
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9337
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: FGRUN prop value with space

Postby sleemanj » Wed Jan 13, 2010 8:49 am

Gijs wrote:open Advanced > Properties on the last page of the launcher (before clicking Run) and create a new property with /sim/sound/device-name="Alsa Software on Default".


That does not work unfortunately, neither quotes nor spaces are properly escaped when they get passed to the command line.
sleemanj
 
Posts: 9
Joined: Sun Dec 28, 2008 12:40 am

Re: FGRUN prop value with space

Postby MD-Terp » Wed Jan 13, 2010 10:10 am

Try going back to the very first page (hit "Prev" from the aircraft selection screen) and just tack it on to the "executable" line...??
Cheers,
-Rob.

"Retired" from FlightGear involvement as of July 2010.
viewtopic.php?f=3&t=8809
User avatar
MD-Terp
 
Posts: 2420
Joined: Wed Jan 23, 2008 6:37 am
Location: Baltimore, Maryland, USA
Callsign: N531MD, AVA0025

Re: FGRUN prop value with space

Postby Gijs » Wed Jan 13, 2010 1:41 pm

sleemanj wrote:neither quotes nor spaces are properly escaped when they get passed to the command line.

Hm, you mean the spaces are replaced with _ and " with ' when FG is loaded? I believe our property tree does not allow for ", as strings always are encapsed with '...'. The closes you could get is /sim/sound/device-name=Alsa Software on Default" which will result in: /sim/sound/device-name='Alsa Software on Default'
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9337
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: FGRUN prop value with space

Postby sleemanj » Sun Jan 17, 2010 9:00 am

@MDTerp : That doesn't work either, fgrun tries to execute the entire thing as the executable, rather than an executable with an argument.

@gijs: No I mean the spaces are not replaced with anything, they remain spaces, but they are not escaped, so FG interpets the command line argument as something like...

--prop=/sim/sound/device-name=Alsa
Software
on
Default

ie it see 4 arguments, and promptly dies.

FGrun does not seem to have any way to provide a space within a property, properly. This actually also applies for example to the multiplayer call sign, put in a space and it breaks, where there should be no issue.

Must be a bug in FGrun.
sleemanj
 
Posts: 9
Joined: Sun Dec 28, 2008 12:40 am

Re: FGRUN prop value with space

Postby MD-Terp » Sun Jan 17, 2010 11:24 am

sleemanj wrote:Must be a bug in FGrun.

But, to confirm, you are able to enter the desired command line manually, and FGFS will start with that audio device enabled?
Cheers,
-Rob.

"Retired" from FlightGear involvement as of July 2010.
viewtopic.php?f=3&t=8809
User avatar
MD-Terp
 
Posts: 2420
Joined: Wed Jan 23, 2008 6:37 am
Location: Baltimore, Maryland, USA
Callsign: N531MD, AVA0025

Re: FGRUN prop value with space

Postby sleemanj » Mon Jan 18, 2010 11:50 am

Yes, manually running the command line

fgfs --prop:/sim/sound/device-name=Alsa\ Software\ on\ Default

works correctly.

Setting the property in FGRun does not (even if I insert backslashes to manually escape).
sleemanj
 
Posts: 9
Joined: Sun Dec 28, 2008 12:40 am


Return to FGRun

Who is online

Users browsing this forum: No registered users and 1 guest