[Solved]Linux: list of all the existing the UNC network shortcuts ("smb://...")? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- devEric69 · 2019-06-17 12:14 Hello, I am under Linux \ Ubuntu desktop 18.04, on which I've created 2 UNC network shortcuts (one to another Linux machine and one to a Windows machine), both are therefore operational and of the type "smb://@IP/rep_shared". Now, I would like to store all these shortcuts in a TStringList for example, but I don't see which text file to iterate to get them back (I found that it would be stored in the /etc/mtab or /etc/fstab file, but that's not the case). Does anyone know a file to iterate in Laz. to get them, or another method (currently, I type these Samba addresses into the Nemo file manager, and they are created if the target machine is turned on, what I find practical;or am I totally forced to enter them manually in fstab, which I find more "static")? ---------------------------------------------------------------------- devEric69 · 2019-06-17 15:21 Well, finally, I create in the etc/fstab file, the network shortcuts that I find useful for starting the machine, aka permanent mounting points. Then, I iterate this file (bulk use of JclFileUtils and JclSysUtils where I commented all the functions not compiling because they are strictly dedicated to Windows, to be able to use _PATH_MNTAB, GetAvailableFileSystems, ..., and getmntent_r which returns each line of the fstab as a record). - entries with a MNT_FSNAME='UUID=.../...' are " volume mount points " ('/',' /home',' swap', etc). - entries with a MNT_FSNAME='//x.x.x.x.x.x/rep_shared' are " UNC network shortcuts mount points " created with the command "mount -t cifs .../...". ---------------------------------------------------------------------- lucamar · 2019-06-17 22:57 Wouldn't it be easier and less error prone to just parse the output of mount or udisks? Or you could also interate the mount points root (v.g. /media/) checking the type of each "file".