Because of <https://xojo.com/issue/29275> I’m unable to use FolderItem.Launch on a directory to open it up for the user to see a file. This bug also prevents me from launching a PDF file.
Does anyone know of another way to Show a File or Directory in Linux?
Would a shell command of some sort work?
Can you actually open the file in the file browser on this distro ?
The notes in the case specifically say that doing this in the file browser also doesn’t work
- Build the example project Xojo\Xojo 2013r2\Example Projects\Files\FileBrowser.xojo_binary_project for Linux.
- Run the resulting FileBrowser program on Linux.
- Navigate to a data file with a space in it (I tried it with a PDF files and TXT files).
- Double-Click the data file to launch it. It won’t do anything.
In this case, I’m not actually launching the file, I’m launching the containing folder to show the user where a file is. And yes, I can navigate to the directory with no problems.
This might be a slightly different use case scenario but I think it’s the same thing.
I’m simply doing this:
myDB.DatabaseFile.parent.Launch which works on Mac & Windows. On Linux it generates an OS level error.
The file is in /home/bob/companyname/appname server/ and the error message says:
Unable to run the command specified. The file or folder file:///home/bob/companyname/appname\ server/ does not exist.
Sounded pretty similar to the case I referred to. If not, it’s another @#*^&$ bug in Linux that’s either never been report or never fixed. It’s frustrating.
Yeah I was just wondering if the same issue existed in the file browser as that case mentioned - hence my question
depending on what kind of file it it the command “xdg-open” might work for some
But it relies on there being a registered app to handle the file type at the OS level
But in this case it’s just a directory in the File Manager.
I dont know if there’s any other way to make the file browser show up & show a specific location
Is there any reason why this shows the URL path ?
Here f.launch does open a folder.
Here is how you do it in shell
dim s as new shell
//or s.execute("nautilus "+f.ShellPath)
Tested in Linux Mint.
Michel’s code works for me on Mint 17.2 32-bit and Mint 17.3 64-bit.
Cool. I will try it when I get a chance!