Auto mount shared network folder in wine applications and edit /etc/fstab

Hi everyone,
This is the first time that I use manjaro and arch-based systems. I have been dealing for many years with Debian and derivatives. I can solve there a problem related to the automounting of shared network folder on wine application. I have now a pc with manjaro kde. Dolphin file manager can see the shared folder (fileserver openmediavault, i.e. Debian) an can read the content. But the wine application (pdf-exchange) cannot see them. Obviously, since they have first to be mounted and secondly automounted. I write now what I do in Debian and derivatives, so that the two task are accomplished and the wine application can find the content of the shared folder. I would be very grateful if someone could tell me what can be applied on arch-manjaro, or the right procedure

at the very beginning

sudo -i

and then

mkdir -p /mnt/servername

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

cd /mnt/servername

Then I edit with gedit /etc/fstab

//static-ip/foldername /mnt/servername cifs auto,nofail,username=yyy,password=xxx,rw 0 0

I would be grateful for any help to translate these commands and edit operations on manjaro.
Thanks a lots
essegi

This is not a restriction on the side of GNU/Linux, but on the side of wine. You have to keep in mind that wine pretty much emulates the behavior of Microsoft Windows on top of a UNIX system. By consequence, wine uses drive letters, and as such, it needs to be told what drive letter to assign to the network share.

Hi there, thanks a lot. Wine Application does not see anything in the mount folder, except if I follow the procedure mentioned above, related to debian, which works both for mounting and automounting the share folder without drive letters. Could you please suggest a link, a post, or a procedure which could work in arch-manjaro systems?
Thank you very much

Maybe this might help… :arrow_down:

Thanks a lot for your indications. I will study the tutorial. :rainbow:

Keep in mind that if you use systemd-mount units, you should NOT use the fstab entry, it’s either one not both :wink:
Systemd-mount units are much better and flexible as fstab and can do much more…

1 Like

Hi again,
I find here
https://forum.manjaro.org/t/how-to-automatically-mount-network-share-upon-connecting-to-my-home-wifi-network/80923/2
a solution, which sounds to me more familiar as systemd (I come from debian).
Would it be correct for simple mount:
sudo mount -t cifs -o username=xxx, password=yyy //static-ip/foldername ~/readyshare
and for automounting:
edit /etc/fstab as it follows:

//static-ip/foldername ~/readyshare cifs _netdev,nofail,username=xxx,password=yyy 0 0
Thanks a lot
ps.: In the meanwhile I read about systemd

Debian uses systemd also AFAIK… :wink:
Try the systemd-mountcommand. (see it’s manpage)

Also see:

Hi everyone, I tried the debian solution and it works!
Here what I did
for mounting:

mkdir -p /mnt/servername

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

cd /mnt/servername

for automounting:
edit /etc/fstab (I used gedit)
//staticip/foldername /mnt/servername cifs _netdev,auto,nofail,username=xxx,password=yyy,rw 0 0
Probably, you have to adapt the critical part, the options, to your case, but the syntax is correct and it works for mounting and automounting network drives in arch- and debian-derivatives.
Thanks a lot!

You just repeated the same commands as in your OP…
Then mark your reply as solution? :thinking:
Dont’t think so…
:vulcan_salute:

1 Like

I don’t know what to say. During the week-end I went through the suggested manuals. They are complete, but in some way unpractical. I red also a very similar solution in arch forum (Newbie’s corner), which motivated me. So I decided early this morning, when I was at the office, to give a try to the debian solution. I did not have the pc at disposal before, otherwise I would have tried those lines before writing my first message here in this forum. Step by step, the terminal (Konsole) accepted all commands and I could mount the network folder in Dolphin, see it in the wine application that I mentioned, and eventually find it again after system reboot. I could modify and save the files. It simply worked. Probably, it’s not accidental, since the syntax is respected: there is a what, a where, a file type, the options and the other two values, which at the moment I don’t remember, but in majority of the cases are written as 0 0. Obviously, I cannot say if the system will break at some point because of this. I will check. But this is another story. The main point is that those lines work. I suggest that people with a lot of experience on arch-derivatives give a serious examination to the above mentioned lines (with some variations in the options values). I have been using them for half a year on a bunch of pc with debian 11 with no issues at all. If their use is confirmed also by arch- and manjaro expert, they could be much more easy, direct and effective than the official manual. Thanks for your attention, anyway.

@essegi , the fstab is NOT the debian way…
It is the “old” Linux way of specifying mount points, the “new” way is the systemd-mount way on most major distro’s so it’s not Manjaro specific either…
:vulcan_salute:

Sorry for my misleading expression. I did not mean “the debian way”. I meant that this is the solution that I have been using in the debian family. With my limited experience I could not know that it was shared also in the arch family. Okay, it is an old way, but if it works, why not keep it simple? Anyway, thank you for leading me to the point of fstab vs systemd. Let’s say that in my case the old linux way was enough to reach the scope. But I will keep studying the new way, and see if it can be more effective in specific situations. Thanks a lot

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.