Hello,
I'm on Windows, so what I say must be adapted to linux.
On Windows the command is tree and I used it and suceeded to import my
tree in LyX using either LyX Code or listings.
The pdf looks OK, so everything seems to work. Here's what I did :
With LyX Code
I switch to LyX Code environnement and then I paste the tree (
Shift-Control V on windows ).
I return to standard environnement.
Note : you MUST be in the LyX Code environnement when you paste because
else LyX will supress all multiple spaces !
With the Listings package, first Insert > Listing and then paste.
Hope it helps.
Siegfried.