Update: I managed to open the file remotely. For convenience, I moved the file to the remote connection’s root directory, i.e., the desktop (thus eliminating any issues caused by spaces, accents, or special characters). I also changed the code to:
Var f As new FolderItem (LeggiRigoFileDiTesto(4), FolderItem.PathModes.Native)
If f <> Nil Then
if f.Exists then
messagebox "OPEN FILE"
Dim sh As New Shell
Dim command As String = "xdg-open "+ LeggiRigoFileDiTesto(4)
sh.Execute(command)
else
messagebox " Attenzione, probabilmente il file " + LeggiRigoFileDiTesto(4) +" non esiste ..."
end if
Else // User Cancelled
messagebox "Attenzione ... il rigo n°4 del file di configurazione presenta un errore nella path '' " +LeggiRigoFileDiTesto(4) +" ''"
End If
So I removed .Open and added Execute. That way at least it opens the file The test path is: /home/Noeli/Scrivania/desktop/test.ods. And so far I’m happy. Now there are evidently problems managing the full path name where the file I’m interested in is located. The full path would be:/home/Noeli/Scrivania/desktop/HF_UTILS/Listini ed elenchi/Costo Materiali.ods (I deleted the special fonts from the original folder which was H&F Utilità and converted it to HF_UTILS). But doing this the file no longer opens. Any ideas?
What’s the “be:” at the start of that path? should it not be just “/home/Noeli/Scrivania/desktop/HF_UTILS/Listini ed elenchi/Costo Materiali.ods”. If you double click on it does it open correctly?
You are right.
The full path would be: /home/Noeli/Scrivania/desktop/HF_UTILS/Listini ed elenchi/Costo Materiali.ods (I wrote the characters too close together)
The problem remains… evidently Xojo or Linux have trouble handling spaces in network paths and file names? How do I solve this?
Good morning everyone, this morning I had a flash of inspiration. To try to narrow down the possible causes of the problem, I removed spaces, special characters, empty spaces, and anything else that could cause problems from the folders. Instead of spaces, I inserted an underscore (_). Then, instead of mounting the network PC’s desktop, I mounted the folder directly. So the path is now: /home/Noeli/Scrivania/desktop/test.ods and the file opens
I thought if it worked in Windows, it might work in Linux. I don’t use Linux, but I’m developing my own software to do so, so I’m experimenting with xojo in a Linux environment for the first time.