I'm using Ubuntu 14.04.

When I log on I see in the Files manager (near the bottom) this:

Connect to server

I routinely click "Connect to Server" and then see this:

Shared folders list

I then double-click those and they are mounted without needing a password to be entered, although the "nick" share in particular is set to have permissions for me only. The sharing is done by another PC running Ubuntu 14.04, and Samba shares (for compatibility with other PCs running Windows and OS/X).

Question: How do I have these actions performed automatically at logon?

I've seen various suggestions which usually involve editing a file ~/.smbcredentials and putting my username and password in, like this:


Apart from the security concerns, I don't see why I should have to put my password in cleartext, when I can normally mount the shared folder without entering my password at all.

I note that when opening a file on this shared folder it doesn't appear to be in /mnt or /media but somewhere else entirely:

Example of shared file


I've worked it out (I think). After reading about using gvfs-mount I found I could mount the share from the command line using:

gvfs-mount 'smb://'

So now it was a case of doing that automatically. I used "Startup Applications" for this:

Startup Applications

Then I added an entry for each desired disk:

Disks to mount

Each entry looked like this:

Mount one disk

That seems to work fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.