mount shared folders in wine applications

  • Hi everyone,

    Let me propose a variation on a question which was solved. We have an omv6 server at the office. I created a folder on it, which can be seen from every pc (win, linux and mac) in the room. They are mostly debian linux, We use windows applications for ocr and advanced pdf functions via wine-playonlinux. Here the solution that we adopted so that it works.

    folder mounting:

    # mkdir -p /mnt/servername

    # mount -t cifs //servername/foldername -o username=xxx,password=yyy /mnt/servername

    # cd /mnt/servername

    boot mount:

    edit the fstab with: sudo gedit /etc/fstab

    then enter the line

    //ipstatic/sharedfoldername /mnt/servername cifs _netdev,nofail,auto,user=xxx,password=yyy 0 0

    That's how it works. We have neither a credential nor a backup problem.

    Now, here is the actual issue: a large external hard disk has been added to omv6, and we created from inside omv6 GUI a separate network folder "B" , which is physically located on the external drive (while folder A is located on a partition of the internal drive of the server). Both folders are perfectly accessible from the linux finder and win10 explorer. On the other hand, wine applications do not see the added hard disk. So I tried to vary the editing of fstab and insert an additional line in which the name of the shared folder is B. The result is that now we see B, but we don't see A. I would need a solution that mounts, even in startup , both folders. Alternatively, I should know where omv6 mounts the usb devices in order to go and look for that directory from within the wine application. But the first possibility is probably better. In other words: the procedure described above works with a folder inside a fileserver or with the folder in the external drive; how can I proceed to mount two or more folders available in the same server, but in different disks?

    I will be grateful for some help.

    Thank you very much

  • essegi62

    Added the Label OMV 6.x
  • When I want to open a file from a program in wine, I click on a drive and then always up. Several times, in the end you come out at /. From there you know where you have mounted your drives.

  • Many thanks for the answer! The problem is the following: I can see from the /mnt directory of wine a network folder of omv6, but I can't see at the same time the hard disk connected via usb to it. Or I see the second and I don't see the first one. I would like to see both at the same time. Maybe I should repeat the procedure followed for the first network folder, substituting the paths, so many times as there are folders to mount. But, perhaps there is a shorter way. Maybe the commands described here could help because they specifically refer to connections via usb and use the /media directory. For my first network folder I used /mnt. Therefore, using /media could be a way to mount a second folder avoiding ambiguity. I cannot say. I will try next week. I have the pc at the office. In the meanwhile I would be grateful for a little help with this problem: given that the solution for the first folder works, how do you mount multiple network folders at the same time? Thanks a lot

  • Is it possible that the USB disk is located under /media/$User? How did you mount the USB disk, automatically or also with an entry in the fstab?

    I use ocrmypdf for ocr, that is in the sources and is really a fancy program. Disadvantage, it is to be operated from the terminal. But advantage: With a single, always identical line, it scans a folder for pdf's and adds an additional text layer to all pdf's. Try it out

    sudo apt-get install ocrmypdf
    find . -printf '%p' -name '*.pdf' -exec ocrmypdf -l deu --rotate-pages '{}' '{}' \; 
  • Hi, thanks for your answer. I have not tried it yet. I will do next week according to the link posted above. It seems possible. Other solutions were also suggested to me in a debian forum, such creating a symbolic link (…s-from-another-hard-drive) or adding a drive via wine ( I will have a look starting from the easiest solution. Anyway, a line should be added to /etc/fstab so that the usb drive is mounted at boot.

    Also, many thanks for your report about the experience with ocr software. It suits to our case, but we look primarily for a software with a GUI because phd candidates with no experience in terminal should use it.

    Thanks again,

  • With ocrmypdf you hardly need any knowledge in the terminal. It is always the same command.

    I scan my documents so that they automatically end up in the same folder. ocrmypdf is installed on the server and converts the pdf's without affecting my computer. In principle, all you would need to do is create a bat file (Windows) or a starter (Linux) and double click to start the whole thing.

  • essegi62

    Added the Label resolved
  • Many thanks for the suggestions! I wanted to let you know that I fixed it. Many guides recommend more complex procedures, but I tried the simplest one and it worked for me. To disambiguate between the two folders (now one appeared and now the other one appeared when trying to open files from within wine apps ). For the first one, as per the commands indicated above, I used the /mnt directory, for the second one /media. In my case, that was quite consistent due to the nature of the documents, a temporary digital archive in /mnt, and a definitive one in /media

    Here are the three commands I used for the second folder

    # mkdir -p /media/archive (where archive is the name of the shared folder)

    # mount -t cifs //mystaticip/archive -o username=xxx,password=yyy /media/archive

    # cd /media/archive

    finally I added this line to /etc/fstab

    //mystaticip/archive /media/archive cifs _netdev,auto,nofail,username=xxx,password=yyy,rw 0 0

    so it was ok since the first attempt. There was no need to give fdisk -l to know the path of the drive (like: sdb1) nor blkid to find UUID. the name of the shared folder is enough.

    I hope it can be useful to others.

    Many thanks again

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!