This is a static archive of the old Zorin Forum.

The information below may be outdated. Visit the new Zorin Forum here ›

If you have registered on the old forum, you will need to create an account on the new forum.

[STICKY] Quick way to automount shares

kb5050

Fri Apr 10, 2015 12:22:25 am

2 Steps.

In the Software Center or Synaptic ro terminal (whatever you prefer).

Search for GadMin Samba.

Install it, and run it. Allow it to update your smb.conf file.
Go to the Configuration tab, which opens smb.conf to allow you to edit it.
and scroll down or look for a line that is controlling the samba load order.
It is normally

name resolve order = wins lmhosts bcasts

Change this line to read

name resolve order = lmhosts bcast wins

Apply using Apply and then Click on Activate, to reload Samba.

Launch PCMANFM (Otherwise named FILES) or click on the Home icon on the desktop to open up your PCMANFM browser.

Now click on Network at the bottom.

If you have smb shares that are on your LAN they should now show up.
Pick on ones that have all uppercase letters. Example mine is named GOFLEX_HOME for my Seagate drive.

Purposefully Avoid Active computer names, since those are not online all the time. My NAS drive is however normally on 24/7

Login to the NAS or Share, and choose Remember Forever Tickbox.
Supply needed username and password.

IF this is the very first time you ever mounted a share, Keyring is going to pop up and beg you to choose a password for the ring.
Myself I do not, but your choice is your choice.
Pay attention here, because you can just use enter, and you will get a Warning that it is unsecure, but you CAN avoid the password ever.
Just press enter 2 times and agree to the warning.

If you decide to use a password then it will prompt you for the password every time you decide to open the share.
If not then it acts much like windows which never prompts you again.

So create a bookmark. This will show in the left pane.

Now hover over the now mounted share on the left side, and copy the line that pops up to a piece of paper. Yeah you cannot copy and paste this.

The line will read

smb://MYSHARENAME/path%20to%20share/path%20to%folder/

Replace MYSHARENAME with the one it showed that you wrote down, and replace path%20to%20to%20folder/

with yours.
Please note this is an example only, yours will be different.

Now go over to the Zorin Menu button, and in the search box type start and you will then see
Startup Applications

Open that,

Click on ADD
In the prompt for Description Name it a logical name such as Mount This Share At Startup.
In the command line manually paste the line you had copied from above.

You can add a comment of you want.

Add any additional folders you had Bookmarked or mounted, in the File Manager.

Thats it, all but to test it out.

You must restart when your done.

If ALL goes well you will see nothing appear for errors when you restart, BUT if you chose to use a Keyring Password it is going to ask you to unlock the keyring. That was your option, and if you wanted to avoid that option you will have to go and remove the Keyring.
I hate passwords so I never use that option.

So Now go into PCMANFM and you should see the shares mounted, and you may (by default) also see them ON the desktop.
I hide mounted shares from the desktop by following this Forum Post.

http://zoringroup.com/forum/viewtopic.php?f=5&t=4768

Its using the gnome-tweak-tool. This does work very well. I hate the icons always popping up, and this allows you to hide them.
They are still there and available to all supported applications.

I highly recommend doing this, because:

I use Clementine which is the greatest (IMHO) music player, and by doing so (On my desktop wired internet computer) I can access my Music Library stored on the remote share, all the time.

Now I know I will get more replies to this to show many more PERMANENT ways to pull off the same thing, and of course if your on a portable computer, this is destined to fail some, and it is destined to occasionally fail some when network errors occur.

For those of clever mind, please suggest an improved way such as adding a few cron seconds in front of the smb line to avoid it trying to mount the share.
But you have to admit, you can just easily remove the Startup items this way, a whole pile easier than any other method I have yet to try.

Yeah you could also give Gigolo a shot, and place it into the startup items as well.
But this is working for me so I stuck with it. No overhead software to bother me.
Now my applications just automagically find all I want on my NAS drives, all the time.

Lets hope that the next Distro of Zorin will consider adding an Automount Option to the Startup Application application.
Browsing the network would be a great thing, and adding Automount option in PCMANFM would be another useful way.

Happy Zorins Everyone!

[Edited by swarfendor437 19:29 Hours - British Summer Time = GMT+ 1 on 11.4.2015 for typos and emphasis! ;) ]

Swarfendor437

Sat Apr 11, 2015 6:36:19 pm

Hi kb5050, great tutorial - made it a [STICKY] so it gets bumped up to first sub-page of How-tos - 120 blue jewels to you friend! :D