FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Accessing folders under Linux
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Accessing folders under Linux
Posted: Tue Aug 19, 2025 10:08 AM
Hi,

Under Windows, from the program on FW, I can access the user's folder like this "C:\Users\"+WNetGetUser()+"\"
1. How can I do this if I run the program under Linux (on Wine) ?
2. The path to the current folder ?
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Accessing folders under Linux
Posted: Tue Aug 19, 2025 04:01 PM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Accessing folders under Linux
Posted: Tue Aug 19, 2025 06:25 PM

Thank you, Antonio! I'll try.

What about the folder creation and deletion functions ?

Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Accessing folders under Linux
Posted: Wed Aug 20, 2025 10:29 AM
1. getenv("HOME") under Linux returns empty for some reason. :(
2. Please write an implementation of the Getcwd() function under FW
Posts: 990
Joined: Wed Oct 19, 2005 02:17 PM
Re: Accessing folders under Linux
Posted: Thu Aug 21, 2025 04:52 AM
Hi Natter !!!

Perhaps our friend @Cristobal Navarro help us. He has a solution to Linux access from Harbour/FWH using SSH class.

Best regards,
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Accessing folders under Linux
Posted: Thu Aug 21, 2025 10:45 AM
Maybe.. If he reads this post :D

1. How can I find out the user's home directory? getenvv("HOME") under Wine will return empty (can I only find out the user's name getenv("USER"))?
2. How to run a script file from under Wine (I run under Windows.bat file via Shell:Run, but as in Linux, there is no cmd there)?
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Accessing folders under Linux
Posted: Thu Aug 21, 2025 04:44 PM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Accessing folders under Linux
Posted: Fri Aug 22, 2025 03:49 PM
Natter wrote: Maybe.. If he reads this post :D

1. How can I find out the user's home directory? getenvv("HOME") under Wine will return empty (can I only find out the user's name getenv("USER"))?
2. How to run a script file from under Wine (I run under Windows.bat file via Shell:Run, but as in Linux, there is no cmd there)?
Hello, what do you need?
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Accessing folders under Linux
Posted: Wed Aug 27, 2025 11:33 AM

Is it possible to execute a Linux script file from a FW program running under Wine ?

Posts: 990
Joined: Wed Oct 19, 2005 02:17 PM
Re: Accessing folders under Linux
Posted: Wed Aug 27, 2025 02:10 PM
Dear Natter !!!

Do you really need to use Wine?

You can use plink.exe from https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html to execute a linux script from FWH applicantion on Linux server.

https://www.thegeekstuff.com/2017/05/putty-plink-examples/#google_vignette

Cristobal's solution is more transparent and sophisticated.

Best regards,
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Accessing folders under Linux
Posted: Wed Aug 27, 2025 04:51 PM

Yes, I use Wine. One part of my clients has Windows, the other has Linux.

Each OS has its own cloud client installed. There are no problems with the Windows client.

I would try FW for Linux, but it's difficult right now.

What do you mean by Cristobal's decision ?

Posts: 990
Joined: Wed Oct 19, 2005 02:17 PM
Re: Accessing folders under Linux
Posted: Wed Aug 27, 2025 06:07 PM

Dear Natter!!!

Do you use FiveLinux?

Best regards,

Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Accessing folders under Linux
Posted: Wed Aug 27, 2025 06:14 PM
I don't have FiveLinux. :(
Posts: 990
Joined: Wed Oct 19, 2005 02:17 PM
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Accessing folders under Linux
Posted: Wed Aug 27, 2025 07:29 PM
Thank you, Baxajaun! Tomorrow I'll try to play with plink.exe