LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-04-2016, 06:01 PM   #1
doraimom
Member
 
Registered: Nov 2005
Posts: 288

Rep: Reputation: 30
How to Allow Firebird (installed with WINE) to access remote shared folder from windows?!


Hi.

We use a proprietary software (windows made) to manage our business (selling houses). This software is called "SGI" and it works without the need of any installation. You just need to run it, and it runs perfectly with wine. The problem is the other software that it depends on, an OLD version of FIREBIRD. Firebird is the software responsible to make the connection between the "SGI" in each single computer and the "SGI SERVER", the one that keeps all the data.

With Wine I was also able to install firebird, but the SGI software is unable to access the remote data. I am almost 100% certain that it is due to the different way Linux access the remote computer/folder.

The remote computer SGI must access is called MASTER. The remote folder it must access is inside the partition D:/SGI/ of the MASTER computer.

The Firebird Software makes the connection between the SGI softwares, but the address to be accessed in kept inside SGI.

The SGI software has a file named SGI.INI with the content:

Quote:
[CONFIG]
SERVER=master:\SGI\DADOS\SGI.GDB
DATABASE=IBDATABASE
USER=SYSDBA
PORTA=LPT1
lc_ctype=ISO8859_1;
PathFotos=\\master\D\SGI\FOTOS
The SGI.INI file is the one responsible to state the address of the Server's database. As you can see above, SGI must connect to the remote MASTER computer and access the remote partition D:, and access the file SGI.GDB inside D:/sgi/dados and the folder D:/sgi/fotos

The syntax of the SGI.INI file quoted above is correct and works fine in every windows computer (the "" and "/" signs are all correct).

In windows, the address \\MASTER is enough to link you to the remote computer (the remote computer name is master) though explorer, but since linux mounts everything differently I don't know how to fix the problem.

How can I fix the problem?

I think I must start by creating an auto mount entry in linux and fixing the mount location, for example, as /mnt/abcd. The problem is: how can I tell a windows software running with wine about a mounting location of linux that has no similarity with the windows syntax/partition names, etc.?
After fixing a mount location for the remote computer inside the linux root tree, how will I appoint that location in the SGI.INI file in a way that it understands and works?!

My distro is UBUNTU MATE (a light version of ubuntu).

That's my problems guys, and that what I need help with. I hope you guys can find a solution.
Thank you.
 
Old 05-05-2016, 08:52 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,517

Rep: Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843
Without knowing how the SGI network software works I can only suggest some options. You could try putting the host name (master) and its IP address in the /etc/hosts file. Since the ini file contains the host name it does not appear that you have to mount any shares. When you run the software what kind of errors are you getting?

However, it is possible to map mount points to drives letters using the winecfg utility.
 
Old 05-05-2016, 10:19 AM   #3
doraimom
Member
 
Registered: Nov 2005
Posts: 288

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by michaelk View Post
Without knowing how the SGI network software works I can only suggest some options. You could try putting the host name (master) and its IP address in the /etc/hosts file. Since the ini file contains the host name it does not appear that you have to mount any shares. When you run the software what kind of errors are you getting?

However, it is possible to map mount points to drives letters using the winecfg utility.
michaelk, you are the man!
I have just edited the /etc/host files with the line "IP MASTER", and now my SGI is working!

But, not all are flowers. SGI needs to find the path for the pictures that was inside the .INI file. It seems the SGI sotware is "talking" to the server through Firebird, but for some reason it's not finding the pictures. This kind of problem (SGI not showing the pictures) also happens in windows when the .INI file is not pointing to the picture folder correctly, but that's not the case here, since the path in the .INI file is correct.

What do you suggest me to do? Edit the /etc/host file again somehow?

One more question.. This solution, so far, forces me to fix the IP address of the MASTER PC. Is there a way to edit /etc/hosts file without the IP address, but with some other generic information that allows it to find the MASTER PC, for example, the computer name in the network or something like that that never changes? I can fix the IP address of the master PC, but I also want to know how to avoid the need of doing that.

Thank you.
 
Old 05-05-2016, 10:40 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,517

Rep: Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843
Most routers can assign an IP address. Even though the computer is using DHCP it will always have the same address. This would be the easiest fix. May need some additional information on your network setup.

The syntax for the server and photos looks different in the ini file so not sure how SGI works. It might be a simple case sensitive issue. Make sure the share name on the master and the ini file matches exactly.
 
Old 05-05-2016, 11:19 AM   #5
doraimom
Member
 
Registered: Nov 2005
Posts: 288

Original Poster
Rep: Reputation: 30
Quote:
The syntax for the server and photos looks different in the ini file so not sure how SGI works. It might be a simple case sensitive issue. Make sure the share name on the master and the ini file matches exactly.
That's right. The syntax for
Quote:
SERVER=
and
Quote:
PathFotos=
are different.
I tried to replicate the syntax used for SERVER= in the PathFotos=, but that made no difference at all.

The case sensitive hint is a good one, but I don't think it matters because it's not used by the linux, but only for the SGI/Firebird couple that are not case sensitive. Besides, the case of the letters are all correct in the .INI file, except for the MASTER word, but if that were the problem (the remote computer name), SGI would not work as it's working now and I would get an error message just like before: can't connect to the data base.

Inside the /etc/hosts files I made sure MASTER was upper case.

Do you have any other suggestion?

It seems everything can be fixed through /etc/hosts file, but I still don't know how. Maybe, I should add new lines in the /etc/hosts file pointing to the remote folders. Is that possible?

Thank you again

Last edited by doraimom; 05-05-2016 at 11:21 AM.
 
Old 05-05-2016, 11:36 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,517

Rep: Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843
The /etc/hosts file is only used to resolve host names to IP addresses without using any sort of dynamic name server (DNS).

\\master\D\SGI\FOTOS is typical syntax for host name, share name. It is difficult to know what to change since we no nothing about how the SGI program works. If the pictures can be on the local PC then you could mount windows share and then configure a local drive letter using winecfg. And specify that location in your ini file.
 
Old 05-05-2016, 01:44 PM   #7
doraimom
Member
 
Registered: Nov 2005
Posts: 288

Original Poster
Rep: Reputation: 30
Quote:
\\master\D\SGI\FOTOS is typical syntax for host name, share name. It is difficult to know what to change since we no nothing about how the SGI program works. If the pictures can be on the local PC then you could mount windows share and then configure a local drive letter using winecfg. And specify that location in your ini file.
I think I can tell you more precisely how SGI works.

What I know about how SGI work is:

1) We have an SGI software that works in a standalone mode. That means, it requires no installation and works by itself (half true).
2) Every computer in the place I work has a SGI software.
3) It's not necessary to have anything else besides SGI for it to work! But, why do we need Firebird then?! Simply because we need a common database for every one, otherwise, each software in each computer would have a different database and different information!
4) There is no SGI server! The only thing that exists is a SGI FOLDER in one single computer, where this folder is SHARED in the network. When people run the SGI software in their computers, it could work just fine accessing its local folder, but again, each computer would have a different database. To unify the database, the only thing that changes is that we tell SGI to NOT access its local SGI folder when searching for data, but to access a common remote SGI folder. Here is where Firebird enters! Firebirds talks to SGI and make it possible the access to the remote folder. There is no actual communication between SGIs! Just SGI talking to a shared folder that works as database (through Firebird installed in each computer)!
5) The one responsible for all traffic between SGI and the remote computer's folder is Firebird (a well know software in the market, but we use an old version of it). The actual communication that happens is between Firebird installed in one computer and Firebird installed in the other computer!

So, some facts that we have so far are:
1) SGI works fine with wine. Its window opens and it displays the data.
2) SGI and Firebird, both running with wine, both are working since a remote connection was established (SGI opens and SGI can access the remote data (information about the houses we sell)).
3) The pictures of the house are not showing. When that happens in Microsoft Windows world, it means that the path set in SGI.INI file for pictures/photos was wrong, but we know that it's correct because that's the way it's working in every single Microsoft Windows computer. The path is correct. Here may arise a doubt. Is it necessary to change how the path is written (the syntax) just because we are inside a Linux machine?! Even though, the software is running in a virtual Microsoft Windows environment created by Wine?! In theses, for SGI nothing changed, it's still running as an .EXE file inside a "Windows/Wine Environment". So why the old syntax wouldn't work?! It worked to access the remote computer when it fixed the /etc/hosts file with the remote computer name and IP address. Why the syntax wouldn't work just as good for the pictures path?

So, it's not clear to me yet where the solution might be (or where the problem is).
- Is it something about the syntax of the path in the .INI file?! If so, again, why does it work to find the remote machine but not the remote folder?!
- or maybe, is It something else that need to be done in the /etc/hosts file?! Perhaps, as I said before, I need to mention the remote folder in /etc/hosts just like I did mention the remote computer MASTER in there. You said that /etc/hosts only accept host names, so maybe that information need to be placed somewhere else, a place where network computers and shared folders are supposed to be referred and a place where that kind of information is searched by apps/softwares like wine/firebird.

Do you have a more clear vision about how it works now?

Thank you again and again!

Last edited by doraimom; 05-05-2016 at 01:51 PM.
 
Old 05-05-2016, 05:08 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,517

Rep: Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843
I have a clear vision from a users standpoint but not how it works from an internal networking perspective. I would not expect you to know. Wine provides a compatibility layer for the application and a process that substitutes for the windows kernel but is not a virtual windows.

Yes, I would of thought that adding the master IP address to the /etc/hosts file should of worked for the pictures too but I don't know what is wrong at the moment. It appears that accessing pictures from the master is different then the database. If you could specify a local directory instead of the master then you could trick the program as previously posted.
 
Old 05-05-2016, 05:50 PM   #9
doraimom
Member
 
Registered: Nov 2005
Posts: 288

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by michaelk View Post
If you could specify a local directory instead of the master then you could trick the program as previously posted.
Do you mean to mount the remote network partition in a local directory, then point to that directory instead of the remote folder? How would I edit SGI.INI in order to point to a local directory? SGI is a windows software. If I wanted to point to a local directory in windows, it would look like this:
Quote:
Database=D:\SISTEM\SGI\Dados\numero\SGI.dsv
If I edit it for something like "Database=\mnt\remote-pc-directory" it wouldn't understand it, since there is no letter before the " \ " for the partition (like windows partitions do).

How can I trick it?
Thank you.

Last edited by doraimom; 05-05-2016 at 05:52 PM.
 
Old 05-05-2016, 06:09 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,517

Rep: Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843
Using samba you can mount a remote directory. If the actual windows share name was D the you can manually mount it like:

mount -t cifs //master_ip_address/D /mnt/d

Using winecfg you can configure /mnt/d to map to say d:\ and then hopefully change the ini to match.

It is possible to add an entry in the /etc/fstab to mount the share at boot time.
 
Old 09-01-2016, 01:12 PM   #11
doraimom
Member
 
Registered: Nov 2005
Posts: 288

Original Poster
Rep: Reputation: 30
michaelk, thank you a lot.
I have learned a lot with your replies. It just took me a while to digest everything.

I had to make some modifications in your last tip:

Quote:
Using samba you can mount a remote directory. If the actual windows share name was D the you can manually mount it like:
mount -t cifs //master_ip_address/D /mnt/d
Using winecfg you can configure /mnt/d to map to say d:\ and then hopefully change the ini to match. It is possible to add an entry in the /etc/fstab to mount the share at boot time.
What worked for me was:
mount -t cifs -o username=user,password=password //192.168.0.101/D /mnt/d

My last question to you is, how can I configure FSTAB to do it automatically?


###########################################################################################
An extra question not really related, but, I have been browsing my remote shares through the GUI of Debian using PCManFM 1.2.3, and other file manager apps that are already installed here, but 2 things are bothering me. First, I don't see thumbnails. Second, when I open a picture, for example, in any app available, when I use the arrows to navigate among them, the speed is extremely slow. It seems Debian download every picture at the time I use the arrows showing me a progress bar, speed that is completly different from the ones I get using a windows machine. Is there any way to solve both of these problems?

Thank you very much again.

Last edited by doraimom; 09-01-2016 at 01:13 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
access shared windows folder from redhat praveenvikram24r Linux - Newbie 3 08-17-2012 09:40 AM
Unable to access fedora 10 shared folder from windows nightmare49 Linux - Software 2 08-17-2009 07:41 AM
How to Access windows server 2008 shared folder(samba is installed) from Ubuntu pincustomer Linux - Newbie 3 01-28-2009 05:14 AM
Access Linux shared folder from Windows OS nitinpjairaj Linux - Software 1 08-26-2008 11:54 AM
how to access a shared folder on a windows machine learnfast Linux - Newbie 11 03-12-2005 02:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration