I can't figure out how to use external file with lyx. I only see 1 kind of insert for 'program listing', and nothing in the listing options that looks like a file name.
Insert -> File -> Child Document -> Include Type -> Listing. You will have to manually enter options like firstline in the option box. I am not sure what we can do to make this easier to access... any idea? Bo